@omnitron-dev/prism 0.3.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (214) hide show
  1. package/README.md +148 -0
  2. package/dist/blocks/index.js +3 -1
  3. package/dist/blocks/index.js.map +1 -1
  4. package/dist/{chunk-S6SEGBX6.js → chunk-472SOF76.js} +4 -4
  5. package/dist/{chunk-S6SEGBX6.js.map → chunk-472SOF76.js.map} +1 -1
  6. package/dist/{chunk-Z5OSPAOC.js → chunk-4Z5DE5GK.js} +78 -75
  7. package/dist/chunk-4Z5DE5GK.js.map +1 -0
  8. package/dist/chunk-52PQL67Q.js +559 -0
  9. package/dist/chunk-52PQL67Q.js.map +1 -0
  10. package/dist/chunk-75FQ5IW3.js +590 -0
  11. package/dist/chunk-75FQ5IW3.js.map +1 -0
  12. package/dist/{chunk-6AHI4GSV.js → chunk-7G5D5PTC.js} +4 -3
  13. package/dist/chunk-7G5D5PTC.js.map +1 -0
  14. package/dist/chunk-BJE2AKD4.js +105 -0
  15. package/dist/chunk-BJE2AKD4.js.map +1 -0
  16. package/dist/chunk-FF5RF32O.js +248 -0
  17. package/dist/chunk-FF5RF32O.js.map +1 -0
  18. package/dist/{chunk-OBJ244BO.js → chunk-GMIE6III.js} +9 -42
  19. package/dist/chunk-GMIE6III.js.map +1 -0
  20. package/dist/chunk-GUGTDURV.js +826 -0
  21. package/dist/chunk-GUGTDURV.js.map +1 -0
  22. package/dist/chunk-HOXFSQUV.js +573 -0
  23. package/dist/chunk-HOXFSQUV.js.map +1 -0
  24. package/dist/chunk-JSQTYDPG.js +3 -0
  25. package/dist/chunk-JSQTYDPG.js.map +1 -0
  26. package/dist/{chunk-ZTATTUH7.js → chunk-KQ67XB6T.js} +213 -651
  27. package/dist/chunk-KQ67XB6T.js.map +1 -0
  28. package/dist/{chunk-WFD54GQQ.js → chunk-LOY2NPCO.js} +14 -573
  29. package/dist/chunk-LOY2NPCO.js.map +1 -0
  30. package/dist/{chunk-YQW43BDH.js → chunk-LSPFFEJT.js} +240 -1824
  31. package/dist/chunk-LSPFFEJT.js.map +1 -0
  32. package/dist/{chunk-BZOL7GMU.js → chunk-OKTLA23Q.js} +4 -4
  33. package/dist/chunk-OKTLA23Q.js.map +1 -0
  34. package/dist/chunk-PFT2BNYO.js +191 -0
  35. package/dist/chunk-PFT2BNYO.js.map +1 -0
  36. package/dist/chunk-PGHEP4JD.js +106 -0
  37. package/dist/chunk-PGHEP4JD.js.map +1 -0
  38. package/dist/chunk-PXXPLHIY.js +74 -0
  39. package/dist/chunk-PXXPLHIY.js.map +1 -0
  40. package/dist/chunk-SU3LVQ7N.js +518 -0
  41. package/dist/chunk-SU3LVQ7N.js.map +1 -0
  42. package/dist/chunk-YHE7HXSG.js +206 -0
  43. package/dist/chunk-YHE7HXSG.js.map +1 -0
  44. package/dist/cli/index.js +7 -2
  45. package/dist/cli/index.js.map +1 -1
  46. package/dist/components/accordion/accordion.d.ts.map +1 -1
  47. package/dist/components/admin-filters/admin-data-table.d.ts.map +1 -1
  48. package/dist/components/admin-filters/filter-toolbar.d.ts.map +1 -1
  49. package/dist/components/date-input/date-input.d.ts +27 -0
  50. package/dist/components/date-input/date-input.d.ts.map +1 -0
  51. package/dist/components/date-input/index.d.ts +4 -0
  52. package/dist/components/date-input/index.d.ts.map +1 -0
  53. package/dist/components/date-input/value.d.ts +9 -0
  54. package/dist/components/date-input/value.d.ts.map +1 -0
  55. package/dist/components/doc-layout/doc-sidebar.d.ts +4 -1
  56. package/dist/components/doc-layout/doc-sidebar.d.ts.map +1 -1
  57. package/dist/components/doc-layout/index.js +6 -0
  58. package/dist/components/doc-layout/index.js.map +1 -0
  59. package/dist/components/editor/editor.d.ts.map +1 -1
  60. package/dist/components/editor/icons/index.d.ts +32 -40
  61. package/dist/components/editor/icons/index.d.ts.map +1 -1
  62. package/dist/components/editor/index.js +3 -1
  63. package/dist/components/error-boundary/error-boundary.d.ts.map +1 -1
  64. package/dist/components/index.css +4 -0
  65. package/dist/components/index.css.map +1 -1
  66. package/dist/components/index.d.ts +4 -4
  67. package/dist/components/index.d.ts.map +1 -1
  68. package/dist/components/index.js +18 -8
  69. package/dist/components/knowledge-graph/edge-labels.d.ts +14 -0
  70. package/dist/components/knowledge-graph/edge-labels.d.ts.map +1 -0
  71. package/dist/components/knowledge-graph/graph.d.ts +56 -0
  72. package/dist/components/knowledge-graph/graph.d.ts.map +1 -0
  73. package/dist/components/knowledge-graph/index.css +176 -0
  74. package/dist/components/knowledge-graph/index.css.map +1 -0
  75. package/dist/components/knowledge-graph/index.d.ts +3 -0
  76. package/dist/components/knowledge-graph/index.d.ts.map +1 -0
  77. package/dist/components/knowledge-graph/index.js +795 -0
  78. package/dist/components/knowledge-graph/index.js.map +1 -0
  79. package/dist/components/knowledge-graph/label-layout.d.ts +28 -0
  80. package/dist/components/knowledge-graph/label-layout.d.ts.map +1 -0
  81. package/dist/components/knowledge-graph/label-store.d.ts +15 -0
  82. package/dist/components/knowledge-graph/label-store.d.ts.map +1 -0
  83. package/dist/components/knowledge-graph/model.d.ts +92 -0
  84. package/dist/components/knowledge-graph/model.d.ts.map +1 -0
  85. package/dist/components/lightbox/lightbox.d.ts.map +1 -1
  86. package/dist/components/map/Map.d.ts +19 -43
  87. package/dist/components/map/Map.d.ts.map +1 -1
  88. package/dist/components/map/MapCoverageLayer.d.ts +1 -1
  89. package/dist/components/map/MapCoverageLayer.d.ts.map +1 -1
  90. package/dist/components/map/MapMarker.d.ts +1 -1
  91. package/dist/components/map/MapMarker.d.ts.map +1 -1
  92. package/dist/components/map/MapPlaceSearch.d.ts +33 -0
  93. package/dist/components/map/MapPlaceSearch.d.ts.map +1 -0
  94. package/dist/components/map/MapPointPicker.d.ts +21 -12
  95. package/dist/components/map/MapPointPicker.d.ts.map +1 -1
  96. package/dist/components/map/coordinates.d.ts +10 -0
  97. package/dist/components/map/coordinates.d.ts.map +1 -0
  98. package/dist/components/map/index.css +4 -0
  99. package/dist/components/map/index.css.map +1 -0
  100. package/dist/components/map/index.d.ts +7 -2
  101. package/dist/components/map/index.d.ts.map +1 -1
  102. package/dist/components/map/index.js +3 -0
  103. package/dist/components/map/index.js.map +1 -0
  104. package/dist/components/nav-card/nav-card.d.ts.map +1 -1
  105. package/dist/components/rail/rail.d.ts.map +1 -1
  106. package/dist/components/research/diagram-image.d.ts +11 -0
  107. package/dist/components/research/diagram-image.d.ts.map +1 -0
  108. package/dist/components/research/diagram.d.ts +8 -0
  109. package/dist/components/research/diagram.d.ts.map +1 -0
  110. package/dist/components/research/document.d.ts +33 -0
  111. package/dist/components/research/document.d.ts.map +1 -0
  112. package/dist/components/research/frontmatter.d.ts +15 -0
  113. package/dist/components/research/frontmatter.d.ts.map +1 -0
  114. package/dist/components/research/index.css +51 -0
  115. package/dist/components/research/index.css.map +1 -0
  116. package/dist/components/research/index.d.ts +3 -0
  117. package/dist/components/research/index.d.ts.map +1 -0
  118. package/dist/components/research/index.js +6 -0
  119. package/dist/components/research/index.js.map +1 -0
  120. package/dist/components/research/parse.d.ts +29 -0
  121. package/dist/components/research/parse.d.ts.map +1 -0
  122. package/dist/components/research-editor/block-commands.d.ts +20 -0
  123. package/dist/components/research-editor/block-commands.d.ts.map +1 -0
  124. package/dist/components/research-editor/block-controls.d.ts +13 -0
  125. package/dist/components/research-editor/block-controls.d.ts.map +1 -0
  126. package/dist/components/research-editor/editor.d.ts +75 -0
  127. package/dist/components/research-editor/editor.d.ts.map +1 -0
  128. package/dist/components/research-editor/extensions.d.ts +14 -0
  129. package/dist/components/research-editor/extensions.d.ts.map +1 -0
  130. package/dist/components/research-editor/index.css +332 -0
  131. package/dist/components/research-editor/index.css.map +1 -0
  132. package/dist/components/research-editor/index.d.ts +5 -0
  133. package/dist/components/research-editor/index.d.ts.map +1 -0
  134. package/dist/components/research-editor/index.js +1592 -0
  135. package/dist/components/research-editor/index.js.map +1 -0
  136. package/dist/components/research-editor/math-input.d.ts +32 -0
  137. package/dist/components/research-editor/math-input.d.ts.map +1 -0
  138. package/dist/components/research-editor/math-markup.d.ts +4 -0
  139. package/dist/components/research-editor/math-markup.d.ts.map +1 -0
  140. package/dist/components/research-editor/math-navigation.d.ts +6 -0
  141. package/dist/components/research-editor/math-navigation.d.ts.map +1 -0
  142. package/dist/components/research-editor/math-node.d.ts +11 -0
  143. package/dist/components/research-editor/math-node.d.ts.map +1 -0
  144. package/dist/components/research-editor/source.d.ts +19 -0
  145. package/dist/components/research-editor/source.d.ts.map +1 -0
  146. package/dist/components/scrollbar/scrollbar.d.ts +4 -2
  147. package/dist/components/scrollbar/scrollbar.d.ts.map +1 -1
  148. package/dist/components/search-input/search-input.d.ts +0 -10
  149. package/dist/components/search-input/search-input.d.ts.map +1 -1
  150. package/dist/components/tiptap-renderer/tiptap-renderer.d.ts +4 -3
  151. package/dist/components/tiptap-renderer/tiptap-renderer.d.ts.map +1 -1
  152. package/dist/core/index.d.ts +1 -1
  153. package/dist/core/index.d.ts.map +1 -1
  154. package/dist/core/index.js +8 -4
  155. package/dist/core/provider.d.ts +7 -2
  156. package/dist/core/provider.d.ts.map +1 -1
  157. package/dist/forms/schema-provider.d.ts +3 -3
  158. package/dist/forms/schema-utils.d.ts +3 -3
  159. package/dist/hooks/index.js +9 -5
  160. package/dist/icons/context.d.ts +17 -0
  161. package/dist/icons/context.d.ts.map +1 -0
  162. package/dist/icons/controls.d.ts +51 -0
  163. package/dist/icons/controls.d.ts.map +1 -0
  164. package/dist/icons/index.d.ts +3 -0
  165. package/dist/icons/index.d.ts.map +1 -0
  166. package/dist/icons/index.js +4 -0
  167. package/dist/icons/index.js.map +1 -0
  168. package/dist/icons/theme.d.ts +4 -0
  169. package/dist/icons/theme.d.ts.map +1 -0
  170. package/dist/index.css +4 -0
  171. package/dist/index.css.map +1 -1
  172. package/dist/index.js +24 -13
  173. package/dist/index.js.map +1 -1
  174. package/dist/layouts/core/header-section.d.ts.map +1 -1
  175. package/dist/layouts/dashboard/labels.d.ts +12 -0
  176. package/dist/layouts/dashboard/labels.d.ts.map +1 -0
  177. package/dist/layouts/dashboard/layout.d.ts +7 -1
  178. package/dist/layouts/dashboard/layout.d.ts.map +1 -1
  179. package/dist/layouts/dashboard/sidenav.d.ts +7 -3
  180. package/dist/layouts/dashboard/sidenav.d.ts.map +1 -1
  181. package/dist/layouts/index.d.ts +5 -0
  182. package/dist/layouts/index.d.ts.map +1 -1
  183. package/dist/layouts/index.js +6 -1
  184. package/dist/layouts/panel-layout.d.ts +35 -0
  185. package/dist/layouts/panel-layout.d.ts.map +1 -0
  186. package/dist/layouts/sidebar-toggle.d.ts +11 -0
  187. package/dist/layouts/sidebar-toggle.d.ts.map +1 -0
  188. package/dist/state/stores/auth.d.ts +4 -16
  189. package/dist/state/stores/auth.d.ts.map +1 -1
  190. package/dist/state/stores/ui.d.ts +7 -105
  191. package/dist/state/stores/ui.d.ts.map +1 -1
  192. package/dist/theme/components/Button.d.ts.map +1 -1
  193. package/dist/theme/components/FormControls.d.ts +3 -12
  194. package/dist/theme/components/FormControls.d.ts.map +1 -1
  195. package/dist/theme/components/index.d.ts.map +1 -1
  196. package/dist/theme/create-theme.d.ts +5 -17
  197. package/dist/theme/create-theme.d.ts.map +1 -1
  198. package/dist/theme/index.js +6 -2
  199. package/dist/theme/mixins.d.ts +3 -1
  200. package/dist/theme/mixins.d.ts.map +1 -1
  201. package/dist/theme/palette/overrides.d.ts +23 -0
  202. package/dist/theme/palette/overrides.d.ts.map +1 -0
  203. package/dist/ui/index.d.ts +18 -0
  204. package/dist/ui/index.d.ts.map +1 -0
  205. package/dist/ui/index.js +148 -0
  206. package/dist/ui/index.js.map +1 -0
  207. package/package.json +92 -45
  208. package/dist/chunk-6AHI4GSV.js.map +0 -1
  209. package/dist/chunk-BZOL7GMU.js.map +0 -1
  210. package/dist/chunk-OBJ244BO.js.map +0 -1
  211. package/dist/chunk-WFD54GQQ.js.map +0 -1
  212. package/dist/chunk-YQW43BDH.js.map +0 -1
  213. package/dist/chunk-Z5OSPAOC.js.map +0 -1
  214. package/dist/chunk-ZTATTUH7.js.map +0 -1
@@ -1,3 +1,7 @@
1
+ import { TableIcon } from './chunk-75FQ5IW3.js';
2
+ import { generateColorScaleWithChannels, hexToRgbChannel, cssVarRgba, getContrastText, generatePaletteColorWithChannels, scrollbarStyles, varAlpha, generateColorScale, mixins } from './chunk-HOXFSQUV.js';
3
+ import { RemoveIcon, AddIcon, SearchIcon, CloseIcon, DownloadIcon, FilterIcon, ArrowDownIcon, ArrowUpIcon, MoreIcon, ChevronRightIcon, ChevronLeftIcon, LastPageIcon, FirstPageIcon, ChevronDownIcon, StarEmptyIcon, StarIcon, ErrorIcon, WarningIcon, InfoIcon, SuccessIcon, RadioCheckedIcon, RadioIcon } from './chunk-PGHEP4JD.js';
4
+ import { createPrismIcon } from './chunk-BJE2AKD4.js';
1
5
  import { buttonClasses } from '@mui/material/Button';
2
6
  import { iconButtonClasses } from '@mui/material/IconButton';
3
7
  import { accordionClasses } from '@mui/material/Accordion';
@@ -23,258 +27,11 @@ import { jsx } from 'react/jsx-runtime';
23
27
  import { tabClasses } from '@mui/material/Tab';
24
28
  import { autocompleteClasses } from '@mui/material/Autocomplete';
25
29
  import '@mui/x-data-grid/themeAugmentation';
26
- import { createTheme, responsiveFontSizes } from '@mui/material/styles';
30
+ import { createTheme, responsiveFontSizes, darken, lighten, getContrastRatio } from '@mui/material/styles';
31
+ import { colorChannel, hslToRgb } from '@mui/system';
32
+ import { forwardRef } from 'react';
27
33
  import * as locales from '@mui/material/locale';
28
34
 
29
- // src/theme/utils/color.ts
30
- function hexToRgb(hex) {
31
- const h = hex.replace("#", "");
32
- const expanded = h.length === 3 ? h.split("").map((c) => c + c).join("") : h;
33
- const bigint = parseInt(expanded, 16);
34
- const r = bigint >> 16 & 255;
35
- const g = bigint >> 8 & 255;
36
- const b = bigint & 255;
37
- return [r, g, b];
38
- }
39
- function hexToRgbChannel(hex) {
40
- const [r, g, b] = hexToRgb(hex);
41
- return `${r} ${g} ${b}`;
42
- }
43
- function rgbToHex(r, g, b) {
44
- const to2 = (n) => Math.round(n).toString(16).padStart(2, "0");
45
- return `#${to2(r)}${to2(g)}${to2(b)}`.toUpperCase();
46
- }
47
- function hexToHsl(hex) {
48
- const [r, g, b] = hexToRgb(hex);
49
- const r1 = r / 255;
50
- const g1 = g / 255;
51
- const b1 = b / 255;
52
- const max = Math.max(r1, g1, b1);
53
- const min = Math.min(r1, g1, b1);
54
- let h = 0;
55
- let s = 0;
56
- const l = (max + min) / 2;
57
- const d = max - min;
58
- if (d !== 0) {
59
- s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
60
- switch (max) {
61
- case r1:
62
- h = (g1 - b1) / d + (g1 < b1 ? 6 : 0);
63
- break;
64
- case g1:
65
- h = (b1 - r1) / d + 2;
66
- break;
67
- default:
68
- h = (r1 - g1) / d + 4;
69
- }
70
- h /= 6;
71
- }
72
- return { h: h * 360, s: s * 100, l: l * 100 };
73
- }
74
- function hslToHex(h, s, l) {
75
- const s1 = s / 100;
76
- const l1 = l / 100;
77
- const c = (1 - Math.abs(2 * l1 - 1)) * s1;
78
- const x = c * (1 - Math.abs(h / 60 % 2 - 1));
79
- const m = l1 - c / 2;
80
- let r1;
81
- let g1;
82
- let b1;
83
- if (h >= 0 && h < 60) {
84
- [r1, g1, b1] = [c, x, 0];
85
- } else if (h >= 60 && h < 120) {
86
- [r1, g1, b1] = [x, c, 0];
87
- } else if (h >= 120 && h < 180) {
88
- [r1, g1, b1] = [0, c, x];
89
- } else if (h >= 180 && h < 240) {
90
- [r1, g1, b1] = [0, x, c];
91
- } else if (h >= 240 && h < 300) {
92
- [r1, g1, b1] = [x, 0, c];
93
- } else {
94
- [r1, g1, b1] = [c, 0, x];
95
- }
96
- return rgbToHex(Math.round((r1 + m) * 255), Math.round((g1 + m) * 255), Math.round((b1 + m) * 255));
97
- }
98
- function rgba(color, alpha) {
99
- const [r, g, b] = hexToRgb(color);
100
- return `rgba(${r}, ${g}, ${b}, ${alpha})`;
101
- }
102
- function cssVarRgba(channel, alpha) {
103
- return `rgba(${channel} / ${alpha})`;
104
- }
105
- function generatePaletteColorWithChannels(color) {
106
- return {
107
- ...color,
108
- lighterChannel: hexToRgbChannel(color.lighter),
109
- lightChannel: hexToRgbChannel(color.light),
110
- mainChannel: hexToRgbChannel(color.main),
111
- darkChannel: hexToRgbChannel(color.dark),
112
- darkerChannel: hexToRgbChannel(color.darker),
113
- contrastTextChannel: hexToRgbChannel(color.contrastText)
114
- };
115
- }
116
- function generateColorScaleWithChannels(scale) {
117
- const shadeKeys = [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950];
118
- const channels = {};
119
- for (const key of shadeKeys) {
120
- const channelKey = `${key}Channel`;
121
- channels[channelKey] = hexToRgbChannel(scale[key]);
122
- }
123
- return { ...scale, ...channels };
124
- }
125
- function clamp(n, min, max) {
126
- return Math.max(min, Math.min(max, n));
127
- }
128
- function generateColorScale(baseColor) {
129
- const base = hexToHsl(baseColor);
130
- const tones = [
131
- { key: 50, lDelta: 40 },
132
- { key: 100, lDelta: 32 },
133
- { key: 200, lDelta: 24 },
134
- { key: 300, lDelta: 16 },
135
- { key: 400, lDelta: 8 },
136
- { key: 500, lDelta: 0 },
137
- { key: 600, lDelta: -8 },
138
- { key: 700, lDelta: -16 },
139
- { key: 800, lDelta: -24 },
140
- { key: 900, lDelta: -32 },
141
- { key: 950, lDelta: -40 }
142
- ];
143
- const scale = {};
144
- for (const { key, lDelta } of tones) {
145
- const l = clamp(base.l + lDelta, 5, 95);
146
- scale[key] = hslToHex(base.h, base.s, l);
147
- }
148
- return scale;
149
- }
150
- function createPaletteColorFromScale(scale, mode = "light") {
151
- const mainColor = mode === "dark" ? scale[400] : scale[500];
152
- const contrastText = getContrastText(mainColor, "#FFFFFF", "#212121");
153
- if (mode === "dark") {
154
- return {
155
- lighter: scale[950],
156
- light: scale[700],
157
- main: mainColor,
158
- dark: scale[300],
159
- darker: scale[100],
160
- contrastText
161
- };
162
- }
163
- return {
164
- lighter: scale[50],
165
- light: scale[400],
166
- main: mainColor,
167
- dark: scale[600],
168
- darker: scale[900],
169
- contrastText
170
- };
171
- }
172
- function invertColorScale(scale) {
173
- return {
174
- 50: scale[950],
175
- 100: scale[800],
176
- 200: scale[700],
177
- 300: scale[600],
178
- 400: scale[500],
179
- 500: scale[400],
180
- 600: scale[300],
181
- 700: scale[200],
182
- 800: scale[100],
183
- 900: scale[50],
184
- 950: "#FFFFFF"
185
- };
186
- }
187
- function getLuminance(hex) {
188
- const [r, g, b] = hexToRgb(hex).map((c) => {
189
- const sRgb = c / 255;
190
- return sRgb <= 0.03928 ? sRgb / 12.92 : Math.pow((sRgb + 0.055) / 1.055, 2.4);
191
- });
192
- return 0.2126 * r + 0.7152 * g + 0.0722 * b;
193
- }
194
- function getContrastRatio(color1, color2) {
195
- const l1 = getLuminance(color1);
196
- const l2 = getLuminance(color2);
197
- const lighter = Math.max(l1, l2);
198
- const darker = Math.min(l1, l2);
199
- return (lighter + 0.05) / (darker + 0.05);
200
- }
201
- function isLightColor(hex) {
202
- return getLuminance(hex) > 0.5;
203
- }
204
- function getContrastText(background, lightText = "#FFFFFF", darkText = "#000000") {
205
- return getContrastRatio(background, lightText) >= getContrastRatio(background, darkText) ? lightText : darkText;
206
- }
207
- function lighten(hex, amount) {
208
- const hsl = hexToHsl(hex);
209
- const newL = clamp(hsl.l + amount, 0, 100);
210
- return hslToHex(hsl.h, hsl.s, newL);
211
- }
212
- function darken(hex, amount) {
213
- const hsl = hexToHsl(hex);
214
- const newL = clamp(hsl.l - amount, 0, 100);
215
- return hslToHex(hsl.h, hsl.s, newL);
216
- }
217
- function mix(color1, color2, weight = 0.5) {
218
- const [r1, g1, b1] = hexToRgb(color1);
219
- const [r2, g2, b2] = hexToRgb(color2);
220
- const w = clamp(weight, 0, 1);
221
- const newR = Math.round(r1 * w + r2 * (1 - w));
222
- const newG = Math.round(g1 * w + g2 * (1 - w));
223
- const newB = Math.round(b1 * w + b2 * (1 - w));
224
- return rgbToHex(newR, newG, newB);
225
- }
226
- function validateOpacity(opacity, color) {
227
- const isCSSVar = (val) => val.includes("var(--");
228
- const isPercentage = (val) => val.trim().endsWith("%");
229
- const errors = {
230
- invalid: `[varAlpha]: Invalid opacity "${opacity}" for "${color}".`,
231
- range: "Must be a number between 0 and 1 (e.g., 0.48).",
232
- format: 'Must be a percentage (e.g., "48%") or CSS variable (e.g., "var(--opacity)").'
233
- };
234
- if (typeof opacity === "string") {
235
- if (isPercentage(opacity)) return opacity;
236
- if (isCSSVar(opacity)) return `calc(${opacity} * 100%)`;
237
- const parsed = parseFloat(opacity.trim());
238
- if (!isNaN(parsed) && parsed >= 0 && parsed <= 1) {
239
- return `${Number((parsed * 100).toFixed(2))}%`;
240
- }
241
- throw new Error(`${errors.invalid} ${errors.format}`);
242
- }
243
- if (typeof opacity === "number") {
244
- if (opacity >= 0 && opacity <= 1) {
245
- return `${Number((opacity * 100).toFixed(2))}%`;
246
- }
247
- throw new Error(`${errors.invalid} ${errors.range}`);
248
- }
249
- throw new Error(`${errors.invalid}`);
250
- }
251
- function varAlpha(color, opacity = 1) {
252
- if (!color?.trim()) {
253
- throw new Error("[varAlpha]: Color is undefined or empty!");
254
- }
255
- const isUnsupported = color.startsWith("#") || color.startsWith("rgb(") || color.startsWith("rgba(") || !color.includes("var") && color.includes("Channel");
256
- if (isUnsupported) {
257
- throw new Error(
258
- [
259
- `[varAlpha]: Unsupported color format "${color}"`,
260
- "\u2705 Supported formats:",
261
- ' - RGB channels: "0 184 217"',
262
- ' - CSS variables: "var(--palette-primary-mainChannel)"',
263
- " - currentColor",
264
- "\u274C Unsupported formats:",
265
- ' - Hex: "#00B8D9"',
266
- ' - RGB: "rgb(0, 184, 217)"',
267
- ' - RGBA: "rgba(0, 184, 217, 1)"'
268
- ].join("\n")
269
- );
270
- }
271
- const alpha = validateOpacity(opacity, color);
272
- if (color.toLowerCase() === "currentcolor") {
273
- return `color-mix(in srgb, currentColor ${alpha}, transparent)`;
274
- }
275
- return `rgba(${color} / ${alpha})`;
276
- }
277
-
278
35
  // src/theme/colors/base.ts
279
36
  var grey = {
280
37
  50: "#F7FAFC",
@@ -789,21 +546,19 @@ function createButtonOverrides(config) {
789
546
  // outlinedSize* class slots were removed in MUI v9 in favour
790
547
  // of the `variants` array on the component override. See
791
548
  // https://mui.com/material-ui/migration/upgrade-to-v9/.
792
- // The icon slot wraps a single child (the icon SVG). `:first-child`
793
- // is the modern, tag-agnostic way to target it — replaces
794
- // `:first-of-type` which only matched if the wrapped element was
795
- // the first sibling of its tag (fine for the common case, but
796
- // brittle when a consumer wraps the icon in a tooltip or fragment
797
- // that introduces a non-element node before the SVG).
549
+ // Each native slot contains the supplied icon root, which may be a
550
+ // custom wrapper. Ignore SSR style elements instead of relying on child
551
+ // position. The public slot class keeps this rule authoritative over
552
+ // MUI's size-specific icon selectors without affecting nested content.
798
553
  startIcon: {
799
554
  marginRight: 4,
800
- "& > :first-child": {
555
+ [`&.${buttonClasses.startIcon} > :not(style)`]: {
801
556
  fontSize: 16
802
557
  }
803
558
  },
804
559
  endIcon: {
805
560
  marginLeft: 4,
806
- "& > :first-child": {
561
+ [`&.${buttonClasses.endIcon} > :not(style)`]: {
807
562
  fontSize: 16
808
563
  }
809
564
  }
@@ -829,337 +584,6 @@ function createButtonGroupOverrides(config) {
829
584
  }
830
585
  };
831
586
  }
832
-
833
- // src/theme/mixins.ts
834
- function getHoverStyles(hoverOption, hoverBase) {
835
- if (!hoverOption) return {};
836
- return {
837
- "&:hover": {
838
- ...hoverBase,
839
- ...typeof hoverOption === "object" ? hoverOption : {}
840
- }
841
- };
842
- }
843
- function filledStyles(theme, colorKey, options) {
844
- if (!colorKey) {
845
- if (process.env.NODE_ENV !== "production") {
846
- console.warn("[Prism filledStyles] Missing colorKey parameter.");
847
- }
848
- return {};
849
- }
850
- const palette = theme.vars?.palette || theme.palette;
851
- const grey2 = palette.grey;
852
- if (colorKey === "default") {
853
- const base2 = {
854
- color: grey2[800],
855
- backgroundColor: grey2[300]
856
- };
857
- const hover2 = getHoverStyles(options?.hover, {
858
- backgroundColor: grey2[400]
859
- });
860
- return { ...base2, ...hover2 };
861
- }
862
- if (colorKey === "inherit") {
863
- const base2 = {
864
- color: palette.common.white,
865
- backgroundColor: grey2[800]
866
- };
867
- const hover2 = getHoverStyles(options?.hover, {
868
- backgroundColor: grey2[700]
869
- });
870
- return { ...base2, ...hover2 };
871
- }
872
- if (colorKey === "white" || colorKey === "black") {
873
- const oppositeColor = colorKey === "white" ? "black" : "white";
874
- const base2 = {
875
- color: palette.common[oppositeColor],
876
- backgroundColor: palette.common[colorKey]
877
- };
878
- const hover2 = getHoverStyles(options?.hover, {
879
- opacity: 0.8
880
- });
881
- return { ...base2, ...hover2 };
882
- }
883
- const paletteColor = palette[colorKey];
884
- const base = {
885
- color: paletteColor.contrastText,
886
- backgroundColor: paletteColor.main
887
- };
888
- const hover = getHoverStyles(options?.hover, {
889
- backgroundColor: paletteColor.dark
890
- });
891
- return { ...base, ...hover };
892
- }
893
- function softStyles(theme, colorKey, options) {
894
- if (!colorKey) {
895
- if (process.env.NODE_ENV !== "production") {
896
- console.warn("[Prism softStyles] Missing colorKey parameter.");
897
- }
898
- return {};
899
- }
900
- const palette = theme.vars?.palette || theme.palette;
901
- const grey2 = palette.grey;
902
- if (colorKey === "default") {
903
- return {
904
- ...filledStyles(theme, "default", options),
905
- boxShadow: "none"
906
- };
907
- }
908
- if (colorKey === "inherit") {
909
- const greyChannel = grey2["500Channel"] || "145, 158, 171";
910
- const base2 = {
911
- boxShadow: "none",
912
- backgroundColor: varAlpha(greyChannel, 0.16)
913
- };
914
- const hover2 = getHoverStyles(options?.hover, {
915
- backgroundColor: varAlpha(greyChannel, 0.32)
916
- });
917
- return { ...base2, ...hover2 };
918
- }
919
- if (colorKey === "white" || colorKey === "black") {
920
- const base2 = {
921
- boxShadow: "none",
922
- color: palette.common[colorKey],
923
- backgroundColor: varAlpha("currentColor", 0.08)
924
- };
925
- const hover2 = getHoverStyles(options?.hover, {
926
- backgroundColor: varAlpha("currentColor", 0.16)
927
- });
928
- return { ...base2, ...hover2 };
929
- }
930
- const paletteColor = palette[colorKey];
931
- const mainChannel = paletteColor.mainChannel || palette.primary.mainChannel || "51, 133, 240";
932
- const base = {
933
- boxShadow: "none",
934
- color: paletteColor.dark,
935
- backgroundColor: varAlpha(mainChannel, 0.16)
936
- };
937
- const hover = getHoverStyles(options?.hover, {
938
- backgroundColor: varAlpha(mainChannel, 0.32)
939
- });
940
- return { ...base, ...hover };
941
- }
942
- function bgGradient(options) {
943
- const { images, sizes, positions, colors, direction = "to bottom" } = options;
944
- if (colors && colors.length > 0) {
945
- return {
946
- background: `linear-gradient(${direction}, ${colors.join(", ")})`
947
- };
948
- }
949
- if (images && images.length > 0) {
950
- return {
951
- backgroundImage: images.join(", "),
952
- backgroundSize: sizes?.join(", ") || "cover",
953
- backgroundPosition: positions?.join(", ") || "center",
954
- backgroundRepeat: "no-repeat"
955
- };
956
- }
957
- return {};
958
- }
959
- function bgBlur(options) {
960
- const { blur = 20, color = "rgba(255, 255, 255, 0.8)" } = options;
961
- return {
962
- backdropFilter: `blur(${blur}px)`,
963
- WebkitBackdropFilter: `blur(${blur}px)`,
964
- backgroundColor: color
965
- };
966
- }
967
- function paperStyles(theme, options) {
968
- const { blur = 20, color, dropdown } = options ?? {};
969
- const palette = theme.vars?.palette || theme.palette;
970
- const baseStyles = {
971
- backdropFilter: `blur(${blur}px)`,
972
- WebkitBackdropFilter: `blur(${blur}px)`,
973
- backgroundColor: color ?? varAlpha("255, 255, 255", 0.9)
974
- };
975
- if (dropdown) {
976
- const customShadows = theme.customShadows;
977
- const greyChannel = palette.grey["500Channel"] || "145, 158, 171";
978
- return {
979
- ...baseStyles,
980
- padding: theme.spacing(0.5),
981
- boxShadow: customShadows?.dropdown || `0 0 2px 0 rgba(${greyChannel}, 0.24), -20px 20px 40px -4px rgba(${greyChannel}, 0.24)`,
982
- borderRadius: `${Number(theme.shape.borderRadius) * 1.25}px`
983
- };
984
- }
985
- return baseStyles;
986
- }
987
- function menuItemStyles(theme) {
988
- const palette = theme.vars?.palette || theme.palette;
989
- return {
990
- ...theme.typography.body2,
991
- padding: theme.spacing(0.75, 1),
992
- borderRadius: Number(theme.shape.borderRadius) * 0.75,
993
- // `:not(:last-child)` is the universal sibling-position selector
994
- // that works regardless of element type. `:last-of-type` only
995
- // matches the last sibling of the SAME tag, so a fragment-rendered
996
- // <Divider /> next to <MenuItem /> can fool it (Divider becomes
997
- // the last-of-type MenuItem too, so the previous MenuItem keeps
998
- // its margin instead of dropping it). Switching to :last-child
999
- // also satisfies MUI v9's lint-against-of-type-selectors guidance.
1000
- "&:not(:last-child)": {
1001
- marginBottom: 4
1002
- },
1003
- "&.Mui-selected": {
1004
- fontWeight: theme.typography.fontWeightMedium,
1005
- backgroundColor: palette.action.selected,
1006
- "&:hover": { backgroundColor: palette.action.hover }
1007
- }
1008
- };
1009
- }
1010
- function maxLine(options) {
1011
- const { lines, lineHeight = 1.5 } = options;
1012
- return {
1013
- overflow: "hidden",
1014
- display: "-webkit-box",
1015
- WebkitBoxOrient: "vertical",
1016
- WebkitLineClamp: lines,
1017
- textOverflow: "ellipsis",
1018
- ...lineHeight && { lineHeight }
1019
- };
1020
- }
1021
- function textGradient(direction, ...colors) {
1022
- return {
1023
- background: `linear-gradient(${direction}, ${colors.join(", ")})`,
1024
- WebkitBackgroundClip: "text",
1025
- WebkitTextFillColor: "transparent",
1026
- backgroundClip: "text",
1027
- textFillColor: "transparent",
1028
- display: "inline-block"
1029
- };
1030
- }
1031
- function borderGradient(options) {
1032
- const { color = "linear-gradient(135deg, #FF5630, #00AB55)", borderWidth = 2, borderRadius = 0 } = options;
1033
- return {
1034
- position: "relative",
1035
- border: "none",
1036
- borderRadius,
1037
- "&::before": {
1038
- content: '""',
1039
- position: "absolute",
1040
- inset: 0,
1041
- borderRadius: "inherit",
1042
- padding: borderWidth,
1043
- background: color,
1044
- WebkitMask: "linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0)",
1045
- WebkitMaskComposite: "xor",
1046
- maskComposite: "exclude",
1047
- pointerEvents: "none"
1048
- }
1049
- };
1050
- }
1051
- function scrollbarStyles(theme) {
1052
- const palette = theme.vars?.palette || theme.palette;
1053
- const greyChannel = palette.grey["500Channel"] || "145, 158, 171";
1054
- return {
1055
- scrollbarWidth: "thin",
1056
- scrollbarColor: `${varAlpha(greyChannel, 0.4)} ${varAlpha(greyChannel, 0.08)}`,
1057
- "&::-webkit-scrollbar": {
1058
- width: 6,
1059
- height: 6
1060
- },
1061
- "&::-webkit-scrollbar-track": {
1062
- backgroundColor: "transparent"
1063
- },
1064
- "&::-webkit-scrollbar-thumb": {
1065
- backgroundColor: varAlpha(greyChannel, 0.4),
1066
- borderRadius: 3,
1067
- "&:hover": {
1068
- backgroundColor: varAlpha(greyChannel, 0.6)
1069
- }
1070
- }
1071
- };
1072
- }
1073
- var mixins = {
1074
- toolbar: {
1075
- minHeight: 56,
1076
- "@media (min-width:0px)": {
1077
- "@media (orientation: landscape)": {
1078
- minHeight: 48
1079
- }
1080
- },
1081
- "@media (min-width:600px)": {
1082
- minHeight: 64
1083
- }
1084
- },
1085
- // Extended mixins
1086
- hideScrollX: {
1087
- msOverflowStyle: "none",
1088
- scrollbarWidth: "none",
1089
- overflowX: "auto",
1090
- "&::-webkit-scrollbar": { display: "none" }
1091
- },
1092
- hideScrollY: {
1093
- msOverflowStyle: "none",
1094
- scrollbarWidth: "none",
1095
- overflowY: "auto",
1096
- "&::-webkit-scrollbar": { display: "none" }
1097
- },
1098
- // Style functions (attached at theme creation)
1099
- bgBlur,
1100
- bgGradient,
1101
- maxLine,
1102
- softStyles,
1103
- filledStyles,
1104
- paperStyles,
1105
- menuItemStyles,
1106
- varAlpha,
1107
- textGradient,
1108
- borderGradient,
1109
- scrollbarStyles
1110
- };
1111
- var hideScrollbarMixin = {
1112
- scrollbarWidth: "none",
1113
- msOverflowStyle: "none",
1114
- "&::-webkit-scrollbar": {
1115
- display: "none"
1116
- }
1117
- };
1118
- function customScrollbarMixin(theme) {
1119
- const palette = theme.vars?.palette || theme.palette;
1120
- const greyChannel = palette.grey["500Channel"] || "145, 158, 171";
1121
- return {
1122
- scrollbarWidth: "thin",
1123
- scrollbarColor: `${varAlpha(greyChannel, 0.4)} ${varAlpha(greyChannel, 0.08)}`,
1124
- "&::-webkit-scrollbar": {
1125
- width: 6,
1126
- height: 6
1127
- },
1128
- "&::-webkit-scrollbar-track": {
1129
- backgroundColor: "transparent"
1130
- },
1131
- "&::-webkit-scrollbar-thumb": {
1132
- backgroundColor: varAlpha(greyChannel, 0.4),
1133
- borderRadius: 3,
1134
- "&:hover": {
1135
- backgroundColor: varAlpha(greyChannel, 0.6)
1136
- }
1137
- }
1138
- };
1139
- }
1140
- var textEllipsisMixin = {
1141
- overflow: "hidden",
1142
- textOverflow: "ellipsis",
1143
- whiteSpace: "nowrap"
1144
- };
1145
- function multiLineEllipsisMixin(lines) {
1146
- return {
1147
- overflow: "hidden",
1148
- display: "-webkit-box",
1149
- WebkitBoxOrient: "vertical",
1150
- WebkitLineClamp: lines
1151
- };
1152
- }
1153
- var focusRingMixin = {
1154
- "&:focus-visible": {
1155
- outline: "none",
1156
- boxShadow: "0 0 0 2px var(--prism-background, #FFF), 0 0 0 4px var(--prism-primary, #3385F0)"
1157
- }
1158
- };
1159
- var glassMixin = {
1160
- backdropFilter: "blur(20px)",
1161
- backgroundColor: "var(--prism-vibrant-overlay, rgba(255, 255, 255, 0.7))"
1162
- };
1163
587
  var chipColors = ["primary", "secondary", "info", "success", "warning", "error"];
1164
588
  var softVariants2 = [
1165
589
  ...chipColors.map((color) => ({
@@ -1635,13 +1059,13 @@ function createFormHelperTextOverrides(_config) {
1635
1059
  }
1636
1060
  };
1637
1061
  }
1638
- function CheckboxIcon(props) {
1062
+ function DefaultCheckboxIcon(props) {
1639
1063
  return /* @__PURE__ */ jsx(SvgIcon, { ...props, children: /* @__PURE__ */ jsx("path", { d: "M17.9 2.318A5 5 0 0 1 22.895 7.1l.005.217v10a5 5 0 0 1-4.783 4.995l-.217.005h-10a5 5 0 0 1-4.995-4.783l-.005-.217v-10a5 5 0 0 1 4.783-4.996l.217-.004h10Zm-.5 1.5h-9a4 4 0 0 0-4 4v9a4 4 0 0 0 4 4h9a4 4 0 0 0 4-4v-9a4 4 0 0 0-4-4Z" }) });
1640
1064
  }
1641
- function CheckboxCheckedIcon(props) {
1065
+ function DefaultCheckboxCheckedIcon(props) {
1642
1066
  return /* @__PURE__ */ jsx(SvgIcon, { ...props, children: /* @__PURE__ */ jsx("path", { d: "M17 2a5 5 0 0 1 5 5v10a5 5 0 0 1-5 5H7a5 5 0 0 1-5-5V7a5 5 0 0 1 5-5Zm-1.625 7.255-4.13 4.13-1.75-1.75a.881.881 0 0 0-1.24 0c-.34.34-.34.89 0 1.24l2.38 2.37c.17.17.39.25.61.25.23 0 .45-.08.62-.25l4.75-4.75c.34-.34.34-.89 0-1.24a.881.881 0 0 0-1.24 0Z" }) });
1643
1067
  }
1644
- function CheckboxIndeterminateIcon(props) {
1068
+ function DefaultCheckboxIndeterminateIcon(props) {
1645
1069
  return /* @__PURE__ */ jsx(SvgIcon, { ...props, children: /* @__PURE__ */ jsx("path", { d: "M17,2 C19.7614,2 22,4.23858 22,7 L22,7 L22,17 C22,19.7614 19.7614,22 17,22 L17,22 L7,22 C4.23858,22 2,19.7614 2,17 L2,17 L2,7 C2,4.23858 4.23858,2 7,2 L7,2 Z M15,11 L9,11 C8.44772,11 8,11.4477 8,12 C8,12.5523 8.44772,13 9,13 L15,13 C15.5523,13 16,12.5523 16,12 C16,11.4477 15.5523,11 15,11 Z" }) });
1646
1070
  }
1647
1071
  var SWITCH_DIMENSIONS = {
@@ -1852,6 +1276,9 @@ function createFormControlOverrides(_config) {
1852
1276
  }
1853
1277
  };
1854
1278
  }
1279
+ var CheckboxIcon = createPrismIcon("checkbox", DefaultCheckboxIcon);
1280
+ var CheckboxCheckedIcon = createPrismIcon("checkboxChecked", DefaultCheckboxCheckedIcon);
1281
+ var CheckboxIndeterminateIcon = createPrismIcon("checkboxMixed", DefaultCheckboxIndeterminateIcon);
1855
1282
  var tabsVariants = {
1856
1283
  root: [
1857
1284
  {
@@ -2431,34 +1858,18 @@ function componentOverrides(config) {
2431
1858
  },
2432
1859
  styleOverrides: {
2433
1860
  root: ({ theme }) => ({
1861
+ // Every disclosure owns its full outline and all four corners.
1862
+ // Use MUI's native rounded state to override its edge-only radii,
1863
+ // independent of siblings (including Emotion's SSR style tags).
1864
+ // The square prop remains authoritative when rounded is absent.
2434
1865
  border: `1px solid ${paletteVar(theme, "divider")}`,
2435
- borderRadius,
1866
+ borderRadius: 0,
1867
+ [`&.${accordionClasses.rounded}`]: {
1868
+ borderRadius
1869
+ },
2436
1870
  "&::before": {
2437
1871
  display: "none"
2438
1872
  },
2439
- // Position selectors switched from `:first-of-type` /
2440
- // `:last-of-type` to `:first-child` / `:last-child` —
2441
- // accordions are intended to be direct siblings, so the
2442
- // child-position form gives the correct result without
2443
- // depending on element-tag homogeneity (an interspersed
2444
- // <Divider /> would break the of-type form silently by
2445
- // making each accordion the only "of-type" sibling).
2446
- "&:first-child": {
2447
- borderTopLeftRadius: borderRadius,
2448
- borderTopRightRadius: borderRadius
2449
- },
2450
- "&:last-child": {
2451
- borderBottomLeftRadius: borderRadius,
2452
- borderBottomRightRadius: borderRadius
2453
- },
2454
- "&:not(:last-child)": {
2455
- borderBottom: 0
2456
- },
2457
- [`&.${accordionClasses.expanded}`]: {
2458
- margin: 0,
2459
- "&:first-child": { marginTop: 0 },
2460
- "&:last-child": { marginBottom: 0 }
2461
- },
2462
1873
  [`&.${accordionClasses.disabled}`]: {
2463
1874
  backgroundColor: "transparent"
2464
1875
  }
@@ -2468,6 +1879,7 @@ function componentOverrides(config) {
2468
1879
  MuiAccordionSummary: {
2469
1880
  styleOverrides: {
2470
1881
  root: ({ theme }) => ({
1882
+ ...theme.typography.body2,
2471
1883
  minHeight: 48 * dm,
2472
1884
  padding: `0 ${16 * dm}px`,
2473
1885
  fontWeight: 500,
@@ -2479,13 +1891,18 @@ function componentOverrides(config) {
2479
1891
  }
2480
1892
  }),
2481
1893
  content: {
1894
+ alignItems: "center",
1895
+ gap: 8 * dm,
1896
+ minWidth: 0,
2482
1897
  margin: `${12 * dm}px 0`,
2483
1898
  [`&.${accordionSummaryClasses.expanded}`]: {
2484
1899
  margin: `${12 * dm}px 0`
2485
1900
  }
2486
1901
  },
2487
1902
  expandIconWrapper: ({ theme }) => ({
2488
- color: paletteVar(theme, "text.secondary")
1903
+ color: paletteVar(theme, "text.secondary"),
1904
+ flexShrink: 0,
1905
+ marginInlineStart: 8 * dm
2489
1906
  })
2490
1907
  }
2491
1908
  },
@@ -2656,7 +2073,7 @@ function componentOverrides(config) {
2656
2073
  root: ({ theme }) => ({
2657
2074
  [`& .${tableCellClasses.head}`]: {
2658
2075
  fontWeight: 600,
2659
- backgroundColor: theme.vars?.palette.background.neutral || theme.palette.grey[50],
2076
+ backgroundColor: theme.vars?.palette.background.neutral || theme.palette.background.neutral || paletteVar(theme, "background.paper"),
2660
2077
  color: paletteVar(theme, "text.secondary")
2661
2078
  }
2662
2079
  })
@@ -2740,15 +2157,13 @@ function componentOverrides(config) {
2740
2157
  styleOverrides: {
2741
2158
  root: ({ theme }) => ({
2742
2159
  borderRadius,
2743
- variants: ["success", "error", "warning", "info"].map(
2744
- (severity) => ({
2745
- props: { severity, variant: "standard" },
2746
- style: {
2747
- backgroundColor: `rgba(${getColorChannel(theme, severity)} / 0.08)`,
2748
- color: theme.vars?.palette[severity].dark || theme.palette[severity].dark
2749
- }
2750
- })
2751
- )
2160
+ variants: ["success", "error", "warning", "info"].map((severity) => ({
2161
+ props: { severity, variant: "standard" },
2162
+ style: {
2163
+ backgroundColor: `rgba(${getColorChannel(theme, severity)} / 0.08)`,
2164
+ color: theme.vars?.palette[severity].dark || theme.palette[severity].dark
2165
+ }
2166
+ }))
2752
2167
  })
2753
2168
  }
2754
2169
  },
@@ -3251,31 +2666,13 @@ function componentOverrides(config) {
3251
2666
  html: {
3252
2667
  scrollBehavior: "smooth"
3253
2668
  },
3254
- body: {
3255
- scrollbarWidth: "thin",
3256
- scrollbarColor: `rgba(${getGreyChannel(theme)} / 0.4) rgba(${getGreyChannel(theme)} / 0.08)`
3257
- },
2669
+ "html, body, *": scrollbarStyles(theme),
3258
2670
  "*, *::before, *::after": {
3259
2671
  boxSizing: "border-box"
3260
2672
  },
3261
2673
  "#root, #__next": {
3262
2674
  height: "100%"
3263
2675
  },
3264
- // Webkit scrollbar styling
3265
- "::-webkit-scrollbar": {
3266
- width: 6,
3267
- height: 6
3268
- },
3269
- "::-webkit-scrollbar-track": {
3270
- backgroundColor: "transparent"
3271
- },
3272
- "::-webkit-scrollbar-thumb": {
3273
- backgroundColor: `rgba(${getGreyChannel(theme)} / 0.4)`,
3274
- borderRadius: 3
3275
- },
3276
- "::-webkit-scrollbar-thumb:hover": {
3277
- backgroundColor: `rgba(${getGreyChannel(theme)} / 0.6)`
3278
- },
3279
2676
  // Vision Mode Accessibility Filters
3280
2677
  // These apply SVG color matrix filters to simulate color blindness
3281
2678
  'html[data-vision="protanopia"]:not([data-showcase])': {
@@ -3785,6 +3182,159 @@ var arcticPreset = {
3785
3182
  main: "#1E88E5"
3786
3183
  }
3787
3184
  };
3185
+ var isRecord = (value) => !!value && typeof value === "object" && !Array.isArray(value);
3186
+ var owns = (value, key) => Object.prototype.hasOwnProperty.call(value, key);
3187
+ var roles = ["primary", "secondary", "success", "info", "warning", "error"];
3188
+ var shades = ["light", "dark", "lighter", "darker", "contrastText"];
3189
+ var colourKeys = /* @__PURE__ */ new Set(["main", ...shades, "primary", "secondary", "disabled", "default", "paper", "neutral", "divider", "active", "selected", "hover", "focus", "disabledBackground", "background", "onBackground", "black", "white"]);
3190
+ function staticChannel(value) {
3191
+ if (!/^(#[\da-f]{3,8}$|rgba?\(|hsla?\()/i.test(value)) return void 0;
3192
+ if (/^rgba?\(/i.test(value) && value.includes("%")) return void 0;
3193
+ try {
3194
+ const channel = colorChannel(/^hsl/i.test(value) ? hslToRgb(value) : value);
3195
+ const components = channel.split(" ");
3196
+ return components.length === 3 && components.every((part) => part !== "" && Number.isFinite(Number(part))) ? channel : void 0;
3197
+ } catch {
3198
+ return void 0;
3199
+ }
3200
+ }
3201
+ function channelFor(value) {
3202
+ return staticChannel(value) ?? `from ${value} r g b`;
3203
+ }
3204
+ function reconcileChannels(merged, supplied) {
3205
+ const result = { ...merged };
3206
+ for (const [key, value] of Object.entries(supplied)) {
3207
+ if (isRecord(value) && isRecord(result[key])) {
3208
+ result[key] = reconcileChannels(result[key], value);
3209
+ } else if (typeof value === "string" && !key.endsWith("Channel") && !owns(supplied, `${key}Channel`)) {
3210
+ const channel = staticChannel(value);
3211
+ if (channel !== void 0 || owns(merged, `${key}Channel`) || colourKeys.has(key)) {
3212
+ result[`${key}Channel`] = channel ?? channelFor(value);
3213
+ }
3214
+ }
3215
+ }
3216
+ return result;
3217
+ }
3218
+ function reconcilePaletteOverrides(merged, supplied, { nativeColor = false, cssVarPrefix = "prism" } = {}) {
3219
+ if (!supplied) return merged;
3220
+ const result = reconcileChannels(merged, supplied);
3221
+ for (const name of roles) {
3222
+ const input = supplied[name];
3223
+ if (!isRecord(input) || typeof input.main !== "string") continue;
3224
+ const role = { ...result[name] };
3225
+ const numeric = staticChannel(input.main) !== void 0;
3226
+ for (const shade of shades) {
3227
+ if (!owns(input, shade)) {
3228
+ delete role[shade];
3229
+ if (!owns(input, `${shade}Channel`)) delete role[`${shade}Channel`];
3230
+ }
3231
+ }
3232
+ if (!nativeColor && !numeric && ["light", "dark", "contrastText"].some((shade) => typeof role[shade] !== "string" || !role[shade])) {
3233
+ throw new Error(`Prism: palette.${name}.main cannot be resolved in JavaScript. Enable overrides.cssVariables.nativeColor or supply light, dark and contrastText explicitly.`);
3234
+ }
3235
+ const dark = result.mode === "dark";
3236
+ const mix = (colour, amount) => `color-mix(in oklch, ${input.main}, ${colour} ${amount * 100}%)`;
3237
+ role.lighter ??= numeric && !nativeColor ? dark ? darken(input.main, 0.75) : lighten(input.main, 0.9) : dark ? mix("#000", 0.75) : mix("#fff", 0.9);
3238
+ role.darker ??= numeric && !nativeColor ? dark ? lighten(input.main, 0.85) : darken(input.main, 0.7) : dark ? mix("#fff", 0.85) : mix("#000", 0.7);
3239
+ if (numeric && !nativeColor) {
3240
+ role.contrastText ??= getContrastRatio(input.main, "#fff") >= getContrastRatio(input.main, "#000") ? "#fff" : "#000";
3241
+ }
3242
+ for (const shade of shades) {
3243
+ if (owns(input, `${shade}Channel`)) continue;
3244
+ if (typeof role[shade] === "string") {
3245
+ role[`${shade}Channel`] = channelFor(role[shade]);
3246
+ } else if (nativeColor) {
3247
+ const prefix = cssVarPrefix ? `${cssVarPrefix}-` : "";
3248
+ role[`${shade}Channel`] = `from var(--${prefix}palette-${name}-${shade}) r g b`;
3249
+ }
3250
+ }
3251
+ result[name] = role;
3252
+ }
3253
+ return result;
3254
+ }
3255
+ function gridIcon(Icon) {
3256
+ return forwardRef(function GridIcon({ color, ...props }, ref) {
3257
+ const palette = color === "action" || color === "disabled" || color === "error" || color === "info" || color === "inherit" || color === "primary" || color === "secondary" || color === "success" || color === "warning";
3258
+ return /* @__PURE__ */ jsx(Icon, { ...props, ref, color: palette ? color : "inherit", htmlColor: palette ? void 0 : color });
3259
+ });
3260
+ }
3261
+ var grid = {
3262
+ MoreIcon: gridIcon(MoreIcon),
3263
+ ArrowUpIcon: gridIcon(ArrowUpIcon),
3264
+ ArrowDownIcon: gridIcon(ArrowDownIcon),
3265
+ FilterIcon: gridIcon(FilterIcon),
3266
+ TableIcon: gridIcon(TableIcon),
3267
+ DownloadIcon: gridIcon(DownloadIcon),
3268
+ CloseIcon: gridIcon(CloseIcon),
3269
+ SearchIcon: gridIcon(SearchIcon),
3270
+ AddIcon: gridIcon(AddIcon),
3271
+ RemoveIcon: gridIcon(RemoveIcon)
3272
+ };
3273
+ function prismIconDefaults() {
3274
+ const icons = {
3275
+ MuiSelect: { defaultProps: { IconComponent: ChevronDownIcon } },
3276
+ MuiNativeSelect: { defaultProps: { IconComponent: ChevronDownIcon } },
3277
+ MuiAutocomplete: {
3278
+ defaultProps: { popupIcon: /* @__PURE__ */ jsx(ChevronDownIcon, {}), clearIcon: /* @__PURE__ */ jsx(CloseIcon, { fontSize: "small" }) }
3279
+ },
3280
+ MuiRadio: { defaultProps: { icon: /* @__PURE__ */ jsx(RadioIcon, {}), checkedIcon: /* @__PURE__ */ jsx(RadioCheckedIcon, {}) } },
3281
+ MuiChip: { defaultProps: { deleteIcon: /* @__PURE__ */ jsx(CloseIcon, {}) } },
3282
+ MuiAlert: {
3283
+ defaultProps: {
3284
+ iconMapping: {
3285
+ success: /* @__PURE__ */ jsx(SuccessIcon, {}),
3286
+ info: /* @__PURE__ */ jsx(InfoIcon, {}),
3287
+ warning: /* @__PURE__ */ jsx(WarningIcon, {}),
3288
+ error: /* @__PURE__ */ jsx(ErrorIcon, {})
3289
+ },
3290
+ slots: { closeIcon: CloseIcon }
3291
+ }
3292
+ },
3293
+ MuiPaginationItem: {
3294
+ defaultProps: {
3295
+ slots: { previous: ChevronLeftIcon, next: ChevronRightIcon, first: FirstPageIcon, last: LastPageIcon }
3296
+ }
3297
+ },
3298
+ MuiTablePagination: {
3299
+ defaultProps: {
3300
+ slots: {
3301
+ actions: {
3302
+ firstButtonIcon: FirstPageIcon,
3303
+ previousButtonIcon: ChevronLeftIcon,
3304
+ nextButtonIcon: ChevronRightIcon,
3305
+ lastButtonIcon: LastPageIcon
3306
+ }
3307
+ }
3308
+ }
3309
+ },
3310
+ MuiTableSortLabel: { defaultProps: { IconComponent: ArrowDownIcon } },
3311
+ MuiBreadcrumbs: { defaultProps: { separator: /* @__PURE__ */ jsx(ChevronRightIcon, { fontSize: "inherit" }) } },
3312
+ MuiRating: {
3313
+ defaultProps: { icon: /* @__PURE__ */ jsx(StarIcon, { fontSize: "inherit" }), emptyIcon: /* @__PURE__ */ jsx(StarEmptyIcon, { fontSize: "inherit" }) }
3314
+ },
3315
+ MuiTabs: {
3316
+ defaultProps: { slots: { startScrollButtonIcon: ChevronLeftIcon, endScrollButtonIcon: ChevronRightIcon } }
3317
+ },
3318
+ MuiDataGrid: {
3319
+ defaultProps: {
3320
+ slots: {
3321
+ columnMenuIcon: grid.MoreIcon,
3322
+ columnSortedAscendingIcon: grid.ArrowUpIcon,
3323
+ columnSortedDescendingIcon: grid.ArrowDownIcon,
3324
+ columnFilteredIcon: grid.FilterIcon,
3325
+ columnSelectorIcon: grid.TableIcon,
3326
+ exportIcon: grid.DownloadIcon,
3327
+ openFilterButtonIcon: grid.FilterIcon,
3328
+ quickFilterIcon: grid.SearchIcon,
3329
+ quickFilterClearIcon: grid.CloseIcon,
3330
+ detailPanelExpandIcon: grid.AddIcon,
3331
+ detailPanelCollapseIcon: grid.RemoveIcon
3332
+ }
3333
+ }
3334
+ }
3335
+ };
3336
+ return icons;
3337
+ }
3788
3338
 
3789
3339
  // src/theme/presets/dracula.ts
3790
3340
  var draculaPurple = {
@@ -4424,7 +3974,13 @@ function deepMergeThemeOptions(base, overrides) {
4424
3974
  for (const key of Object.keys(overrides)) {
4425
3975
  const baseVal = base[key];
4426
3976
  const overrideVal = overrides[key];
4427
- if (overrideVal !== null && typeof overrideVal === "object" && !Array.isArray(overrideVal) && typeof overrideVal !== "function" && baseVal !== null && typeof baseVal === "object" && !Array.isArray(baseVal) && typeof baseVal !== "function") {
3977
+ if (key === "styleOverrides" && baseVal && overrideVal && typeof baseVal === "object" && typeof overrideVal === "object") {
3978
+ const slots = { ...baseVal };
3979
+ for (const [slot, style] of Object.entries(overrideVal)) {
3980
+ if (style !== void 0) slots[slot] = slots[slot] === void 0 ? style : [slots[slot], style];
3981
+ }
3982
+ result[key] = slots;
3983
+ } else if (overrideVal !== null && typeof overrideVal === "object" && !Array.isArray(overrideVal) && typeof overrideVal !== "function" && baseVal !== null && typeof baseVal === "object" && !Array.isArray(baseVal) && typeof baseVal !== "function") {
4428
3984
  result[key] = deepMergeThemeOptions(baseVal, overrideVal);
4429
3985
  } else {
4430
3986
  result[key] = overrideVal;
@@ -4517,7 +4073,13 @@ function createPrismTheme(options = {}) {
4517
4073
  // Component overrides with density support
4518
4074
  components: componentOverrides(componentsConfig)
4519
4075
  };
4520
- const finalOptions = overrides ? deepMergeThemeOptions(themeOptions, overrides) : themeOptions;
4076
+ const themedIcons = deepMergeThemeOptions(themeOptions, { components: prismIconDefaults() });
4077
+ const finalOptions = overrides ? deepMergeThemeOptions(themedIcons, overrides) : themedIcons;
4078
+ const variableOptions = typeof finalOptions.cssVariables === "object" ? finalOptions.cssVariables : void 0;
4079
+ finalOptions.palette = reconcilePaletteOverrides(finalOptions.palette, overrides?.palette, {
4080
+ nativeColor: variableOptions?.nativeColor,
4081
+ cssVarPrefix: variableOptions?.cssVarPrefix ?? cssVarPrefix
4082
+ });
4521
4083
  let theme = createTheme(finalOptions, muiLocale);
4522
4084
  if (responsiveFonts) {
4523
4085
  theme = responsiveFontSizes(theme);
@@ -4573,6 +4135,6 @@ function getPresetDisplayName(preset) {
4573
4135
  return PRESET_DISPLAY_NAMES[preset];
4574
4136
  }
4575
4137
 
4576
- export { COLOR_GROUPS, PRESET_DISPLAY_NAMES, PRESET_INHERENT_MODE, PRESET_NAMES, arcticPreset, baseColors, basic, blue, buildAction, buildBackground, buildChartColors, buildPalette, buildPaletteColor, buildText, buildVibrant, componentOverrides, createButtonBaseOverrides, createButtonGroupOverrides, createButtonOverrides, createPaletteColorFromScale, createPrismTheme, createShadows, createTypography, cssVarRgba, customScrollbarMixin, darkShadow, darken, defaultDarkPalette, defaultLightPalette, draculaPreset, emberPreset, focusRingMixin, generateColorScale, generateColorScaleWithChannels, generatePaletteColorWithChannels, getContrastRatio, getContrastText, getLuminance, getPresetDisplayName, glassMixin, green, grey, hexToHsl, hexToRgb, hexToRgbChannel, hideScrollbarMixin, hslToHex, invertColorScale, isLightColor, lightBlue, lighten, luxuryColors, luxuryError, luxuryInfo, luxuryNeutral, luxuryPrimary, luxurySecondary, luxurySuccess, luxuryWarning, midnightPreset, minimalPreset, mix, mixins, multiLineEllipsisMixin, orange, purple, red, retroPreset, rgbToHex, rgba, shadows, textEllipsisMixin, typography };
4577
- //# sourceMappingURL=chunk-ZTATTUH7.js.map
4578
- //# sourceMappingURL=chunk-ZTATTUH7.js.map
4138
+ export { COLOR_GROUPS, PRESET_DISPLAY_NAMES, PRESET_INHERENT_MODE, PRESET_NAMES, arcticPreset, baseColors, basic, blue, buildAction, buildBackground, buildChartColors, buildPalette, buildPaletteColor, buildText, buildVibrant, componentOverrides, createButtonBaseOverrides, createButtonGroupOverrides, createButtonOverrides, createPrismTheme, createShadows, createTypography, darkShadow, defaultDarkPalette, defaultLightPalette, draculaPreset, emberPreset, getPresetDisplayName, green, grey, lightBlue, luxuryColors, luxuryError, luxuryInfo, luxuryNeutral, luxuryPrimary, luxurySecondary, luxurySuccess, luxuryWarning, midnightPreset, minimalPreset, orange, purple, red, retroPreset, shadows, typography };
4139
+ //# sourceMappingURL=chunk-KQ67XB6T.js.map
4140
+ //# sourceMappingURL=chunk-KQ67XB6T.js.map