@apia/theme 0.1.0 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,174 +1,63 @@
1
- import { jsx, Fragment } from 'react/jsx-runtime';
2
- import { ThemeProvider as ThemeProvider$1, Box } from 'theme-ui';
3
- import { useState, createContext, useRef, Suspense } from 'react';
4
- import { cloneDeep, merge } from 'lodash';
5
- import { getValueByPath, EventEmitter, useMount, setValueByPath } from '@apia/util';
6
1
  import tinycolor from 'tinycolor2';
7
- import { focusOutline as focusOutline$1 } from '@apia/theme';
2
+ import { cloneDeep, merge } from 'lodash';
3
+ import { ThemeUIProvider, useThemeUI, Box, ThemeProvider } from 'theme-ui';
4
+ export { Alert, AspectImage, AspectRatio, Avatar, Badge, BaseStyles, Box, Button, Card, Checkbox, Close, CloseIcon, Container, Divider, Donut, Embed, Flex, Global, Grid, Heading, IconButton, Image, InitializeColorMode, Input, Label, Link, MenuButton, MenuIcon, Message, NavLink, Paragraph, Progress, Radio, Select, Slider, Spinner, Switch, Text, Textarea, createElement, css, get, jsx, merge, useColorMode, useThemeUI } from 'theme-ui';
5
+ export * from '@theme-ui/match-media';
6
+ import { EventEmitter, useMount, setValueByPath } from '@apia/util';
7
+ import { useState, useRef, useMemo, Suspense } from 'react';
8
+ import { jsx, Fragment } from 'react/jsx-runtime';
8
9
 
9
- function responsive$1(values) {
10
- var _a;
11
- const returnArray = [];
12
- const max = 6;
13
- for (let i = 0; i <= max; i++)
14
- returnArray[i + 1] = (_a = values[i]) != null ? _a : null;
15
- if (values.print)
16
- returnArray[0] = values.print;
17
- else {
18
- for (let i = 5; i >= 0; i--) {
19
- if (values[i] !== void 0)
20
- returnArray[0] = values[i];
21
- }
22
- }
23
- return returnArray;
10
+ function defaultLighten(color, ratio) {
11
+ return tinycolor(color).lighten(ratio != null ? ratio : 20).toRgbString();
24
12
  }
25
- function spacing(index) {
26
- var _a;
27
- return (_a = defaultPalette.spacing(index)) != null ? _a : index;
13
+ function defaultDarken(color, ratio) {
14
+ return tinycolor(color).darken(ratio != null ? ratio : 20).toRgbString();
28
15
  }
29
- const smallButton = {
30
- py: 2,
31
- px: 4,
32
- fontSize: "0.9em"
33
- };
34
- const focusOutline = {
35
- outlineColor: "outlineColor",
36
- outlineWidth: "3px",
37
- outlineStyle: "solid",
38
- outlineOffset: "-3px"
39
- };
40
- function getVariant(variant) {
41
- return { variant, "data-variant": variant };
16
+ function defaultGetContrastText(color) {
17
+ const current = tinycolor(color);
18
+ return tinycolor.readability("white", current) < tinycolor.readability("black", current) ? "black" : "white";
42
19
  }
43
-
44
- const opacity = {
45
- light: "#009",
46
- dark: "#fff"
47
- };
48
- const disabled = "#ccc";
49
- const spacingArray = Array(50).fill(1).map((_, i) => {
50
- return responsive$1({
51
- 0: Math.ceil(i / 2.5),
52
- 1: Math.ceil(i / 2.1),
53
- 2: Math.ceil(i / 1.7),
54
- 3: Math.ceil(i / 1.3),
55
- 4: i
56
- });
57
- });
58
- const defaultPalette = {
59
- action: {
60
- disabled,
61
- disabledOpacity: 0.6,
62
- active: opacity,
63
- activeOpacity: 0.4,
64
- focus: opacity,
65
- focusOpacity: 0.2,
66
- hover: opacity,
67
- hoverOpacity: 0.3,
68
- readonly: disabled,
69
- readonlyOpacity: 0.4,
70
- selected: opacity.light,
71
- selectedOpacity: 0.6
72
- },
73
- background: {
74
- default: "#f4f4f4",
75
- overlay: "rgba(0, 0, 0, 0.2)",
76
- paper: "white"
77
- },
78
- border: {
79
- article: "#cacaca",
80
- field: "#444",
81
- section: "#aaa"
82
- },
83
- common: {
84
- black: "black",
85
- white: "white"
86
- },
87
- info: {
88
- main: "#fff"
89
- },
90
- primary: {
91
- main: "#00496c"
92
- },
93
- secondary: {
94
- main: "#6c757d"
95
- },
96
- spacing: (index) => {
97
- return spacingArray[index];
98
- },
99
- text: {
100
- accent: "#609",
101
- disabled: "#555",
102
- icon: "white",
103
- link: "#00496c",
104
- primary: "#4a4a4a",
105
- secondary: "white",
106
- title: "#00496c"
107
- },
108
- error: {
109
- main: "#db7678",
110
- light: "#fff2f4"
111
- },
112
- success: {
113
- main: "#8bde8b",
114
- light: "#e7ffd9"
115
- },
116
- warning: {
117
- main: "#f8f588",
118
- light: "#fffdd9"
119
- },
120
- darkenRatio: 15,
121
- lightenRatio: 35,
122
- responsive: responsive$1,
123
- queryColumnsMultiplier: 2
124
- };
125
-
126
- var __defProp$n = Object.defineProperty;
127
- var __getOwnPropSymbols$n = Object.getOwnPropertySymbols;
128
- var __hasOwnProp$n = Object.prototype.hasOwnProperty;
129
- var __propIsEnum$n = Object.prototype.propertyIsEnumerable;
130
- var __defNormalProp$n = (obj, key, value) => key in obj ? __defProp$n(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
131
- var __spreadValues$n = (a, b) => {
132
- for (var prop in b || (b = {}))
133
- if (__hasOwnProp$n.call(b, prop))
134
- __defNormalProp$n(a, prop, b[prop]);
135
- if (__getOwnPropSymbols$n)
136
- for (var prop of __getOwnPropSymbols$n(b)) {
137
- if (__propIsEnum$n.call(b, prop))
138
- __defNormalProp$n(a, prop, b[prop]);
139
- }
140
- return a;
141
- };
142
- function buildColorsObject(definition) {
143
- return __spreadValues$n(__spreadValues$n({}, definition), definition.borderColor ? {
144
- borderLeftColor: definition.borderColor,
145
- borderRightColor: definition.borderColor,
146
- borderBottomColor: definition.borderColor,
147
- borderTopColor: definition.borderColor
148
- } : void 0);
20
+ function getValueByPath(obj, path, separator = ".") {
21
+ const actualPath = typeof path === "string" ? path.split(separator) : path;
22
+ if (typeof obj !== "object" || !obj) {
23
+ if (actualPath.length === 0)
24
+ return obj;
25
+ return void 0;
26
+ }
27
+ const currentStep = actualPath.shift();
28
+ if (actualPath.length === 0)
29
+ return obj[currentStep];
30
+ return getValueByPath(
31
+ obj[currentStep],
32
+ actualPath,
33
+ separator
34
+ );
149
35
  }
150
36
 
151
- var __defProp$m = Object.defineProperty;
152
- var __getOwnPropSymbols$m = Object.getOwnPropertySymbols;
153
- var __hasOwnProp$m = Object.prototype.hasOwnProperty;
154
- var __propIsEnum$m = Object.prototype.propertyIsEnumerable;
155
- var __defNormalProp$m = (obj, key, value) => key in obj ? __defProp$m(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
156
- var __spreadValues$m = (a, b) => {
37
+ var __defProp$p = Object.defineProperty;
38
+ var __getOwnPropSymbols$p = Object.getOwnPropertySymbols;
39
+ var __hasOwnProp$p = Object.prototype.hasOwnProperty;
40
+ var __propIsEnum$p = Object.prototype.propertyIsEnumerable;
41
+ var __defNormalProp$p = (obj, key, value) => key in obj ? __defProp$p(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
42
+ var __spreadValues$p = (a, b) => {
157
43
  for (var prop in b || (b = {}))
158
- if (__hasOwnProp$m.call(b, prop))
159
- __defNormalProp$m(a, prop, b[prop]);
160
- if (__getOwnPropSymbols$m)
161
- for (var prop of __getOwnPropSymbols$m(b)) {
162
- if (__propIsEnum$m.call(b, prop))
163
- __defNormalProp$m(a, prop, b[prop]);
44
+ if (__hasOwnProp$p.call(b, prop))
45
+ __defNormalProp$p(a, prop, b[prop]);
46
+ if (__getOwnPropSymbols$p)
47
+ for (var prop of __getOwnPropSymbols$p(b)) {
48
+ if (__propIsEnum$p.call(b, prop))
49
+ __defNormalProp$p(a, prop, b[prop]);
164
50
  }
165
51
  return a;
166
52
  };
167
- const getColorState = (definition, state) => {
53
+ const getColorState = (definition, state, theme) => {
168
54
  var _a, _b, _c, _d;
55
+ if (typeof state !== "string") {
56
+ console.log("getColorState", { definition, state, theme });
57
+ }
169
58
  if (state === "default")
170
- return buildColorsObject(definition);
171
- const palette = getPalette();
59
+ return theme.palette.buildColorsObject(definition);
60
+ const palette = theme.palette;
172
61
  const opacity = palette.action[`${state}Opacity`];
173
62
  const actualState = state === "checked" ? "selected" : state;
174
63
  definition = Object.fromEntries(
@@ -194,15 +83,13 @@ const getColorState = (definition, state) => {
194
83
  tinycolor((_b = definition.backgroundColor) != null ? _b : "").isLight() ? palette.action[actualState].light : palette.action[actualState].dark,
195
84
  100 * opacity
196
85
  ).toRgbString();
197
- return buildColorsObject(__spreadValues$m(__spreadValues$m({}, definition.backgroundColor ? {
86
+ return theme.palette.buildColorsObject(__spreadValues$p(__spreadValues$p({}, definition.backgroundColor ? {
198
87
  backgroundColor: state === "checked" ? (_c = definition.backgroundColor) != null ? _c : "" : calculatedBackgroundColor,
199
88
  color: state === "checked" ? tinycolor.mix(
200
89
  tinycolor((_d = definition.color) != null ? _d : "black"),
201
90
  tinycolor(palette.action.selected.dark),
202
91
  100 * palette.action.selectedOpacity
203
- ).toRgbString() : window.currentPalette.getContrastText(
204
- calculatedBackgroundColor
205
- )
92
+ ).toRgbString() : theme.palette.getContrastText(calculatedBackgroundColor)
206
93
  } : null), definition.borderColor ? {
207
94
  borderColor: tinycolor.mix(
208
95
  definition.borderColor,
@@ -212,52 +99,56 @@ const getColorState = (definition, state) => {
212
99
  } : null));
213
100
  };
214
101
 
215
- const applyStatesGetColor = (definition, states) => {
102
+ const applyStatesGetColor = (definition, theme, states) => {
216
103
  const newStates = (states == null ? void 0 : states.default) !== false ? cloneDeep(definition) : {};
104
+ newStates.path = { fill: definition.color };
217
105
  if ((states == null ? void 0 : states.active) !== false) {
218
- newStates.active = getColorState(definition, "active");
106
+ newStates.active = getColorState(definition, "active", theme);
219
107
  }
220
108
  if ((states == null ? void 0 : states.disabled) !== false) {
221
- newStates.disabled = getColorState(definition, "disabled");
109
+ newStates.disabled = getColorState(definition, "disabled", theme);
222
110
  }
223
111
  if ((states == null ? void 0 : states.focus) !== false) {
224
- newStates.focus = getColorState(definition, "focus");
112
+ newStates.focus = getColorState(definition, "focus", theme);
225
113
  }
226
114
  if ((states == null ? void 0 : states.hover) !== false) {
227
- newStates.hover = getColorState(definition, "hover");
115
+ newStates.hover = getColorState(definition, "hover", theme);
228
116
  }
229
117
  if ((states == null ? void 0 : states.readonly) !== false) {
230
- newStates.readonly = getColorState(definition, "readonly");
118
+ newStates.readonly = getColorState(definition, "readonly", theme);
231
119
  }
232
120
  if ((states == null ? void 0 : states.selected) !== false) {
233
- newStates.selected = getColorState(definition, "selected");
121
+ newStates.selected = getColorState(definition, "selected", theme);
234
122
  }
235
123
  if ((states == null ? void 0 : states.checked) !== false) {
236
- newStates.checked = getColorState(definition, "checked");
124
+ newStates.checked = getColorState(definition, "checked", theme);
237
125
  }
238
126
  return newStates;
239
127
  };
240
128
 
241
- function applyStates(properties, states) {
242
- properties.forEach((def) => {
129
+ function applyStates(properties, theme, states) {
130
+ var _a;
131
+ (_a = properties.forEach) == null ? void 0 : _a.call(properties, (def) => {
243
132
  Object.entries(def).forEach(([key, value]) => {
244
133
  if (typeof value === "string")
245
134
  return;
246
135
  const definition = value;
247
- if (!definition.active)
248
- definition.active = {};
249
- if (!definition.checked)
250
- definition.checked = {};
251
- if (!definition.focus)
252
- definition.focus = {};
253
- if (!definition.disabled)
254
- definition.disabled = {};
255
- if (!definition.hover)
256
- definition.hover = {};
257
- if (!definition.selected)
258
- definition.selected = {};
259
- const newDefinition = applyStatesGetColor(definition, states);
260
- def[key] = merge(newDefinition, definition);
136
+ if (typeof definition !== "string" && !definition.preventParse) {
137
+ if (!definition.active)
138
+ definition.active = {};
139
+ if (!definition.checked)
140
+ definition.checked = {};
141
+ if (!definition.focus)
142
+ definition.focus = {};
143
+ if (!definition.disabled)
144
+ definition.disabled = {};
145
+ if (!definition.hover)
146
+ definition.hover = {};
147
+ if (!definition.selected)
148
+ definition.selected = {};
149
+ const newDefinition = applyStatesGetColor(definition, theme, states);
150
+ def[key] = merge(newDefinition, definition);
151
+ }
261
152
  });
262
153
  });
263
154
  }
@@ -266,15 +157,117 @@ function isColorDefinition(value) {
266
157
  return !!value && typeof value === "object" && "main" in value;
267
158
  }
268
159
 
269
- function defaultLighten(color, ratio) {
270
- return tinycolor(color).lighten(ratio != null ? ratio : 20).toRgbString();
160
+ const actions = { dark: "#cce5ff", light: "#557" };
161
+ const spacingArray = Array(50).fill(1).map((_, i) => {
162
+ return responsive$1({
163
+ 0: Math.ceil(i / 2.5),
164
+ 1: Math.ceil(i / 2.1),
165
+ 2: Math.ceil(i / 1.7),
166
+ 3: Math.ceil(i / 1.3),
167
+ 4: i
168
+ });
169
+ });
170
+ const defaultPalette = {
171
+ action: {
172
+ disabled: "#d9d9d9",
173
+ disabledOpacity: 1,
174
+ active: actions,
175
+ activeOpacity: 0.45,
176
+ focus: actions,
177
+ focusOpacity: 0.05,
178
+ hover: actions,
179
+ hoverOpacity: 0.1,
180
+ readonly: actions,
181
+ readonlyOpacity: 0.4,
182
+ selected: "rgb(204 214 222)",
183
+ selectedOpacity: 1
184
+ },
185
+ background: {
186
+ default: "#f4f4f4",
187
+ overlay: "rgba(0, 0, 0, 0.2)",
188
+ paper: "white"
189
+ },
190
+ border: {
191
+ article: "#cacaca",
192
+ field: "#444",
193
+ section: "#aaa"
194
+ },
195
+ common: {
196
+ black: "black",
197
+ white: "white"
198
+ },
199
+ info: {
200
+ main: "#fff"
201
+ },
202
+ primary: {
203
+ main: "#00496c"
204
+ },
205
+ secondary: {
206
+ main: "#6c757d"
207
+ },
208
+ spacing: (index) => {
209
+ return spacingArray[index];
210
+ },
211
+ text: {
212
+ accent: "#609",
213
+ disabled: "#555",
214
+ icon: "white",
215
+ link: "#00496c",
216
+ primary: "#4a4a4a",
217
+ secondary: "white",
218
+ title: "#00496c"
219
+ },
220
+ error: {
221
+ main: "rgb(187,12,15)",
222
+ light: "#fff2f4"
223
+ },
224
+ success: {
225
+ main: "#8bde8b",
226
+ light: "#e7ffd9"
227
+ },
228
+ warning: {
229
+ main: "#f8f588",
230
+ light: "#fffdd9"
231
+ },
232
+ darkenRatio: 15,
233
+ lightenRatio: 35,
234
+ responsive: responsive$1,
235
+ queryColumnsMultiplier: 2
236
+ };
237
+
238
+ function responsive$1(values) {
239
+ var _a;
240
+ const returnArray = [];
241
+ const max = 6;
242
+ for (let i = 0; i <= max; i++)
243
+ returnArray[i + 1] = (_a = values[i]) != null ? _a : null;
244
+ if (values.print)
245
+ returnArray[0] = values.print;
246
+ else {
247
+ for (let i = 5; i >= 0; i--) {
248
+ if (values[i] !== void 0)
249
+ returnArray[0] = values[i];
250
+ }
251
+ }
252
+ return returnArray;
271
253
  }
272
- function defaultDarken(color, ratio) {
273
- return tinycolor(color).darken(ratio != null ? ratio : 20).toRgbString();
254
+ function spacing(index) {
255
+ var _a;
256
+ return (_a = defaultPalette.spacing(index)) != null ? _a : index;
274
257
  }
275
- function defaultGetContrastText(color) {
276
- const current = tinycolor(color);
277
- return tinycolor.readability("white", current) < tinycolor.readability("black", current) ? "black" : "white";
258
+ const smallButton = {
259
+ py: 2,
260
+ px: 4,
261
+ fontSize: "0.9em"
262
+ };
263
+ const focusOutline = {
264
+ outlineColor: "outlineColor",
265
+ outlineWidth: "3px",
266
+ outlineStyle: "solid",
267
+ outlineOffset: "-3px"
268
+ };
269
+ function getVariant(variant) {
270
+ return { variant, "data-variant": variant };
278
271
  }
279
272
 
280
273
  const buildStateObject = (props, state) => {
@@ -332,77 +325,118 @@ const buildStateObject = (props, state) => {
332
325
  }
333
326
  };
334
327
 
335
- function getColorsByPath(path, options) {
336
- return merge(
337
- buildColorsObject({
338
- color: `${path}.color`,
339
- backgroundColor: `${path}.backgroundColor`,
328
+ var __defProp$o = Object.defineProperty;
329
+ var __getOwnPropSymbols$o = Object.getOwnPropertySymbols;
330
+ var __hasOwnProp$o = Object.prototype.hasOwnProperty;
331
+ var __propIsEnum$o = Object.prototype.propertyIsEnumerable;
332
+ var __defNormalProp$o = (obj, key, value) => key in obj ? __defProp$o(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
333
+ var __spreadValues$o = (a, b) => {
334
+ for (var prop in b || (b = {}))
335
+ if (__hasOwnProp$o.call(b, prop))
336
+ __defNormalProp$o(a, prop, b[prop]);
337
+ if (__getOwnPropSymbols$o)
338
+ for (var prop of __getOwnPropSymbols$o(b)) {
339
+ if (__propIsEnum$o.call(b, prop))
340
+ __defNormalProp$o(a, prop, b[prop]);
341
+ }
342
+ return a;
343
+ };
344
+ function buildColorsObject(definition) {
345
+ return __spreadValues$o(__spreadValues$o({}, definition), definition.borderColor ? {
346
+ borderLeftColor: definition.borderColor,
347
+ borderRightColor: definition.borderColor,
348
+ borderBottomColor: definition.borderColor,
349
+ borderTopColor: definition.borderColor
350
+ } : void 0);
351
+ }
352
+
353
+ function getColorsByPath(path, options) {
354
+ return merge(
355
+ buildColorsObject({
356
+ color: `${path}.color`,
357
+ backgroundColor: `${path}.backgroundColor`,
340
358
  borderColor: `${path}.borderColor`
341
359
  }),
342
360
  options == null ? void 0 : options.mergeObject
343
361
  );
344
362
  }
345
363
 
346
- var __defProp$l = Object.defineProperty;
347
- var __getOwnPropSymbols$l = Object.getOwnPropertySymbols;
348
- var __hasOwnProp$l = Object.prototype.hasOwnProperty;
349
- var __propIsEnum$l = Object.prototype.propertyIsEnumerable;
350
- var __defNormalProp$l = (obj, key, value) => key in obj ? __defProp$l(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
351
- var __spreadValues$l = (a, b) => {
364
+ var __defProp$n = Object.defineProperty;
365
+ var __getOwnPropSymbols$n = Object.getOwnPropertySymbols;
366
+ var __hasOwnProp$n = Object.prototype.hasOwnProperty;
367
+ var __propIsEnum$n = Object.prototype.propertyIsEnumerable;
368
+ var __defNormalProp$n = (obj, key, value) => key in obj ? __defProp$n(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
369
+ var __spreadValues$n = (a, b) => {
352
370
  for (var prop in b || (b = {}))
353
- if (__hasOwnProp$l.call(b, prop))
354
- __defNormalProp$l(a, prop, b[prop]);
355
- if (__getOwnPropSymbols$l)
356
- for (var prop of __getOwnPropSymbols$l(b)) {
357
- if (__propIsEnum$l.call(b, prop))
358
- __defNormalProp$l(a, prop, b[prop]);
371
+ if (__hasOwnProp$n.call(b, prop))
372
+ __defNormalProp$n(a, prop, b[prop]);
373
+ if (__getOwnPropSymbols$n)
374
+ for (var prop of __getOwnPropSymbols$n(b)) {
375
+ if (__propIsEnum$n.call(b, prop))
376
+ __defNormalProp$n(a, prop, b[prop]);
359
377
  }
360
378
  return a;
361
379
  };
362
- function getColorsAndStatesByPath(path, options) {
363
- var _a, _b, _c, _d, _e, _f, _g, _h;
364
- const active = getColorsByPath(`${path}.active`, options);
365
- const checked = getColorsByPath(`${path}.checked`, options);
366
- const disabled = __spreadValues$l({
380
+ function getColorsAndStatesByPath(incomingPath, options) {
381
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i;
382
+ const active = getColorsByPath(`${incomingPath}.active`, options);
383
+ const checked = getColorsByPath(`${incomingPath}.checked`, options);
384
+ const disabled = __spreadValues$n({
367
385
  cursor: "not-allowed"
368
- }, getColorsByPath(`${path}.disabled`, options));
369
- const hover = getColorsByPath(`${path}.hover`, options);
370
- const focus = ((_a = options == null ? void 0 : options.states) == null ? void 0 : _a.focus) !== false ? getColorsByPath(`${path}.focus`, options) : {};
371
- const readonly = __spreadValues$l({
386
+ }, getColorsByPath(`${incomingPath}.disabled`, options));
387
+ const hover = getColorsByPath(`${incomingPath}.hover`, options);
388
+ const focus = ((_a = options == null ? void 0 : options.states) == null ? void 0 : _a.focus) !== false ? getColorsByPath(`${incomingPath}.focus`, options) : {};
389
+ const readonly = __spreadValues$n({
372
390
  cursor: "notAllowed"
373
- }, getColorsByPath(`${path}.readonly`, options));
374
- const selected = getColorsByPath(`${path}.selected`, options);
391
+ }, getColorsByPath(`${incomingPath}.readonly`, options));
392
+ const selected = getColorsByPath(`${incomingPath}.selected`, options);
393
+ let path = {};
394
+ if ((_b = options == null ? void 0 : options.states) == null ? void 0 : _b.path) {
395
+ path = { path: { fill: `${incomingPath}.color` } };
396
+ }
375
397
  return merge(
376
- __spreadValues$l(__spreadValues$l(__spreadValues$l(__spreadValues$l(__spreadValues$l(__spreadValues$l(__spreadValues$l(__spreadValues$l({}, ((_b = options == null ? void 0 : options.states) == null ? void 0 : _b.default) !== false ? getColorsByPath(path, options) : null), ((_c = options == null ? void 0 : options.states) == null ? void 0 : _c.checked) !== false ? buildStateObject(checked, "checked") : null), buildStateObject(focus, "focus")), ((_d = options == null ? void 0 : options.states) == null ? void 0 : _d.hover) !== false ? buildStateObject(hover, "hover") : null), ((_e = options == null ? void 0 : options.states) == null ? void 0 : _e.selected) !== false ? buildStateObject(selected, "selected") : null), ((_f = options == null ? void 0 : options.states) == null ? void 0 : _f.active) !== false ? buildStateObject(active, "active") : null), ((_g = options == null ? void 0 : options.states) == null ? void 0 : _g.disabled) !== false ? buildStateObject(disabled, "disabled") : null), ((_h = options == null ? void 0 : options.states) == null ? void 0 : _h.readonly) !== false ? buildStateObject(readonly, "readonly") : null),
398
+ __spreadValues$n(__spreadValues$n(__spreadValues$n(__spreadValues$n(__spreadValues$n(__spreadValues$n(__spreadValues$n(__spreadValues$n({}, ((_c = options == null ? void 0 : options.states) == null ? void 0 : _c.default) !== false ? getColorsByPath(incomingPath, options) : null), ((_d = options == null ? void 0 : options.states) == null ? void 0 : _d.checked) !== false ? buildStateObject(checked, "checked") : null), buildStateObject(focus, "focus")), ((_e = options == null ? void 0 : options.states) == null ? void 0 : _e.hover) !== false ? buildStateObject(hover, "hover") : null), ((_f = options == null ? void 0 : options.states) == null ? void 0 : _f.selected) !== false ? buildStateObject(selected, "selected") : null), ((_g = options == null ? void 0 : options.states) == null ? void 0 : _g.active) !== false ? buildStateObject(active, "active") : null), ((_h = options == null ? void 0 : options.states) == null ? void 0 : _h.disabled) !== false ? buildStateObject(disabled, "disabled") : null), ((_i = options == null ? void 0 : options.states) == null ? void 0 : _i.readonly) !== false ? buildStateObject(readonly, "readonly") : null),
399
+ path,
377
400
  options == null ? void 0 : options.mergeObject
378
401
  );
379
402
  }
380
403
 
381
- var __defProp$k = Object.defineProperty;
382
- var __getOwnPropSymbols$k = Object.getOwnPropertySymbols;
383
- var __hasOwnProp$k = Object.prototype.hasOwnProperty;
384
- var __propIsEnum$k = Object.prototype.propertyIsEnumerable;
385
- var __defNormalProp$k = (obj, key, value) => key in obj ? __defProp$k(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
386
- var __spreadValues$k = (a, b) => {
404
+ var __defProp$m = Object.defineProperty;
405
+ var __getOwnPropSymbols$m = Object.getOwnPropertySymbols;
406
+ var __hasOwnProp$m = Object.prototype.hasOwnProperty;
407
+ var __propIsEnum$m = Object.prototype.propertyIsEnumerable;
408
+ var __defNormalProp$m = (obj, key, value) => key in obj ? __defProp$m(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
409
+ var __spreadValues$m = (a, b) => {
387
410
  for (var prop in b || (b = {}))
388
- if (__hasOwnProp$k.call(b, prop))
389
- __defNormalProp$k(a, prop, b[prop]);
390
- if (__getOwnPropSymbols$k)
391
- for (var prop of __getOwnPropSymbols$k(b)) {
392
- if (__propIsEnum$k.call(b, prop))
393
- __defNormalProp$k(a, prop, b[prop]);
411
+ if (__hasOwnProp$m.call(b, prop))
412
+ __defNormalProp$m(a, prop, b[prop]);
413
+ if (__getOwnPropSymbols$m)
414
+ for (var prop of __getOwnPropSymbols$m(b)) {
415
+ if (__propIsEnum$m.call(b, prop))
416
+ __defNormalProp$m(a, prop, b[prop]);
394
417
  }
395
418
  return a;
396
419
  };
397
- const getColorStates = (definition, states) => {
398
- return __spreadValues$k(__spreadValues$k(__spreadValues$k(__spreadValues$k(__spreadValues$k(__spreadValues$k(__spreadValues$k(__spreadValues$k({}, (states == null ? void 0 : states.default) !== false ? definition : null), (states == null ? void 0 : states.checked) !== false ? buildStateObject(getColorState(definition, "checked"), "checked") : null), buildStateObject(getColorState(definition, "focus"), "focus")), (states == null ? void 0 : states.selected) !== false ? buildStateObject(getColorState(definition, "selected"), "selected") : null), (states == null ? void 0 : states.hover) !== false ? buildStateObject(getColorState(definition, "hover"), "hover") : null), (states == null ? void 0 : states.active) !== false ? buildStateObject(getColorState(definition, "active"), "active") : null), (states == null ? void 0 : states.disabled) !== false ? buildStateObject(getColorState(definition, "disabled"), "disabled") : null), (states == null ? void 0 : states.readonly) !== false ? buildStateObject(getColorState(definition, "readonly"), "readonly") : null);
420
+ const getColorStates = (definition, theme, states) => {
421
+ return __spreadValues$m(__spreadValues$m(__spreadValues$m(__spreadValues$m(__spreadValues$m(__spreadValues$m(__spreadValues$m(__spreadValues$m({}, (states == null ? void 0 : states.default) !== false ? definition : null), (states == null ? void 0 : states.checked) !== false ? buildStateObject(getColorState(definition, "checked", theme), "checked") : null), buildStateObject(getColorState(definition, "focus", theme), "focus")), (states == null ? void 0 : states.selected) !== false ? buildStateObject(
422
+ getColorState(definition, "selected", theme),
423
+ "selected"
424
+ ) : null), (states == null ? void 0 : states.hover) !== false ? buildStateObject(getColorState(definition, "hover", theme), "hover") : null), (states == null ? void 0 : states.active) !== false ? buildStateObject(getColorState(definition, "active", theme), "active") : null), (states == null ? void 0 : states.disabled) !== false ? buildStateObject(
425
+ getColorState(definition, "disabled", theme),
426
+ "disabled"
427
+ ) : null), (states == null ? void 0 : states.readonly) !== false ? buildStateObject(
428
+ getColorState(definition, "readonly", theme),
429
+ "readonly"
430
+ ) : null);
399
431
  };
400
432
 
401
- const getOneColorState = (color, state) => {
433
+ const getOneColorState = (color, state, theme) => {
434
+ if (typeof color !== "string")
435
+ return "";
402
436
  if (state === "default")
403
437
  return color;
404
438
  const actualState = state === "checked" ? "selected" : state;
405
- const palette = getPalette();
439
+ const palette = theme.palette;
406
440
  const opacity = palette.action[`${state}Opacity`];
407
441
  return tinycolor.mix(
408
442
  color,
@@ -411,16 +445,97 @@ const getOneColorState = (color, state) => {
411
445
  ).toRgbString();
412
446
  };
413
447
 
414
- function parsePalette(palette) {
448
+ var __defProp$l = Object.defineProperty;
449
+ var __getOwnPropSymbols$l = Object.getOwnPropertySymbols;
450
+ var __hasOwnProp$l = Object.prototype.hasOwnProperty;
451
+ var __propIsEnum$l = Object.prototype.propertyIsEnumerable;
452
+ var __defNormalProp$l = (obj, key, value) => key in obj ? __defProp$l(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
453
+ var __spreadValues$l = (a, b) => {
454
+ for (var prop in b || (b = {}))
455
+ if (__hasOwnProp$l.call(b, prop))
456
+ __defNormalProp$l(a, prop, b[prop]);
457
+ if (__getOwnPropSymbols$l)
458
+ for (var prop of __getOwnPropSymbols$l(b)) {
459
+ if (__propIsEnum$l.call(b, prop))
460
+ __defNormalProp$l(a, prop, b[prop]);
461
+ }
462
+ return a;
463
+ };
464
+ function getColorsByDefinition(definition, options) {
465
+ return merge(
466
+ buildColorsObject(__spreadValues$l(__spreadValues$l(__spreadValues$l({}, definition.color ? { color: definition.color } : null), definition.backgroundColor ? { backgroundColor: definition.backgroundColor } : null), definition.borderColor ? {
467
+ borderColor: definition.borderColor
468
+ } : null)),
469
+ options == null ? void 0 : options.mergeObject
470
+ );
471
+ }
472
+
473
+ function getColorsAndStatesByDefinition(definition, theme, options) {
474
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i;
475
+ const active = getColorState(definition, "active", theme);
476
+ const checked = getColorState(definition, "checked", theme);
477
+ const disabled = getColorState(definition, "disabled", theme);
478
+ const focus = ((_a = options == null ? void 0 : options.states) == null ? void 0 : _a.focus) ? getColorState(definition, "focus", theme) : {};
479
+ const hover = getColorState(definition, "hover", theme);
480
+ const readonly = getColorState(definition, "readonly", theme);
481
+ const selected = getColorState(definition, "selected", theme);
482
+ return merge(
483
+ ((_b = options == null ? void 0 : options.states) == null ? void 0 : _b.default) !== false ? getColorsByDefinition(definition) : null,
484
+ ((_c = options == null ? void 0 : options.states) == null ? void 0 : _c.checked) !== false ? buildStateObject(checked, "checked") : {},
485
+ ((_d = options == null ? void 0 : options.states) == null ? void 0 : _d.focus) !== false ? buildStateObject(focus, "focus") : {},
486
+ ((_e = options == null ? void 0 : options.states) == null ? void 0 : _e.hover) !== false ? buildStateObject(hover, "hover") : {},
487
+ ((_f = options == null ? void 0 : options.states) == null ? void 0 : _f.active) !== false ? buildStateObject(active, "active") : {},
488
+ ((_g = options == null ? void 0 : options.states) == null ? void 0 : _g.selected) !== false ? buildStateObject(selected, "selected") : {},
489
+ ((_h = options == null ? void 0 : options.states) == null ? void 0 : _h.disabled) !== false ? buildStateObject(disabled, "disabled") : {},
490
+ ((_i = options == null ? void 0 : options.states) == null ? void 0 : _i.readonly) !== false ? buildStateObject(readonly, "readonly") : {},
491
+ options == null ? void 0 : options.mergeObject
492
+ );
493
+ }
494
+
495
+ function paletteFunction(callback) {
496
+ return (...args) => {
497
+ const firstParameter = args[0];
498
+ let isFirstParameterATheme = false;
499
+ const themeProps = [
500
+ "fontSizes",
501
+ "breakpoints",
502
+ "fonts",
503
+ "lineHeights",
504
+ "letterSpacings",
505
+ "radii",
506
+ "zIndices",
507
+ "useRootStyles"
508
+ ];
509
+ if (firstParameter instanceof Object && firstParameter !== null) {
510
+ const firstParameterKeys = Object.keys(firstParameter);
511
+ for (const key of firstParameterKeys) {
512
+ if (themeProps.includes(key)) {
513
+ isFirstParameterATheme = true;
514
+ break;
515
+ }
516
+ }
517
+ }
518
+ if (isFirstParameterATheme) ; else {
519
+ return callback(...args);
520
+ }
521
+ };
522
+ }
523
+ function parsePalette(palette, theme) {
415
524
  var _a, _b, _c, _d, _e, _f, _g, _h;
416
525
  const newPalette = cloneDeep(palette);
417
- newPalette.lightenColor = (_a = palette.lightenColor) != null ? _a : (color, ratio) => {
418
- return defaultLighten(color, ratio != null ? ratio : palette.lightenRatio);
419
- };
420
- newPalette.darkenColor = (_b = palette.darkenColor) != null ? _b : (color, ratio) => {
421
- return defaultDarken(color, ratio != null ? ratio : palette.darkenRatio);
422
- };
423
- newPalette.getContrastText = (_c = palette.getContrastText) != null ? _c : defaultGetContrastText;
526
+ newPalette.lightenColor = paletteFunction(
527
+ (_a = palette.lightenColor) != null ? _a : (color, ratio) => {
528
+ return defaultLighten(color, ratio != null ? ratio : palette.lightenRatio);
529
+ }
530
+ );
531
+ newPalette.darkenColor = paletteFunction(
532
+ (_b = palette.darkenColor) != null ? _b : (color, ratio) => {
533
+ return defaultDarken(color, ratio != null ? ratio : palette.darkenRatio);
534
+ }
535
+ );
536
+ newPalette.getContrastText = paletteFunction(
537
+ (_c = palette.getContrastText) != null ? _c : defaultGetContrastText
538
+ );
424
539
  Object.entries(palette).forEach(([key, value]) => {
425
540
  var _a2, _b2, _c2;
426
541
  const castedValue = value;
@@ -456,17 +571,33 @@ function parsePalette(palette) {
456
571
  newPalette.action.hover = parseAction(newPalette.action.hover);
457
572
  newPalette.action.readonly = parseAction(newPalette.action.readonly);
458
573
  newPalette.action.selected = parseAction(newPalette.action.selected);
459
- newPalette.buildStateObject = buildStateObject;
460
- newPalette.getColor = getOneColorState;
461
- newPalette.getStatesForColors = applyStatesGetColor;
462
- newPalette.getOneState = getColorState;
463
- newPalette.getStatesFromDefinition = getColorStates;
464
- newPalette.getStatesFromPath = getColorsAndStatesByPath;
465
574
  newPalette.gray = (_g = newPalette.gray) != null ? _g : {};
466
575
  for (let i = 1; i <= 18; i++) {
467
576
  const index = Math.round((255 - 255 / 18) / 18 * i);
468
577
  newPalette.gray[i * 50] = (_h = newPalette.gray[i * 50]) != null ? _h : `rgb(${index},${index},${index})`;
469
578
  }
579
+ newPalette.applyStates = paletteFunction(applyStates);
580
+ newPalette.buildColorsObject = paletteFunction(buildColorsObject);
581
+ newPalette.buildStateObject = paletteFunction(buildStateObject);
582
+ newPalette.getColor = paletteFunction(
583
+ (color, state) => getOneColorState(color, state, theme)
584
+ );
585
+ newPalette.getStatesForColors = paletteFunction(
586
+ (definition, states) => applyStatesGetColor(definition, theme, states)
587
+ );
588
+ newPalette.getOneState = paletteFunction(
589
+ (definition, state) => getColorState(definition, state, theme)
590
+ );
591
+ newPalette.getColorStates = paletteFunction(
592
+ (definition, state) => getColorStates(definition, theme, state)
593
+ );
594
+ newPalette.getStatesFromDefinition = paletteFunction(
595
+ (definition, states) => getColorsAndStatesByDefinition(definition, theme, states)
596
+ );
597
+ newPalette.getStatesFromPath = paletteFunction(getColorsAndStatesByPath);
598
+ newPalette.getSelectedColors = paletteFunction(
599
+ () => getSelectedColors(theme)
600
+ );
470
601
  return newPalette;
471
602
  }
472
603
 
@@ -483,34 +614,146 @@ const schemas = {
483
614
  grey: ["#b1b5ba", "#d2d5d6", "#dee0e0", "#bdbdbb", "#9fa19c", "#686e67"]
484
615
  };
485
616
 
486
- var __defProp$j = Object.defineProperty;
487
- var __defProps$a = Object.defineProperties;
488
- var __getOwnPropDescs$a = Object.getOwnPropertyDescriptors;
489
- var __getOwnPropSymbols$j = Object.getOwnPropertySymbols;
490
- var __hasOwnProp$j = Object.prototype.hasOwnProperty;
491
- var __propIsEnum$j = Object.prototype.propertyIsEnumerable;
492
- var __defNormalProp$j = (obj, key, value) => key in obj ? __defProp$j(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
493
- var __spreadValues$j = (a, b) => {
617
+ const components$1 = (theme) => {
618
+ const palette = theme.palette;
619
+ return {
620
+ datagrid: {
621
+ borderColor: palette.background.paper,
622
+ header: {
623
+ backgroundColor: palette.background.default,
624
+ color: palette.text.primary,
625
+ borderColor: palette.background.default
626
+ },
627
+ body: {
628
+ preventParse: true,
629
+ backgroundColor: palette.background.paper,
630
+ evenRowsBackgroundColor: palette.darkenColor(
631
+ palette.background.paper,
632
+ 3
633
+ ),
634
+ color: palette.text.primary,
635
+ borderColor: palette.gray["800"],
636
+ selectedRows: {
637
+ borderColor: palette.gray["800"],
638
+ backgroundColor: palette.getOneState(
639
+ { backgroundColor: palette.background.paper },
640
+ "selected"
641
+ ).backgroundColor,
642
+ color: palette.getContrastText(
643
+ palette.getOneState(
644
+ { backgroundColor: palette.background.paper },
645
+ "selected"
646
+ ).backgroundColor
647
+ )
648
+ }
649
+ }
650
+ },
651
+ pagination: {
652
+ backgroundColor: palette.primary.main,
653
+ icons: {
654
+ backgroundColor: palette.primary.main,
655
+ borderColor: palette.primary.main,
656
+ color: palette.primary.contrastText
657
+ },
658
+ pagesBox: {
659
+ preventParse: true,
660
+ backgroundColor: palette.background.paper,
661
+ borderColor: palette.border.field,
662
+ color: palette.text.primary
663
+ }
664
+ },
665
+ primaryTable: {
666
+ borderColor: palette.background.paper,
667
+ header: {
668
+ backgroundColor: palette.primary.main,
669
+ color: palette.primary.contrastText,
670
+ borderColor: palette.primary.main
671
+ },
672
+ body: {
673
+ preventParse: true,
674
+ backgroundColor: palette.background.paper,
675
+ evenRowsBackgroundColor: palette.darkenColor(
676
+ palette.background.paper,
677
+ 3
678
+ ),
679
+ color: palette.text.primary,
680
+ borderColor: palette.gray["800"],
681
+ selectedRows: {
682
+ borderColor: palette.gray["800"],
683
+ backgroundColor: palette.getOneState(
684
+ { backgroundColor: palette.background.paper },
685
+ "selected"
686
+ ).backgroundColor,
687
+ color: palette.getContrastText(
688
+ palette.getOneState(
689
+ { backgroundColor: palette.background.paper },
690
+ "selected"
691
+ ).backgroundColor
692
+ )
693
+ }
694
+ }
695
+ },
696
+ secondaryTable: {
697
+ borderColor: palette.background.paper,
698
+ header: {
699
+ backgroundColor: palette.background.default,
700
+ color: palette.text.primary,
701
+ borderColor: palette.background.default
702
+ },
703
+ body: {
704
+ preventParse: true,
705
+ backgroundColor: palette.background.paper,
706
+ evenRowsBackgroundColor: palette.darkenColor(
707
+ palette.background.paper,
708
+ 3
709
+ ),
710
+ color: palette.text.primary,
711
+ borderColor: palette.gray["800"],
712
+ selectedRows: {
713
+ borderColor: palette.gray["800"],
714
+ backgroundColor: palette.getOneState(
715
+ { backgroundColor: palette.background.paper },
716
+ "selected"
717
+ ).backgroundColor,
718
+ color: palette.getContrastText(
719
+ palette.getOneState(
720
+ { backgroundColor: palette.background.paper },
721
+ "selected"
722
+ ).backgroundColor
723
+ )
724
+ }
725
+ }
726
+ }
727
+ };
728
+ };
729
+
730
+ var __defProp$k = Object.defineProperty;
731
+ var __defProps$b = Object.defineProperties;
732
+ var __getOwnPropDescs$b = Object.getOwnPropertyDescriptors;
733
+ var __getOwnPropSymbols$k = Object.getOwnPropertySymbols;
734
+ var __hasOwnProp$k = Object.prototype.hasOwnProperty;
735
+ var __propIsEnum$k = Object.prototype.propertyIsEnumerable;
736
+ var __defNormalProp$k = (obj, key, value) => key in obj ? __defProp$k(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
737
+ var __spreadValues$k = (a, b) => {
494
738
  for (var prop in b || (b = {}))
495
- if (__hasOwnProp$j.call(b, prop))
496
- __defNormalProp$j(a, prop, b[prop]);
497
- if (__getOwnPropSymbols$j)
498
- for (var prop of __getOwnPropSymbols$j(b)) {
499
- if (__propIsEnum$j.call(b, prop))
500
- __defNormalProp$j(a, prop, b[prop]);
739
+ if (__hasOwnProp$k.call(b, prop))
740
+ __defNormalProp$k(a, prop, b[prop]);
741
+ if (__getOwnPropSymbols$k)
742
+ for (var prop of __getOwnPropSymbols$k(b)) {
743
+ if (__propIsEnum$k.call(b, prop))
744
+ __defNormalProp$k(a, prop, b[prop]);
501
745
  }
502
746
  return a;
503
747
  };
504
- var __spreadProps$a = (a, b) => __defProps$a(a, __getOwnPropDescs$a(b));
748
+ var __spreadProps$b = (a, b) => __defProps$b(a, __getOwnPropDescs$b(b));
505
749
  const darkBlue = "#004085";
506
750
  const lightBlue = "#cce5ff";
507
751
  const white = "white";
508
- function getSelectedColors() {
509
- const palette = getPalette();
510
- return palette.getStatesFromDefinition(
752
+ function getSelectedColors(theme) {
753
+ return theme.palette.getColorStates(
511
754
  {
512
- backgroundColor: palette.background.paper,
513
- color: palette.text.primary
755
+ backgroundColor: theme.palette.background.paper,
756
+ color: theme.palette.text.primary
514
757
  },
515
758
  {
516
759
  active: false,
@@ -522,446 +765,462 @@ function getSelectedColors() {
522
765
  }
523
766
  );
524
767
  }
525
- function getPalette(arg) {
526
- const shouldReparsePalette = arg === true;
527
- const customPalette = typeof arg !== "boolean" ? arg : void 0;
528
- if (window.currentPalette && !shouldReparsePalette)
529
- return window.currentPalette;
530
- window.currentPalette = parsePalette(
531
- merge(
532
- defaultPalette,
533
- window.defaultPalette,
534
- customPalette != null ? customPalette : window.customPalette
535
- )
536
- );
537
- return window.currentPalette;
538
- }
539
- function getThemeColorsObject() {
768
+ function getThemeColorsObject(theme) {
540
769
  var _a;
541
- const palette = cloneDeep((_a = window.currentPalette) != null ? _a : getPalette());
542
- const colors = {
543
- palette: __spreadProps$a(__spreadValues$j({}, palette), {
544
- lightenColor: void 0,
545
- darkenColor: void 0,
546
- getContrastText: void 0,
547
- buildStateObject: void 0,
548
- getColor: void 0,
549
- getOneState: void 0,
550
- getStatesForColors: void 0,
551
- getStatesFromDefinition: void 0,
552
- getStatesFromPath: void 0
553
- }),
554
- accordion: {
555
- borderColor: palette.border.section
556
- },
557
- buttons: {
558
- accordion: {
559
- backgroundColor: palette.primary.main,
560
- borderColor: palette.border.section,
561
- color: palette.primary.contrastText
562
- },
563
- accordionPrimary: {
564
- backgroundColor: palette.primary.main,
565
- borderColor: palette.border.section,
566
- color: palette.primary.contrastText
567
- },
568
- close: __spreadProps$a(__spreadValues$j({}, applyStatesGetColor({
569
- color: palette.text.primary,
570
- backgroundColor: palette.background.paper
571
- })), {
572
- backgroundColor: "transparent"
770
+ const colors = merge(
771
+ {},
772
+ {
773
+ palette: __spreadProps$b(__spreadValues$k({}, theme.palette), {
774
+ lightenColor: void 0,
775
+ darkenColor: void 0,
776
+ getContrastText: void 0,
777
+ buildStateObject: void 0,
778
+ getColor: void 0,
779
+ getOneState: void 0,
780
+ getStatesForColors: void 0,
781
+ getStatesFromDefinition: void 0,
782
+ getStatesFromPath: void 0
573
783
  }),
574
- collapsibleAsidePanelTitle: {
575
- color: palette.text.primary
784
+ accordion: {
785
+ borderColor: theme.palette.border.section
576
786
  },
577
- deletableInputButton: {
578
- backgroundColor: "transparent",
579
- color: palette.secondary.main,
580
- active: {
581
- color: palette.darkenColor(palette.secondary.main, 40)
787
+ buttons: {
788
+ accordion: {
789
+ backgroundColor: theme.palette.primary.main,
790
+ borderColor: theme.palette.border.section,
791
+ color: theme.palette.primary.contrastText
582
792
  },
583
- disabled: {
584
- color: palette.secondary.main
793
+ accordionPrimary: {
794
+ backgroundColor: theme.palette.primary.main,
795
+ borderColor: theme.palette.border.section,
796
+ color: theme.palette.primary.contrastText
585
797
  },
586
- focus: {
587
- color: palette.darkenColor(palette.secondary.main, 20)
798
+ close: __spreadProps$b(__spreadValues$k({}, applyStatesGetColor(
799
+ {
800
+ color: theme.palette.text.primary,
801
+ backgroundColor: theme.palette.background.paper
802
+ },
803
+ theme
804
+ )), {
805
+ backgroundColor: "transparent"
806
+ }),
807
+ collapsibleAsidePanelTitle: {
808
+ color: theme.palette.text.primary
588
809
  },
589
- hover: {
590
- color: palette.darkenColor(palette.secondary.main, 20)
591
- }
592
- },
593
- icon: {
594
- backgroundColor: palette.secondary.main,
595
- color: palette.secondary.contrastText,
596
- hover: {
597
- color: palette.secondary.contrastText
810
+ deletableInputButton: {
811
+ backgroundColor: "transparent",
812
+ color: theme.palette.secondary.main,
813
+ active: {
814
+ color: theme.palette.darkenColor(theme.palette.secondary.main, 40)
815
+ },
816
+ disabled: {
817
+ color: theme.palette.secondary.main
818
+ },
819
+ focus: {
820
+ color: theme.palette.darkenColor(theme.palette.secondary.main, 20)
821
+ },
822
+ hover: {
823
+ color: theme.palette.darkenColor(theme.palette.secondary.main, 20)
824
+ }
598
825
  },
599
- focus: {
600
- color: palette.secondary.contrastText
601
- }
602
- },
603
- iconAlert: {
604
- backgroundColor: "transparent",
605
- color: "#e5c200",
606
- active: {
826
+ icon: {
827
+ backgroundColor: theme.palette.secondary.main,
828
+ color: theme.palette.text.icon,
829
+ hover: {
830
+ color: theme.palette.secondary.contrastText
831
+ },
832
+ focus: {
833
+ color: theme.palette.secondary.contrastText
834
+ }
835
+ },
836
+ iconAlert: {
607
837
  backgroundColor: "transparent",
608
- color: tinycolor("#e5c200").darken(10).toRgbString()
838
+ color: theme.palette.text.icon,
839
+ active: {
840
+ backgroundColor: "transparent",
841
+ color: tinycolor("#e5c200").darken(10).toRgbString()
842
+ },
843
+ focus: {
844
+ backgroundColor: "transparent",
845
+ color: tinycolor("#e5c200").darken(5).toRgbString()
846
+ },
847
+ hover: {
848
+ backgroundColor: "transparent",
849
+ color: tinycolor("#e5c200").darken(5).toRgbString()
850
+ }
609
851
  },
610
- focus: {
852
+ iconPrimary: {
853
+ backgroundColor: theme.palette.primary.main,
854
+ color: theme.palette.primary.contrastText,
855
+ active: {
856
+ color: theme.palette.primary.contrastText
857
+ },
858
+ focus: {
859
+ color: theme.palette.primary.contrastText
860
+ },
861
+ hover: {
862
+ color: theme.palette.primary.contrastText
863
+ },
864
+ disabled: {
865
+ color: theme.palette.gray["500"]
866
+ }
867
+ },
868
+ iconToggled: {
869
+ backgroundColor: theme.palette.primary.main,
870
+ color: theme.palette.primary.contrastText,
871
+ active: {
872
+ color: theme.palette.primary.contrastText
873
+ },
874
+ focus: {
875
+ color: theme.palette.common.white
876
+ },
877
+ hover: {
878
+ color: theme.palette.common.white
879
+ }
880
+ },
881
+ iconOutline: {
882
+ backgroundColor: theme.palette.background.paper,
883
+ color: theme.palette.primary.main,
884
+ borderColor: theme.palette.border.article
885
+ },
886
+ imagePreview: {
887
+ backgroundColor: theme.palette.background.paper,
888
+ color: theme.palette.text.primary,
889
+ borderColor: theme.palette.border.article
890
+ },
891
+ link: {
611
892
  backgroundColor: "transparent",
612
- color: tinycolor("#e5c200").darken(5).toRgbString()
893
+ color: theme.palette.text.primary,
894
+ borderColor: "transparent",
895
+ active: {
896
+ color: theme.palette.text.primary
897
+ },
898
+ focus: {
899
+ color: theme.palette.text.primary
900
+ },
901
+ hover: {
902
+ color: theme.palette.text.primary
903
+ }
904
+ },
905
+ openTab: {
906
+ backgroundColor: theme.palette.primary.main,
907
+ color: theme.palette.primary.contrastText,
908
+ borderColor: theme.palette.primary.dark
909
+ },
910
+ outline: {
911
+ backgroundColor: theme.palette.background.paper,
912
+ color: theme.palette.text.primary,
913
+ borderColor: theme.palette.primary.main
914
+ },
915
+ outlineDanger: {
916
+ backgroundColor: theme.palette.background.paper,
917
+ color: theme.palette.primary.main,
918
+ borderColor: theme.palette.primary.main,
919
+ active: {
920
+ borderColor: theme.palette.darkenColor(
921
+ theme.palette.error.dark,
922
+ theme.palette.action.activeOpacity * 80
923
+ ),
924
+ backgroundColor: theme.palette.darkenColor(
925
+ theme.palette.error.dark,
926
+ theme.palette.action.activeOpacity * 80
927
+ ),
928
+ color: theme.palette.getContrastText(
929
+ theme.palette.darkenColor(
930
+ theme.palette.error.dark,
931
+ theme.palette.action.activeOpacity * 80
932
+ )
933
+ )
934
+ },
935
+ focus: {
936
+ borderColor: theme.palette.darkenColor(
937
+ theme.palette.error.dark,
938
+ theme.palette.action.focusOpacity * 60
939
+ ),
940
+ backgroundColor: theme.palette.darkenColor(
941
+ theme.palette.error.dark,
942
+ theme.palette.action.focusOpacity * 60
943
+ ),
944
+ color: theme.palette.getContrastText(
945
+ theme.palette.darkenColor(
946
+ theme.palette.error.dark,
947
+ theme.palette.action.focusOpacity * 60
948
+ )
949
+ )
950
+ },
951
+ hover: {
952
+ borderColor: theme.palette.darkenColor(
953
+ theme.palette.error.dark,
954
+ theme.palette.action.hoverOpacity * 10
955
+ ),
956
+ backgroundColor: theme.palette.darkenColor(
957
+ theme.palette.error.dark,
958
+ theme.palette.action.hoverOpacity * 10
959
+ ),
960
+ color: theme.palette.getContrastText(
961
+ theme.palette.darkenColor(
962
+ theme.palette.error.dark,
963
+ theme.palette.action.hoverOpacity * 10
964
+ )
965
+ )
966
+ }
967
+ },
968
+ outlineWarning: {
969
+ backgroundColor: theme.palette.background.paper,
970
+ color: theme.palette.text.primary,
971
+ borderColor: theme.palette.primary.main,
972
+ active: {
973
+ borderColor: theme.palette.warning.main,
974
+ backgroundColor: theme.palette.warning.main,
975
+ color: theme.palette.warning.contrastText
976
+ },
977
+ focus: {
978
+ borderColor: theme.palette.warning.main,
979
+ backgroundColor: theme.palette.warning.main,
980
+ color: theme.palette.warning.contrastText
981
+ },
982
+ hover: {
983
+ borderColor: theme.palette.warning.main,
984
+ backgroundColor: theme.palette.warning.main,
985
+ color: theme.palette.warning.contrastText
986
+ }
613
987
  },
614
- hover: {
988
+ paper: {
989
+ backgroundColor: theme.palette.background.paper,
990
+ color: theme.palette.text.primary,
991
+ borderColor: theme.palette.background.paper
992
+ },
993
+ primary: {
994
+ backgroundColor: theme.palette.primary.main,
995
+ color: theme.palette.primary.contrastText,
996
+ borderColor: theme.palette.primary.main
997
+ },
998
+ secondary: {
999
+ backgroundColor: theme.palette.secondary.main,
1000
+ color: theme.palette.secondary.contrastText,
1001
+ borderColor: theme.palette.secondary.main
1002
+ },
1003
+ tab: {
1004
+ backgroundColor: theme.palette.background.paper,
1005
+ color: theme.palette.text.primary,
1006
+ borderColor: theme.palette.border.article
1007
+ },
1008
+ toggleIcon: {
1009
+ color: theme.palette.secondary.contrastText,
1010
+ backgroundColor: theme.palette.secondary.main,
1011
+ borderColor: theme.palette.border.field,
1012
+ danger: {
1013
+ backgroundColor: theme.palette.error.main,
1014
+ borderColor: theme.palette.border.field,
1015
+ color: theme.palette.error.contrastText
1016
+ },
1017
+ toggled: {
1018
+ backgroundColor: theme.palette.primary.main,
1019
+ borderColor: theme.palette.border.field,
1020
+ color: theme.palette.primary.contrastText
1021
+ }
1022
+ },
1023
+ transparentIcon: {
615
1024
  backgroundColor: "transparent",
616
- color: tinycolor("#e5c200").darken(5).toRgbString()
1025
+ color: theme.palette.text.primary,
1026
+ hover: {
1027
+ color: theme.palette.primary.main
1028
+ },
1029
+ focus: {
1030
+ color: theme.palette.primary.main
1031
+ }
617
1032
  }
618
1033
  },
619
- iconPrimary: {
620
- backgroundColor: palette.primary.main,
621
- color: palette.primary.contrastText,
622
- active: {
623
- color: palette.primary.contrastText
624
- },
625
- focus: {
626
- color: palette.primary.contrastText
1034
+ components: components$1(theme),
1035
+ dropzone: {
1036
+ backgroundColor: theme.palette.background.paper,
1037
+ borderColor: theme.palette.border.section,
1038
+ color: theme.palette.background.default
1039
+ },
1040
+ form: {
1041
+ backgroundColor: theme.palette.background.paper,
1042
+ fields: {
1043
+ backgroundColor: theme.palette.background.paper,
1044
+ color: theme.palette.text.primary,
1045
+ borderColor: theme.palette.border.field
627
1046
  },
628
- hover: {
629
- color: palette.primary.contrastText
1047
+ radio: {
1048
+ backgroundColor: "transparent",
1049
+ color: tinycolor(theme.palette.text.primary).lighten(15).toRgbString(),
1050
+ borderColor: theme.palette.text.primary,
1051
+ active: {
1052
+ backgroundColor: "transparent",
1053
+ color: tinycolor(theme.palette.text.primary).lighten(0).toRgbString()
1054
+ },
1055
+ checked: {
1056
+ backgroundColor: "transparent",
1057
+ color: tinycolor(theme.palette.text.primary).lighten(15).toRgbString()
1058
+ },
1059
+ disabled: {
1060
+ backgroundColor: "transparent",
1061
+ color: tinycolor(theme.palette.text.primary).lighten(55).toRgbString()
1062
+ },
1063
+ hover: {
1064
+ backgroundColor: "transparent",
1065
+ color: tinycolor(theme.palette.text.primary).lighten(7).toRgbString()
1066
+ },
1067
+ readonly: {
1068
+ color: tinycolor(theme.palette.text.primary).lighten(38).toRgbString(),
1069
+ backgroundColor: "transparent"
1070
+ }
630
1071
  }
631
1072
  },
632
- iconToggled: {
633
- backgroundColor: palette.primary.main,
634
- color: palette.primary.contrastText,
635
- active: {
636
- color: palette.primary.contrastText
1073
+ modal: {
1074
+ borderColor: theme.palette.border.section,
1075
+ backgroundColor: theme.palette.background.paper
1076
+ },
1077
+ notifications: {
1078
+ error: {
1079
+ backgroundColor: theme.palette.error.light,
1080
+ color: theme.palette.getContrastText(theme.palette.error.light),
1081
+ borderColor: theme.palette.error.main
637
1082
  },
638
- focus: {
639
- color: palette.common.white
1083
+ success: {
1084
+ backgroundColor: theme.palette.success.light,
1085
+ color: theme.palette.getContrastText(theme.palette.success.light),
1086
+ borderColor: theme.palette.success.main
640
1087
  },
641
- hover: {
642
- color: palette.common.white
1088
+ warning: {
1089
+ backgroundColor: theme.palette.warning.light,
1090
+ color: theme.palette.getContrastText(theme.palette.warning.light),
1091
+ borderColor: theme.palette.warning.main
643
1092
  }
644
1093
  },
645
- iconOutline: {
646
- backgroundColor: palette.background.paper,
647
- color: palette.primary.main,
648
- borderColor: palette.border.article
649
- },
650
- link: {
651
- backgroundColor: "transparent",
652
- color: palette.text.primary,
653
- borderColor: "transparent",
654
- active: {
655
- color: palette.text.primary
656
- },
657
- focus: {
658
- color: palette.text.primary
659
- },
660
- hover: {
661
- color: palette.text.primary
662
- }
663
- },
664
- openTab: {
665
- backgroundColor: palette.primary.main,
666
- color: palette.primary.contrastText,
667
- borderColor: palette.primary.dark
668
- },
669
- outline: {
670
- backgroundColor: palette.background.paper,
671
- color: palette.getContrastText(palette.background.paper),
672
- borderColor: palette.primary.main
673
- },
674
- outlineDanger: {
675
- backgroundColor: palette.background.paper,
676
- color: palette.primary.main,
677
- borderColor: palette.primary.main,
678
- active: {
679
- borderColor: palette.darkenColor(
680
- palette.error.dark,
681
- palette.action.activeOpacity * 80
682
- ),
683
- backgroundColor: palette.darkenColor(
684
- palette.error.dark,
685
- palette.action.activeOpacity * 80
686
- ),
687
- color: palette.getContrastText(
688
- palette.darkenColor(
689
- palette.error.dark,
690
- palette.action.activeOpacity * 80
691
- )
692
- )
693
- },
694
- focus: {
695
- borderColor: palette.darkenColor(
696
- palette.error.dark,
697
- palette.action.activeOpacity * 60
698
- ),
699
- backgroundColor: palette.darkenColor(
700
- palette.error.dark,
701
- palette.action.activeOpacity * 60
702
- ),
703
- color: palette.getContrastText(
704
- palette.darkenColor(
705
- palette.error.dark,
706
- palette.action.activeOpacity * 60
707
- )
708
- )
1094
+ printView: {
1095
+ main: {
1096
+ backgroundColor: theme.palette.background.default,
1097
+ page: {
1098
+ backgroundColor: theme.palette.background.paper,
1099
+ borderColor: theme.palette.border.article
1100
+ }
709
1101
  },
710
- hover: {
711
- borderColor: palette.darkenColor(
712
- palette.error.dark,
713
- palette.action.activeOpacity * 70
714
- ),
715
- backgroundColor: palette.darkenColor(
716
- palette.error.dark,
717
- palette.action.activeOpacity * 70
718
- ),
719
- color: palette.getContrastText(
720
- palette.darkenColor(
721
- palette.error.dark,
722
- palette.action.activeOpacity * 70
723
- )
724
- )
1102
+ list: {
1103
+ table: {
1104
+ borderColor: theme.palette.border.section
1105
+ },
1106
+ th: { backgroundColor: "#eee" },
1107
+ cell: {
1108
+ borderColor: theme.palette.border.article
1109
+ }
725
1110
  }
726
1111
  },
727
- outlineWarning: {
728
- backgroundColor: palette.background.paper,
729
- color: palette.text.primary,
730
- borderColor: palette.primary.main,
731
- active: {
732
- borderColor: palette.warning.main,
733
- backgroundColor: palette.warning.main,
734
- color: palette.warning.contrastText
735
- },
736
- focus: {
737
- borderColor: palette.warning.main,
738
- backgroundColor: palette.warning.main,
739
- color: palette.warning.contrastText
740
- },
741
- hover: {
742
- borderColor: palette.warning.main,
743
- backgroundColor: palette.warning.main,
744
- color: palette.warning.contrastText
1112
+ schemas,
1113
+ scrollbars: {
1114
+ bar: {
1115
+ color: theme.palette.secondary.main,
1116
+ backgroundColor: theme.palette.background.default,
1117
+ hover: {
1118
+ backgroundColor: theme.palette.lightenColor(
1119
+ theme.palette.background.default,
1120
+ 10
1121
+ ),
1122
+ color: theme.palette.lightenColor(theme.palette.secondary.main, 10)
1123
+ },
1124
+ active: {
1125
+ backgroundColor: theme.palette.lightenColor(
1126
+ theme.palette.background.default,
1127
+ 10
1128
+ ),
1129
+ color: theme.palette.lightenColor(theme.palette.secondary.main, 20)
1130
+ }
745
1131
  }
746
1132
  },
747
- primary: {
748
- backgroundColor: palette.primary.main,
749
- color: palette.primary.contrastText,
750
- borderColor: palette.primary.main
751
- },
752
- secondary: {
753
- backgroundColor: palette.secondary.main,
754
- color: palette.secondary.contrastText,
755
- borderColor: palette.secondary.main
756
- },
757
1133
  tab: {
758
- backgroundColor: palette.background.paper,
759
- color: palette.getContrastText(palette.background.paper),
760
- borderColor: palette.border.article
761
- },
762
- toggleIcon: {
763
- color: palette.secondary.contrastText,
764
- backgroundColor: palette.secondary.main,
765
- borderColor: palette.border.field,
766
- danger: {
767
- backgroundColor: palette.error.main,
768
- borderColor: palette.border.field,
769
- color: palette.error.contrastText
770
- },
771
- toggled: {
772
- backgroundColor: palette.primary.main,
773
- borderColor: palette.border.field,
774
- color: palette.primary.contrastText
775
- }
776
- },
777
- transparentIcon: {
778
- backgroundColor: "transparent",
779
- color: palette.text.primary,
780
- hover: {
781
- color: palette.primary.main
782
- },
783
- focus: {
784
- color: palette.primary.main
785
- }
786
- }
787
- },
788
- dropzone: {
789
- backgroundColor: palette.background.paper,
790
- borderColor: palette.border.section,
791
- color: palette.background.default
792
- },
793
- form: {
794
- backgroundColor: palette.background.paper,
795
- fields: {
796
- backgroundColor: palette.background.paper,
797
- color: palette.text.primary,
798
- borderColor: palette.border.field
799
- },
800
- radio: {
801
- backgroundColor: "transparent",
802
- color: tinycolor(window.currentPalette.text.primary).lighten(15).toRgbString(),
803
- borderColor: palette.text.primary,
804
- active: {
805
- backgroundColor: "transparent",
806
- color: tinycolor(window.currentPalette.text.primary).lighten(0).toRgbString()
807
- },
808
- checked: {
809
- backgroundColor: "red",
810
- color: tinycolor(window.currentPalette.text.primary).lighten(15).toRgbString()
811
- },
812
- disabled: {
813
- backgroundColor: "transparent",
814
- color: tinycolor(window.currentPalette.text.primary).lighten(55).toRgbString()
815
- },
816
- hover: {
817
- backgroundColor: "transparent",
818
- color: tinycolor(window.currentPalette.text.primary).lighten(7).toRgbString()
819
- },
820
- readonly: {
821
- color: tinycolor(window.currentPalette.text.primary).lighten(38).toRgbString(),
822
- backgroundColor: "transparent"
823
- }
824
- }
825
- },
826
- modal: {
827
- borderColor: palette.border.section,
828
- backgroundColor: palette.background.paper
829
- },
830
- notifications: {
831
- error: {
832
- backgroundColor: palette.error.light,
833
- color: palette.getContrastText(palette.error.light),
834
- borderColor: palette.error.main
835
- },
836
- success: {
837
- backgroundColor: palette.success.light,
838
- color: palette.getContrastText(palette.success.light),
839
- borderColor: palette.success.main
1134
+ backgroundColor: theme.palette.background.paper,
1135
+ borderColor: theme.palette.border.section
840
1136
  },
841
- warning: {
842
- backgroundColor: palette.warning.light,
843
- color: palette.getContrastText(palette.warning.light),
844
- borderColor: palette.warning.main
845
- }
846
- },
847
- pagination: {
848
- color: palette.primary.contrastText,
849
- backgroundColor: palette.primary.main
850
- },
851
- printView: {
852
- main: {
853
- backgroundColor: palette.background.default,
854
- page: {
855
- backgroundColor: palette.background.paper,
856
- borderColor: palette.border.article
857
- }
1137
+ topBar: {
1138
+ backgroundColor: theme.palette.primary.main
858
1139
  },
859
- list: {
860
- table: {
861
- borderColor: palette.border.section
862
- },
863
- th: { backgroundColor: "#eee" },
864
- cell: {
865
- borderColor: palette.border.article
866
- }
867
- }
868
- },
869
- schemas,
870
- scrollbars: {
871
- bar: {
872
- color: palette.secondary.main,
873
- backgroundColor: palette.background.default,
874
- hover: {
875
- backgroundColor: palette.lightenColor(palette.background.default, 10),
876
- color: palette.lightenColor(palette.secondary.main, 10)
877
- },
878
- active: {
879
- backgroundColor: palette.lightenColor(palette.background.default, 10),
880
- color: palette.lightenColor(palette.secondary.main, 20)
881
- }
1140
+ // Default ThemeUI colors
1141
+ accent: theme.palette.text.accent,
1142
+ background: theme.palette.background.default,
1143
+ iconWarning: "rgb(246 222 87)",
1144
+ muted: theme.palette.text.disabled,
1145
+ primary: theme.palette.primary.main,
1146
+ secondary: theme.palette.secondary.main,
1147
+ text: theme.palette.text.primary,
1148
+ warning: theme.palette.warning.main,
1149
+ danger: theme.palette.error.main,
1150
+ link: theme.palette.text.accent,
1151
+ success: theme.palette.success.main,
1152
+ title: theme.palette.text.title,
1153
+ selected: theme.palette.getOneState(
1154
+ { backgroundColor: theme.palette.background.paper },
1155
+ "selected"
1156
+ ).backgroundColor,
1157
+ // Meaningful colors
1158
+ lightBorder: "hsl(0, 12%, 85%)",
1159
+ outlineColor: "#00a8f6",
1160
+ touchedBorderColor: "orange",
1161
+ // Custom Apia colors
1162
+ baseGrey: "#dfdfdf",
1163
+ darkBorder: "hsl(247, 98%, 10%)",
1164
+ darkBlue,
1165
+ disabled: "#efefef",
1166
+ favorite: "#e5c200",
1167
+ filtersRowBackground: white,
1168
+ formBackground: white,
1169
+ grey: "#777",
1170
+ gridRowHighlight: "#e1f3ff",
1171
+ highlightButton: "hsl(61, 100%, 91%)",
1172
+ lightBlue,
1173
+ oddRow: "#f0f5ff",
1174
+ paginationBackground: "hsl(229deg, 75%, 90%)",
1175
+ readOnlyText: "#737373",
1176
+ required: "darkred",
1177
+ scrollbarBack: "rgb(206, 206, 206)",
1178
+ scrollbarFront: "rgb(156, 156, 156)",
1179
+ sysExceptionNotificationBg: "#f8d7da",
1180
+ sysMessageNotificationBg: "#fff3cd",
1181
+ tabBackground: "white",
1182
+ treeRuler: "#ccc",
1183
+ white,
1184
+ priorityNone: "gray",
1185
+ priorityLow: theme.palette.success.main,
1186
+ priorityNormal: "rgb(255 211 34)",
1187
+ priorityHigh: "rgb(255 150 0)",
1188
+ priorityUrgent: "red",
1189
+ // modes: {
1190
+ // dark: {
1191
+ // // TODO: dark-mode uhhhhhhh!!!
1192
+ // //text: '#fff',
1193
+ // },
1194
+ // },
1195
+ charts: {
1196
+ front: darkBlue
882
1197
  }
883
1198
  },
884
- tab: {
885
- backgroundColor: palette.background.paper,
886
- borderColor: palette.border.section
887
- },
888
- topBar: {
889
- backgroundColor: palette.primary.main
890
- },
891
- // Default ThemeUI colors
892
- accent: palette.text.accent,
893
- background: palette.background.default,
894
- iconWarning: "rgb(246 222 87)",
895
- muted: palette.text.disabled,
896
- primary: palette.primary.main,
897
- secondary: palette.secondary.main,
898
- text: palette.text.primary,
899
- warning: palette.warning.main,
900
- danger: palette.error.main,
901
- link: palette.text.accent,
902
- success: palette.success.main,
903
- title: palette.text.title,
904
- // Meaningful colors
905
- lightBorder: "hsl(0, 12%, 85%)",
906
- outlineColor: palette.lightenColor(palette.primary.main, 20),
907
- // Custom Apia colors
908
- baseGrey: "#dfdfdf",
909
- darkBorder: "hsl(247, 98%, 10%)",
910
- darkBlue,
911
- disabled: "#efefef",
912
- favorite: "#e5c200",
913
- filtersRowBackground: white,
914
- formBackground: white,
915
- grey: "#777",
916
- gridRowHighlight: "#e1f3ff",
917
- highlightButton: "hsl(61, 100%, 91%)",
918
- lightBlue,
919
- oddRow: "#f0f5ff",
920
- paginationBackground: "hsl(229deg, 75%, 90%)",
921
- readOnlyText: "#737373",
922
- required: "darkred",
923
- scrollbarBack: "rgb(206, 206, 206)",
924
- scrollbarFront: "rgb(156, 156, 156)",
925
- sysExceptionNotificationBg: "#f8d7da",
926
- sysMessageNotificationBg: "#fff3cd",
927
- tabBackground: "white",
928
- treeRuler: "#ccc",
929
- white,
930
- priorityNone: "gray",
931
- priorityLow: palette.success.main,
932
- priorityNormal: "rgb(255 211 34)",
933
- priorityHigh: "rgb(255 150 0)",
934
- priorityUrgent: "red",
935
- // modes: {
936
- // dark: {
937
- // // TODO: dark-mode uhhhhhhh!!!
938
- // //text: '#fff',
939
- // },
940
- // },
941
- charts: {
942
- front: darkBlue
943
- }
944
- };
945
- applyStates([
946
- colors == null ? void 0 : colors.buttons,
947
- colors == null ? void 0 : colors.form
948
- ]);
1199
+ (_a = theme.colors) != null ? _a : {}
1200
+ );
1201
+ applyStates(
1202
+ [
1203
+ colors == null ? void 0 : colors.buttons,
1204
+ colors == null ? void 0 : colors.form
1205
+ ],
1206
+ theme
1207
+ );
949
1208
  return colors;
950
1209
  }
951
1210
 
952
- var __defProp$i = Object.defineProperty;
953
- var __getOwnPropSymbols$i = Object.getOwnPropertySymbols;
954
- var __hasOwnProp$i = Object.prototype.hasOwnProperty;
955
- var __propIsEnum$i = Object.prototype.propertyIsEnumerable;
956
- var __defNormalProp$i = (obj, key, value) => key in obj ? __defProp$i(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
957
- var __spreadValues$i = (a, b) => {
1211
+ var __defProp$j = Object.defineProperty;
1212
+ var __getOwnPropSymbols$j = Object.getOwnPropertySymbols;
1213
+ var __hasOwnProp$j = Object.prototype.hasOwnProperty;
1214
+ var __propIsEnum$j = Object.prototype.propertyIsEnumerable;
1215
+ var __defNormalProp$j = (obj, key, value) => key in obj ? __defProp$j(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1216
+ var __spreadValues$j = (a, b) => {
958
1217
  for (var prop in b || (b = {}))
959
- if (__hasOwnProp$i.call(b, prop))
960
- __defNormalProp$i(a, prop, b[prop]);
961
- if (__getOwnPropSymbols$i)
962
- for (var prop of __getOwnPropSymbols$i(b)) {
963
- if (__propIsEnum$i.call(b, prop))
964
- __defNormalProp$i(a, prop, b[prop]);
1218
+ if (__hasOwnProp$j.call(b, prop))
1219
+ __defNormalProp$j(a, prop, b[prop]);
1220
+ if (__getOwnPropSymbols$j)
1221
+ for (var prop of __getOwnPropSymbols$j(b)) {
1222
+ if (__propIsEnum$j.call(b, prop))
1223
+ __defNormalProp$j(a, prop, b[prop]);
965
1224
  }
966
1225
  return a;
967
1226
  };
@@ -1041,7 +1300,9 @@ const alerts = {
1041
1300
  backgroundColor: "rgba(10,10,10,0.02)",
1042
1301
  pt: spacing(5),
1043
1302
  ".notification__traceLabel": {
1044
- pl: spacing(5)
1303
+ pl: spacing(5),
1304
+ display: "flex",
1305
+ gap: 2
1045
1306
  },
1046
1307
  ".notification__traceText": {
1047
1308
  fontWeight: "normal",
@@ -1056,37 +1317,37 @@ const alerts = {
1056
1317
  },
1057
1318
  warning: {
1058
1319
  variant: "alerts.primary",
1059
- "&, & .notification__header": __spreadValues$i({}, getColorsByPath("notifications.warning"))
1320
+ "&, & .notification__header": __spreadValues$j({}, getColorsByPath("notifications.warning"))
1060
1321
  },
1061
1322
  danger: {
1062
1323
  variant: "alerts.primary",
1063
- "&, & .notification__header": __spreadValues$i({}, getColorsByPath("notifications.error"))
1324
+ "&, & .notification__header": __spreadValues$j({}, getColorsByPath("notifications.error"))
1064
1325
  },
1065
1326
  success: {
1066
1327
  variant: "alerts.primary",
1067
- "&, & .notification__header": __spreadValues$i({}, getColorsByPath("notifications.success"))
1328
+ "&, & .notification__header": __spreadValues$j({}, getColorsByPath("notifications.success"))
1068
1329
  }
1069
1330
  };
1070
1331
 
1071
- var __defProp$h = Object.defineProperty;
1072
- var __defProps$9 = Object.defineProperties;
1073
- var __getOwnPropDescs$9 = Object.getOwnPropertyDescriptors;
1074
- var __getOwnPropSymbols$h = Object.getOwnPropertySymbols;
1075
- var __hasOwnProp$h = Object.prototype.hasOwnProperty;
1076
- var __propIsEnum$h = Object.prototype.propertyIsEnumerable;
1077
- var __defNormalProp$h = (obj, key, value) => key in obj ? __defProp$h(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1078
- var __spreadValues$h = (a, b) => {
1332
+ var __defProp$i = Object.defineProperty;
1333
+ var __defProps$a = Object.defineProperties;
1334
+ var __getOwnPropDescs$a = Object.getOwnPropertyDescriptors;
1335
+ var __getOwnPropSymbols$i = Object.getOwnPropertySymbols;
1336
+ var __hasOwnProp$i = Object.prototype.hasOwnProperty;
1337
+ var __propIsEnum$i = Object.prototype.propertyIsEnumerable;
1338
+ var __defNormalProp$i = (obj, key, value) => key in obj ? __defProp$i(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1339
+ var __spreadValues$i = (a, b) => {
1079
1340
  for (var prop in b || (b = {}))
1080
- if (__hasOwnProp$h.call(b, prop))
1081
- __defNormalProp$h(a, prop, b[prop]);
1082
- if (__getOwnPropSymbols$h)
1083
- for (var prop of __getOwnPropSymbols$h(b)) {
1084
- if (__propIsEnum$h.call(b, prop))
1085
- __defNormalProp$h(a, prop, b[prop]);
1341
+ if (__hasOwnProp$i.call(b, prop))
1342
+ __defNormalProp$i(a, prop, b[prop]);
1343
+ if (__getOwnPropSymbols$i)
1344
+ for (var prop of __getOwnPropSymbols$i(b)) {
1345
+ if (__propIsEnum$i.call(b, prop))
1346
+ __defNormalProp$i(a, prop, b[prop]);
1086
1347
  }
1087
1348
  return a;
1088
1349
  };
1089
- var __spreadProps$9 = (a, b) => __defProps$9(a, __getOwnPropDescs$9(b));
1350
+ var __spreadProps$a = (a, b) => __defProps$a(a, __getOwnPropDescs$a(b));
1090
1351
  const buttons = {
1091
1352
  inherit: {
1092
1353
  color: "inherit",
@@ -1098,14 +1359,14 @@ const buttons = {
1098
1359
  padding: 0,
1099
1360
  margin: 0
1100
1361
  },
1101
- collapsibleAsidePanelTitle: __spreadValues$h({
1362
+ collapsibleAsidePanelTitle: __spreadValues$i({
1102
1363
  variant: "buttons.inherit",
1103
1364
  display: "flex",
1104
1365
  justifyContent: "space-between",
1105
1366
  alignItems: "center",
1106
1367
  width: "100%"
1107
1368
  }, getColorsAndStatesByPath("buttons.collapsibleAsidePanelTitle")),
1108
- primary: __spreadProps$9(__spreadValues$h({
1369
+ primary: __spreadProps$a(__spreadValues$i({
1109
1370
  borderWidth: "2px",
1110
1371
  borderStyle: "solid",
1111
1372
  variant: "text.default",
@@ -1124,37 +1385,37 @@ const buttons = {
1124
1385
  outlineColor: "#00daff"
1125
1386
  }
1126
1387
  }),
1127
- "primary-sm": __spreadValues$h({
1388
+ "primary-sm": __spreadValues$i({
1128
1389
  variant: "buttons.primary",
1129
1390
  "&:focus, &:focus-visible": {}
1130
1391
  }, smallButton),
1131
- secondary: __spreadValues$h({
1392
+ secondary: __spreadValues$i({
1132
1393
  variant: "buttons.primary",
1133
1394
  "&:focus, &:focus-visible": {},
1134
1395
  borderWidth: "0px",
1135
1396
  borderStyle: "solid"
1136
1397
  }, getColorsAndStatesByPath("buttons.secondary")),
1137
- "secondary-sm": __spreadValues$h({
1398
+ "secondary-sm": __spreadValues$i({
1138
1399
  variant: "buttons.secondary"
1139
1400
  }, smallButton),
1140
- "light-secondary": __spreadValues$h({
1401
+ "light-secondary": __spreadValues$i({
1141
1402
  variant: "buttons.secondary"
1142
1403
  }, getColorsAndStatesByPath("buttons.lightSecondary")),
1143
- danger: __spreadValues$h({
1404
+ danger: __spreadValues$i({
1144
1405
  variant: "buttons.primary",
1145
1406
  "&:focus, &:focus-visible": {}
1146
1407
  }, getColorsAndStatesByPath("buttons.danger")),
1147
- "danger-sm": __spreadValues$h({
1408
+ "danger-sm": __spreadValues$i({
1148
1409
  variant: "buttons.danger"
1149
1410
  }, smallButton),
1150
- warning: __spreadValues$h({
1411
+ warning: __spreadValues$i({
1151
1412
  variant: "buttons.primary",
1152
1413
  "&:focus, &:focus-visible": {}
1153
1414
  }, getColorsAndStatesByPath("buttons.warning")),
1154
- "warning-sm": __spreadValues$h({
1415
+ "warning-sm": __spreadValues$i({
1155
1416
  variant: "buttons.warning"
1156
1417
  }, smallButton),
1157
- close: __spreadValues$h({
1418
+ close: __spreadValues$i({
1158
1419
  cursor: "pointer",
1159
1420
  ml: "auto",
1160
1421
  mr: "2",
@@ -1181,13 +1442,19 @@ const buttons = {
1181
1442
  border: "none",
1182
1443
  transition: "background-color 300ms ease-out, color 300ms ease-out",
1183
1444
  userSelect: "text",
1184
- "&, *": getColorsAndStatesByPath("buttons.accordion")
1445
+ "&, *": getColorsAndStatesByPath("buttons.accordion"),
1446
+ "h3.toggleAccordionElementLabel": {
1447
+ variant: "text.default",
1448
+ color: "inherit",
1449
+ margin: 0,
1450
+ wordBreak: "break-word"
1451
+ }
1185
1452
  },
1186
- "accordion-primary": __spreadValues$h({
1453
+ "accordion-primary": __spreadValues$i({
1187
1454
  variant: "buttons.accordion",
1188
1455
  border: "none"
1189
1456
  }, getColorsAndStatesByPath("buttons.accordionPrimary")),
1190
- icon: __spreadProps$9(__spreadValues$h({
1457
+ icon: __spreadProps$a(__spreadValues$i({
1191
1458
  display: "flex",
1192
1459
  justifyContent: "center",
1193
1460
  alignItems: "center",
@@ -1199,30 +1466,47 @@ const buttons = {
1199
1466
  borderRadius: "buttons",
1200
1467
  border: "none"
1201
1468
  }, getColorsAndStatesByPath("buttons.icon")), {
1202
- svg: {
1469
+ path: {
1203
1470
  width: "auto",
1204
1471
  height: "20px",
1205
- display: "block"
1472
+ display: "block",
1473
+ fill: getColorsAndStatesByPath("buttons.icon").color
1206
1474
  },
1207
- "&.isToggled": __spreadValues$h({}, getColorsAndStatesByPath("buttons.iconToggled"))
1475
+ "&.isToggled": __spreadProps$a(__spreadValues$i({}, getColorsAndStatesByPath("buttons.iconToggled")), {
1476
+ path: {
1477
+ fill: getColorsAndStatesByPath("buttons.iconToggled").color
1478
+ }
1479
+ })
1208
1480
  }),
1209
- "icon-primary": __spreadValues$h({
1481
+ "icon-primary": __spreadProps$a(__spreadValues$i({
1210
1482
  variant: "buttons.icon"
1211
- }, getColorsAndStatesByPath("buttons.iconPrimary")),
1212
- "icon-outline": __spreadValues$h({
1483
+ }, getColorsAndStatesByPath("buttons.iconPrimary")), {
1484
+ path: {
1485
+ fill: getColorsAndStatesByPath("buttons.iconPrimary").color
1486
+ }
1487
+ }),
1488
+ "icon-outline": __spreadProps$a(__spreadValues$i({
1213
1489
  variant: "buttons.icon",
1214
1490
  bg: "white",
1215
1491
  border: "1px solid"
1216
- }, getColorsAndStatesByPath("buttons.iconOutline")),
1217
- "icon-outline-danger": __spreadValues$h({
1492
+ }, getColorsAndStatesByPath("buttons.iconOutline")), {
1493
+ path: {
1494
+ fill: getColorsAndStatesByPath("buttons.iconOutline").color
1495
+ }
1496
+ }),
1497
+ "icon-outline-danger": __spreadValues$i({
1218
1498
  variant: "buttons.icon",
1219
1499
  bg: "white",
1220
1500
  border: "1px solid"
1221
1501
  }, getColorsAndStatesByPath("buttons.outlineDanger")),
1222
- "icon-only": __spreadValues$h({
1502
+ "icon-only": __spreadProps$a(__spreadValues$i({
1223
1503
  variant: "buttons.icon"
1224
- }, getColorsAndStatesByPath("buttons.iconOnly")),
1225
- link: __spreadValues$h({
1504
+ }, getColorsAndStatesByPath("buttons.iconOnly")), {
1505
+ path: {
1506
+ fill: getColorsAndStatesByPath("buttons.iconOnly").color
1507
+ }
1508
+ }),
1509
+ link: __spreadValues$i({
1226
1510
  variant: "inherit",
1227
1511
  width: "auto",
1228
1512
  border: "none",
@@ -1234,20 +1518,30 @@ const buttons = {
1234
1518
  textTransform: "none",
1235
1519
  transition: "background-color 300ms ease-out, color 300ms ease-out"
1236
1520
  }, getColorsAndStatesByPath("buttons.link")),
1237
- "link-sm": __spreadValues$h({
1521
+ "link-sm": __spreadValues$i({
1238
1522
  variant: "buttons.link"
1239
1523
  }, smallButton),
1240
- outline: __spreadValues$h({
1524
+ outline: __spreadValues$i({
1241
1525
  variant: "buttons.primary",
1242
1526
  borderWidth: "2px",
1243
1527
  borderStyle: "solid",
1244
1528
  borderRadius: "buttons",
1245
1529
  "&:focus, &:focus-visible": {}
1246
- }, getColorsAndStatesByPath("buttons.outline")),
1247
- "outline-sm": __spreadValues$h({
1530
+ }, getColorsAndStatesByPath("buttons.outline", {
1531
+ states: {
1532
+ active: false,
1533
+ checked: false,
1534
+ disabled: false,
1535
+ focus: false,
1536
+ hover: false,
1537
+ readonly: false,
1538
+ selected: false
1539
+ }
1540
+ })),
1541
+ "outline-sm": __spreadValues$i({
1248
1542
  variant: "buttons.outline"
1249
1543
  }, smallButton),
1250
- "transparent-sm": __spreadValues$h({
1544
+ "transparent-sm": __spreadValues$i({
1251
1545
  variant: "buttons.outline",
1252
1546
  "&:focus, &:focus-visible": {},
1253
1547
  bg: "transparent",
@@ -1256,18 +1550,18 @@ const buttons = {
1256
1550
  font: "inherit",
1257
1551
  textTransform: "inherit"
1258
1552
  }, smallButton),
1259
- "outline-danger": __spreadValues$h({
1553
+ "outline-danger": __spreadValues$i({
1260
1554
  variant: "buttons.outline",
1261
1555
  "&:focus, &:focus-visible": {}
1262
1556
  }, getColorsAndStatesByPath("buttons.outlineDanger")),
1263
- "outline-danger-sm": __spreadValues$h({
1557
+ "outline-danger-sm": __spreadValues$i({
1264
1558
  variant: "buttons.outline-danger"
1265
1559
  }, smallButton),
1266
- "outline-warning": __spreadValues$h({
1560
+ "outline-warning": __spreadValues$i({
1267
1561
  variant: "buttons.outline",
1268
1562
  "&:focus, &:focus-visible": {}
1269
1563
  }, getColorsAndStatesByPath("buttons.outlineWarning")),
1270
- "outline-warning-sm": __spreadValues$h({
1564
+ "outline-warning-sm": __spreadValues$i({
1271
1565
  variant: "buttons.outline-warning"
1272
1566
  }, smallButton),
1273
1567
  "outline-extended": {
@@ -1297,7 +1591,7 @@ const buttons = {
1297
1591
  gridColumnEnd: 3
1298
1592
  }
1299
1593
  },
1300
- tableAccordion: __spreadValues$h({
1594
+ tableAccordion: __spreadValues$i({
1301
1595
  variant: "buttons.accordion",
1302
1596
  fontSize: "text.default",
1303
1597
  p: spacing(3),
@@ -1306,7 +1600,7 @@ const buttons = {
1306
1600
  color: "background"
1307
1601
  }
1308
1602
  }, getColorsAndStatesByPath("buttons.tableAccordion")),
1309
- tableHeader: __spreadValues$h({
1603
+ tableHeader: __spreadValues$i({
1310
1604
  variant: "buttons.tableAccordion",
1311
1605
  alignItems: "center",
1312
1606
  justifyContent: "center",
@@ -1315,89 +1609,419 @@ const buttons = {
1315
1609
  svg: {
1316
1610
  ml: spacing(2)
1317
1611
  }
1318
- }, getColorsAndStatesByPath("buttons.tableHeader"))
1612
+ }, getColorsAndStatesByPath("buttons.tableHeader")),
1613
+ paper: __spreadValues$i({
1614
+ variant: "buttons.primary",
1615
+ borderWidth: "2px",
1616
+ borderStyle: "solid",
1617
+ borderRadius: "buttons"
1618
+ }, getColorsAndStatesByPath("buttons.paper")),
1619
+ "paper-sm": __spreadValues$i(__spreadValues$i({
1620
+ variant: "buttons.primary",
1621
+ borderWidth: "2px",
1622
+ borderStyle: "solid",
1623
+ borderRadius: "buttons"
1624
+ }, getColorsAndStatesByPath("buttons.paper")), smallButton)
1319
1625
  };
1320
1626
 
1321
- var __defProp$g = Object.defineProperty;
1322
- var __getOwnPropSymbols$g = Object.getOwnPropertySymbols;
1323
- var __hasOwnProp$g = Object.prototype.hasOwnProperty;
1324
- var __propIsEnum$g = Object.prototype.propertyIsEnumerable;
1325
- var __defNormalProp$g = (obj, key, value) => key in obj ? __defProp$g(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1326
- var __spreadValues$g = (a, b) => {
1327
- for (var prop in b || (b = {}))
1328
- if (__hasOwnProp$g.call(b, prop))
1329
- __defNormalProp$g(a, prop, b[prop]);
1330
- if (__getOwnPropSymbols$g)
1331
- for (var prop of __getOwnPropSymbols$g(b)) {
1332
- if (__propIsEnum$g.call(b, prop))
1333
- __defNormalProp$g(a, prop, b[prop]);
1334
- }
1335
- return a;
1336
- };
1337
- const customCheckbox = __spreadValues$g({
1338
- display: "inline-flex",
1339
- borderRadius: "default",
1340
- flexBasis: "32px",
1341
- flexShrink: 0,
1342
- width: "32px",
1343
- height: "32px",
1344
- alignItems: "center",
1345
- justifyContent: "center",
1346
- p: "3px",
1347
- border: "1px solid",
1348
- svg: {
1349
- width: "20px"
1350
- }
1351
- }, getColorsAndStatesByPath("form.fields", {
1352
- states: {
1353
- active: false,
1354
- hover: false,
1355
- focus: false
1627
+ const text = {
1628
+ default: {
1629
+ color: "palette.text.primary",
1630
+ fontFamily: "body",
1631
+ fontWeight: "body",
1632
+ fontSize: 16,
1633
+ m: spacing(0),
1634
+ width: "100%"
1635
+ },
1636
+ title: {
1637
+ letterSpacing: "heading",
1638
+ wordBreak: "normal",
1639
+ color: "title",
1640
+ fontFamily: "heading",
1641
+ lineHeight: "heading",
1642
+ fontWeight: "heading"
1356
1643
  }
1357
- }));
1358
-
1359
- var __defProp$f = Object.defineProperty;
1360
- var __defProps$8 = Object.defineProperties;
1361
- var __getOwnPropDescs$8 = Object.getOwnPropertyDescriptors;
1362
- var __getOwnPropSymbols$f = Object.getOwnPropertySymbols;
1363
- var __hasOwnProp$f = Object.prototype.hasOwnProperty;
1364
- var __propIsEnum$f = Object.prototype.propertyIsEnumerable;
1365
- var __defNormalProp$f = (obj, key, value) => key in obj ? __defProp$f(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1366
- var __spreadValues$f = (a, b) => {
1367
- for (var prop in b || (b = {}))
1368
- if (__hasOwnProp$f.call(b, prop))
1369
- __defNormalProp$f(a, prop, b[prop]);
1370
- if (__getOwnPropSymbols$f)
1371
- for (var prop of __getOwnPropSymbols$f(b)) {
1372
- if (__propIsEnum$f.call(b, prop))
1373
- __defNormalProp$f(a, prop, b[prop]);
1374
- }
1375
- return a;
1376
1644
  };
1377
- var __spreadProps$8 = (a, b) => __defProps$8(a, __getOwnPropDescs$8(b));
1378
- const checkbox = __spreadProps$8(__spreadValues$f({
1379
- borderRadius: "default"
1380
- }, getColorsAndStatesByPath("form.fields", {
1381
- states: {
1382
- active: false,
1383
- focus: false,
1384
- hover: false
1385
- }
1386
- })), {
1387
- backgroundColor: "unset",
1388
- alignItems: "center",
1389
- "&.nativeCheckbox": {
1390
- appearance: "none",
1391
- width: "25px",
1392
- height: "25px",
1393
- border: "solid 1px #cccccc",
1394
- marginRight: "8px",
1395
- position: "relative",
1396
- cursor: "pointer",
1397
- "&:checked::before": {
1398
- content: '"\u2713"',
1399
- color: "palette.text.primary",
1400
- position: "absolute",
1645
+
1646
+ const transitions = {
1647
+ "@keyframes growHorizontal": {
1648
+ from: { transform: "scaleX(0)" },
1649
+ to: { transform: "scaleY(100%)" }
1650
+ },
1651
+ ".hamburguerMenu": { display: "none" },
1652
+ ".hamburguerMenu-enter,\n.hamburguerMenu-appear": {
1653
+ display: "block",
1654
+ transform: "scale(0.7)",
1655
+ opacity: 0
1656
+ },
1657
+ ".hamburguerMenu-enter-active,\n.hamburguerMenu-appear-active": {
1658
+ transform: "translateX(0)",
1659
+ transition: "opacity 150ms, transform 150ms",
1660
+ transformOrigin: "right top",
1661
+ opacity: 1
1662
+ },
1663
+ ".hamburguerMenu-enter-done,\n.hamburguerMenu-appear-done": {
1664
+ display: "block"
1665
+ },
1666
+ ".hamburguerMenu-exit": {
1667
+ display: "block",
1668
+ transform: "scale(1)",
1669
+ opacity: 1
1670
+ },
1671
+ ".hamburguerMenu-exit-active": {
1672
+ transform: "scale(0.7) translateX(0)",
1673
+ transition: "opacity 150ms, transform 150ms",
1674
+ display: "block",
1675
+ opacity: 0,
1676
+ transformOrigin: "right top"
1677
+ },
1678
+ ".hamburguerMenu-exit-done": { display: "none" },
1679
+ ".modal-enter,\n.modal-appear": { opacity: 0, transform: "scale(0.8)" },
1680
+ ".modal-enter-active,\n.modal-appear-active": {
1681
+ opacity: 1,
1682
+ transform: "translateX(0)",
1683
+ transition: "opacity 150ms, transform 150ms",
1684
+ transitionDelay: "0"
1685
+ },
1686
+ ".modal-exit": { opacity: 0 },
1687
+ ".modal-exit-done": { opacity: 0, display: "none" },
1688
+ ".modal-exit-active": {
1689
+ opacity: 0,
1690
+ transform: "scale(100)",
1691
+ transition: "opacity 150ms, transform 150ms",
1692
+ transitionDelay: "0"
1693
+ },
1694
+ ".overlayAnimation-enter .overlayAnimation:not(.not-released),\n.overlayAnimation-appear .overlayAnimation:not(.not-released)": {
1695
+ opacity: 0
1696
+ },
1697
+ ".overlayAnimation-enter-active .overlayAnimation:not(.not-released),\n.overlayAnimation-appear-active .overlayAnimation:not(.not-released)": {
1698
+ opacity: 1,
1699
+ transition: "opacity 150ms"
1700
+ },
1701
+ ".overlayAnimation-exit": { opacity: 1 },
1702
+ ".overlayAnimation-exit-active": { opacity: 0, transition: "opacity 150ms" },
1703
+ ".fromRight-enter,\n.fromRight-appear": { transform: "translateX(550px)" },
1704
+ ".fromRight-enter-active,\n.fromRight-appear-active": {
1705
+ transition: "transform 150ms",
1706
+ transform: "translateX(0)"
1707
+ },
1708
+ ".fromRight-exit": { transform: "translateX(0)" },
1709
+ ".fromRight-exit-active": {
1710
+ transition: "transform 150ms",
1711
+ transform: "translateX(550px)"
1712
+ },
1713
+ ".notification-enter,\n.notification-appear": {
1714
+ opacity: 0,
1715
+ transform: "scale(0.8)"
1716
+ },
1717
+ ".notification-enter-active,\n.notification-appear-active": {
1718
+ opacity: 1,
1719
+ transform: "translateX(0)",
1720
+ transition: "opacity 150ms, transform 150ms",
1721
+ transitionDelay: "0"
1722
+ },
1723
+ ".notification-exit": { opacity: 1 },
1724
+ ".notification-exit-active": {
1725
+ opacity: 0,
1726
+ transform: "scale(0.8)",
1727
+ transition: "opacity 150ms, transform 150ms",
1728
+ transitionDelay: "0"
1729
+ }
1730
+ };
1731
+
1732
+ var __defProp$h = Object.defineProperty;
1733
+ var __getOwnPropSymbols$h = Object.getOwnPropertySymbols;
1734
+ var __hasOwnProp$h = Object.prototype.hasOwnProperty;
1735
+ var __propIsEnum$h = Object.prototype.propertyIsEnumerable;
1736
+ var __defNormalProp$h = (obj, key, value) => key in obj ? __defProp$h(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1737
+ var __spreadValues$h = (a, b) => {
1738
+ for (var prop in b || (b = {}))
1739
+ if (__hasOwnProp$h.call(b, prop))
1740
+ __defNormalProp$h(a, prop, b[prop]);
1741
+ if (__getOwnPropSymbols$h)
1742
+ for (var prop of __getOwnPropSymbols$h(b)) {
1743
+ if (__propIsEnum$h.call(b, prop))
1744
+ __defNormalProp$h(a, prop, b[prop]);
1745
+ }
1746
+ return a;
1747
+ };
1748
+ const root = __spreadValues$h({
1749
+ height: "100%",
1750
+ "*": {
1751
+ fontFamily: "body",
1752
+ fontWeight: "body",
1753
+ code: {
1754
+ fontFamily: "monospace"
1755
+ },
1756
+ "&:focus": focusOutline
1757
+ },
1758
+ body: {
1759
+ minHeight: "100vh"
1760
+ },
1761
+ h1: {
1762
+ fontSize: responsive$1({ 0: 26, 3: 32 })
1763
+ },
1764
+ h2: {
1765
+ fontSize: responsive$1({ 0: 22, 3: 28 })
1766
+ },
1767
+ h3: {
1768
+ fontSize: responsive$1({ 0: 19, 3: 25 })
1769
+ },
1770
+ h4: {
1771
+ fontSize: responsive$1({ 0: 18, 3: 22 })
1772
+ },
1773
+ h5: {
1774
+ fontSize: responsive$1({ 0: 18, 3: 22 })
1775
+ },
1776
+ h6: {
1777
+ fontSize: responsive$1({ 0: 17, 3: 17 })
1778
+ },
1779
+ "h1,h2,h3,h4,h5,h6": {
1780
+ letterSpacing: "heading",
1781
+ lineHeight: "heading",
1782
+ variant: "text.title"
1783
+ },
1784
+ "*:not(h1, h2, h3, h4, h5, h6, code)": {
1785
+ fontFamily: "body",
1786
+ fontSize: 16,
1787
+ fontWeight: "body",
1788
+ letterSpacing: "body",
1789
+ lineHeight: "body"
1790
+ },
1791
+ a: {
1792
+ textDecoration: "underline"
1793
+ },
1794
+ "textarea,a": {
1795
+ transition: "color 200ms ease-out",
1796
+ ":focus": __spreadValues$h({}, focusOutline),
1797
+ ":focus-visible": __spreadValues$h({}, focusOutline)
1798
+ },
1799
+ "*:focus": focusOutline,
1800
+ ul: {
1801
+ listStyle: "none",
1802
+ listStyleType: "none",
1803
+ margin: 0,
1804
+ padding: 0
1805
+ },
1806
+ abbr: {
1807
+ "&.required": {
1808
+ textDecoration: "none",
1809
+ border: "none",
1810
+ mx: 1,
1811
+ alignSelf: "baseline",
1812
+ fontWeight: "bold",
1813
+ color: "danger"
1814
+ }
1815
+ },
1816
+ table: {
1817
+ borderCollapse: "separate",
1818
+ borderSpacing: 0
1819
+ },
1820
+ "& label": {
1821
+ display: "flex",
1822
+ "& > span": {
1823
+ mb: spacing(1),
1824
+ fontWeight: "bold"
1825
+ },
1826
+ "&.required": {
1827
+ position: "relative",
1828
+ "&::before": {
1829
+ color: "danger",
1830
+ position: "absolute",
1831
+ content: '"*"',
1832
+ top: 0,
1833
+ left: "-10px"
1834
+ },
1835
+ "*:invalid": {
1836
+ borderColor: "danger"
1837
+ }
1838
+ }
1839
+ },
1840
+ ".bold": {
1841
+ fontWeight: "bold"
1842
+ },
1843
+ ".light": {
1844
+ fontWeight: "light"
1845
+ },
1846
+ ".Left": {
1847
+ textAlign: "left !important"
1848
+ },
1849
+ ".Center": {
1850
+ textAlign: "center !important"
1851
+ },
1852
+ ".Right": {
1853
+ textAlign: "right !important"
1854
+ },
1855
+ ".Justify": {
1856
+ textAlign: "justify !important"
1857
+ },
1858
+ ".Bottom": {
1859
+ verticalAlign: "bottom !important"
1860
+ },
1861
+ ".Middle": {
1862
+ verticalAlign: "middle !important"
1863
+ },
1864
+ ".Top": {
1865
+ verticalAlign: "top !important"
1866
+ },
1867
+ ".hidden": {
1868
+ display: "none"
1869
+ }
1870
+ }, transitions);
1871
+
1872
+ const baseTheme = () => {
1873
+ return {
1874
+ alerts,
1875
+ breakpoints: [
1876
+ "0px",
1877
+ "250px",
1878
+ "500px",
1879
+ "700px",
1880
+ "1000px",
1881
+ "1260px",
1882
+ "1580px"
1883
+ ],
1884
+ buttons,
1885
+ colors: {},
1886
+ fonts: {
1887
+ body: "Arial",
1888
+ heading: "inherit",
1889
+ monospace: "Menlo, monospace"
1890
+ },
1891
+ fontSizes: Array(60).fill(1).map((_, i) => {
1892
+ return i;
1893
+ }),
1894
+ forms: {},
1895
+ layout: {
1896
+ root
1897
+ },
1898
+ lineHeights: {
1899
+ body: 1.5,
1900
+ heading: 1.125
1901
+ },
1902
+ letterSpacings: {
1903
+ body: "0.01em",
1904
+ heading: "-0.015em"
1905
+ },
1906
+ radii: {
1907
+ alerts: 0,
1908
+ buttons: 0,
1909
+ default: 0
1910
+ },
1911
+ shadows: {
1912
+ modals: "",
1913
+ tabs: ""
1914
+ },
1915
+ space: [0, 2, 4, 8, 12, 16, 24, 32, 40, 48, 64, 80, 96, 112, 128],
1916
+ sizes: {
1917
+ // Layout
1918
+ applicationMenu: "350px",
1919
+ floatingNotifications: "min(550px, calc(100vw - 30px))",
1920
+ root: "992px",
1921
+ mainImage: "64px",
1922
+ twoColumns: "calc(992px + 350px)",
1923
+ twoColumnsCentered: "calc(992px + 350px + 16px)",
1924
+ // Icons
1925
+ iconXs: "12px",
1926
+ iconSm: "16px",
1927
+ iconMd: "22px",
1928
+ iconLg: "32px",
1929
+ iconXl: "48px"
1930
+ },
1931
+ text,
1932
+ zIndices: {
1933
+ stickyElements: 600,
1934
+ menu: 1e3,
1935
+ maximizedTables: 1100,
1936
+ modal: 1200,
1937
+ tooltip: 1400,
1938
+ notifications: 1600,
1939
+ contextMenu: 1800
1940
+ },
1941
+ useRootStyles: true
1942
+ };
1943
+ };
1944
+
1945
+ var __defProp$g = Object.defineProperty;
1946
+ var __getOwnPropSymbols$g = Object.getOwnPropertySymbols;
1947
+ var __hasOwnProp$g = Object.prototype.hasOwnProperty;
1948
+ var __propIsEnum$g = Object.prototype.propertyIsEnumerable;
1949
+ var __defNormalProp$g = (obj, key, value) => key in obj ? __defProp$g(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1950
+ var __spreadValues$g = (a, b) => {
1951
+ for (var prop in b || (b = {}))
1952
+ if (__hasOwnProp$g.call(b, prop))
1953
+ __defNormalProp$g(a, prop, b[prop]);
1954
+ if (__getOwnPropSymbols$g)
1955
+ for (var prop of __getOwnPropSymbols$g(b)) {
1956
+ if (__propIsEnum$g.call(b, prop))
1957
+ __defNormalProp$g(a, prop, b[prop]);
1958
+ }
1959
+ return a;
1960
+ };
1961
+ const customCheckbox = __spreadValues$g({
1962
+ display: "inline-flex",
1963
+ borderRadius: "default",
1964
+ flexBasis: "32px",
1965
+ flexShrink: 0,
1966
+ width: "32px",
1967
+ height: "32px",
1968
+ alignItems: "center",
1969
+ justifyContent: "center",
1970
+ p: "3px",
1971
+ border: "1px solid",
1972
+ svg: {
1973
+ width: "20px"
1974
+ }
1975
+ }, getColorsAndStatesByPath("form.fields", {
1976
+ states: {
1977
+ active: false,
1978
+ hover: false,
1979
+ focus: false
1980
+ }
1981
+ }));
1982
+
1983
+ var __defProp$f = Object.defineProperty;
1984
+ var __defProps$9 = Object.defineProperties;
1985
+ var __getOwnPropDescs$9 = Object.getOwnPropertyDescriptors;
1986
+ var __getOwnPropSymbols$f = Object.getOwnPropertySymbols;
1987
+ var __hasOwnProp$f = Object.prototype.hasOwnProperty;
1988
+ var __propIsEnum$f = Object.prototype.propertyIsEnumerable;
1989
+ var __defNormalProp$f = (obj, key, value) => key in obj ? __defProp$f(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1990
+ var __spreadValues$f = (a, b) => {
1991
+ for (var prop in b || (b = {}))
1992
+ if (__hasOwnProp$f.call(b, prop))
1993
+ __defNormalProp$f(a, prop, b[prop]);
1994
+ if (__getOwnPropSymbols$f)
1995
+ for (var prop of __getOwnPropSymbols$f(b)) {
1996
+ if (__propIsEnum$f.call(b, prop))
1997
+ __defNormalProp$f(a, prop, b[prop]);
1998
+ }
1999
+ return a;
2000
+ };
2001
+ var __spreadProps$9 = (a, b) => __defProps$9(a, __getOwnPropDescs$9(b));
2002
+ const checkbox = __spreadProps$9(__spreadValues$f({
2003
+ borderRadius: "default"
2004
+ }, getColorsAndStatesByPath("form.fields", {
2005
+ states: {
2006
+ active: false,
2007
+ focus: false,
2008
+ hover: false
2009
+ }
2010
+ })), {
2011
+ backgroundColor: "unset",
2012
+ alignItems: "center",
2013
+ "&.nativeCheckbox": {
2014
+ appearance: "none",
2015
+ width: "25px",
2016
+ height: "25px",
2017
+ border: "solid 1px #cccccc",
2018
+ marginRight: "8px",
2019
+ position: "relative",
2020
+ cursor: "pointer",
2021
+ "&:checked::before": {
2022
+ content: '"\u2713"',
2023
+ color: "palette.text.primary",
2024
+ position: "absolute",
1401
2025
  display: "flex",
1402
2026
  alignItems: "center",
1403
2027
  justifyContent: "center",
@@ -1430,8 +2054,8 @@ const checkbox = __spreadProps$8(__spreadValues$f({
1430
2054
  });
1431
2055
 
1432
2056
  var __defProp$e = Object.defineProperty;
1433
- var __defProps$7 = Object.defineProperties;
1434
- var __getOwnPropDescs$7 = Object.getOwnPropertyDescriptors;
2057
+ var __defProps$8 = Object.defineProperties;
2058
+ var __getOwnPropDescs$8 = Object.getOwnPropertyDescriptors;
1435
2059
  var __getOwnPropSymbols$e = Object.getOwnPropertySymbols;
1436
2060
  var __hasOwnProp$e = Object.prototype.hasOwnProperty;
1437
2061
  var __propIsEnum$e = Object.prototype.propertyIsEnumerable;
@@ -1447,8 +2071,8 @@ var __spreadValues$e = (a, b) => {
1447
2071
  }
1448
2072
  return a;
1449
2073
  };
1450
- var __spreadProps$7 = (a, b) => __defProps$7(a, __getOwnPropDescs$7(b));
1451
- const dateInput = __spreadProps$7(__spreadValues$e({
2074
+ var __spreadProps$8 = (a, b) => __defProps$8(a, __getOwnPropDescs$8(b));
2075
+ const dateInput = __spreadProps$8(__spreadValues$e({
1452
2076
  display: "flex",
1453
2077
  flexDirection: "column",
1454
2078
  alignItems: "stretch",
@@ -1538,8 +2162,8 @@ const iconInput = {
1538
2162
  };
1539
2163
 
1540
2164
  var __defProp$c = Object.defineProperty;
1541
- var __defProps$6 = Object.defineProperties;
1542
- var __getOwnPropDescs$6 = Object.getOwnPropertyDescriptors;
2165
+ var __defProps$7 = Object.defineProperties;
2166
+ var __getOwnPropDescs$7 = Object.getOwnPropertyDescriptors;
1543
2167
  var __getOwnPropSymbols$c = Object.getOwnPropertySymbols;
1544
2168
  var __hasOwnProp$c = Object.prototype.hasOwnProperty;
1545
2169
  var __propIsEnum$c = Object.prototype.propertyIsEnumerable;
@@ -1555,8 +2179,8 @@ var __spreadValues$c = (a, b) => {
1555
2179
  }
1556
2180
  return a;
1557
2181
  };
1558
- var __spreadProps$6 = (a, b) => __defProps$6(a, __getOwnPropDescs$6(b));
1559
- const input = __spreadProps$6(__spreadValues$c({
2182
+ var __spreadProps$7 = (a, b) => __defProps$7(a, __getOwnPropDescs$7(b));
2183
+ const input = __spreadProps$7(__spreadValues$c({
1560
2184
  variant: "text.default",
1561
2185
  border: "1px solid",
1562
2186
  borderRadius: "default",
@@ -1686,8 +2310,8 @@ const select = __spreadValues$a({
1686
2310
  }));
1687
2311
 
1688
2312
  var __defProp$9 = Object.defineProperty;
1689
- var __defProps$5 = Object.defineProperties;
1690
- var __getOwnPropDescs$5 = Object.getOwnPropertyDescriptors;
2313
+ var __defProps$6 = Object.defineProperties;
2314
+ var __getOwnPropDescs$6 = Object.getOwnPropertyDescriptors;
1691
2315
  var __getOwnPropSymbols$9 = Object.getOwnPropertySymbols;
1692
2316
  var __hasOwnProp$9 = Object.prototype.hasOwnProperty;
1693
2317
  var __propIsEnum$9 = Object.prototype.propertyIsEnumerable;
@@ -1703,42 +2327,41 @@ var __spreadValues$9 = (a, b) => {
1703
2327
  }
1704
2328
  return a;
1705
2329
  };
1706
- var __spreadProps$5 = (a, b) => __defProps$5(a, __getOwnPropDescs$5(b));
1707
- const selectMultiple = __spreadValues$9({
1708
- variant: "text.default",
1709
- height: "100%",
1710
- padding: "4px",
1711
- borderRadius: "default",
1712
- border: "1px solid",
1713
- width: "100%",
1714
- transition: "background-color 100ms ease-out, color 100ms ease-out",
1715
- overflow: "auto",
1716
- option: __spreadProps$5(__spreadValues$9({
1717
- padding: 2
1718
- }, getSelectedColors()), {
1719
- "&:checked": {
1720
- backgroundColor: window.currentPalette.getColor(
1721
- window.currentPalette.background.paper,
1722
- "selected"
1723
- ),
1724
- color: window.currentPalette.getContrastText(
1725
- window.currentPalette.getColor(
1726
- window.currentPalette.background.paper,
2330
+ var __spreadProps$6 = (a, b) => __defProps$6(a, __getOwnPropDescs$6(b));
2331
+ function selectMultiple(theme) {
2332
+ return __spreadValues$9({
2333
+ variant: "text.default",
2334
+ height: "100%",
2335
+ padding: "4px",
2336
+ borderRadius: "default",
2337
+ border: "1px solid",
2338
+ width: "100%",
2339
+ transition: "background-color 100ms ease-out, color 100ms ease-out",
2340
+ overflow: "auto",
2341
+ option: __spreadProps$6(__spreadValues$9({
2342
+ padding: 2
2343
+ }, getSelectedColors(theme)), {
2344
+ "&:checked": {
2345
+ backgroundColor: theme.palette.getColor(
2346
+ theme.palette.background.paper,
1727
2347
  "selected"
2348
+ ),
2349
+ color: theme.palette.getContrastText(
2350
+ theme.palette.getColor(theme.palette.background.paper, "selected")
1728
2351
  )
1729
- )
2352
+ }
2353
+ }),
2354
+ "+ svg": {
2355
+ display: "none"
1730
2356
  }
1731
- }),
1732
- "+ svg": {
1733
- display: "none"
1734
- }
1735
- }, getColorsAndStatesByPath("form.fields", {
1736
- states: {
1737
- active: false,
1738
- hover: false,
1739
- focus: false
1740
- }
1741
- }));
2357
+ }, theme.palette.getStatesFromPath("form.fields", {
2358
+ states: {
2359
+ active: false,
2360
+ hover: false,
2361
+ focus: false
2362
+ }
2363
+ }));
2364
+ }
1742
2365
 
1743
2366
  const Switch = {
1744
2367
  "+ span": {
@@ -1761,8 +2384,8 @@ const textarea = {
1761
2384
  };
1762
2385
 
1763
2386
  var __defProp$8 = Object.defineProperty;
1764
- var __defProps$4 = Object.defineProperties;
1765
- var __getOwnPropDescs$4 = Object.getOwnPropertyDescriptors;
2387
+ var __defProps$5 = Object.defineProperties;
2388
+ var __getOwnPropDescs$5 = Object.getOwnPropertyDescriptors;
1766
2389
  var __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;
1767
2390
  var __hasOwnProp$8 = Object.prototype.hasOwnProperty;
1768
2391
  var __propIsEnum$8 = Object.prototype.propertyIsEnumerable;
@@ -1778,7 +2401,7 @@ var __spreadValues$8 = (a, b) => {
1778
2401
  }
1779
2402
  return a;
1780
2403
  };
1781
- var __spreadProps$4 = (a, b) => __defProps$4(a, __getOwnPropDescs$4(b));
2404
+ var __spreadProps$5 = (a, b) => __defProps$5(a, __getOwnPropDescs$5(b));
1782
2405
  const deletableInput = {
1783
2406
  border: "1px solid",
1784
2407
  borderColor: "palette.border.field",
@@ -1796,7 +2419,7 @@ const deletableInput = {
1796
2419
  top: 0,
1797
2420
  width: "45px"
1798
2421
  }, getColorsAndStatesByPath("buttons.deletableInputButton")),
1799
- "&:focus-within:not(.asMaterial)": __spreadProps$4(__spreadValues$8({}, focusOutline), {
2422
+ "&:focus-within:not(.asMaterial)": __spreadProps$5(__spreadValues$8({}, focusOutline), {
1800
2423
  ".deletableInput__input:focus": {
1801
2424
  outline: "none"
1802
2425
  },
@@ -1834,7 +2457,7 @@ const deletableInput = {
1834
2457
  }
1835
2458
  };
1836
2459
 
1837
- const forms$1 = () => {
2460
+ const forms$1 = (theme) => {
1838
2461
  return {
1839
2462
  checkbox,
1840
2463
  customCheckbox,
@@ -1845,7 +2468,7 @@ const forms$1 = () => {
1845
2468
  label,
1846
2469
  radio,
1847
2470
  select,
1848
- selectMultiple,
2471
+ selectMultiple: selectMultiple(theme),
1849
2472
  switch: Switch,
1850
2473
  textarea,
1851
2474
  /* PREPEND HERE */
@@ -1867,40 +2490,30 @@ const overlay = {
1867
2490
  height: "100vh",
1868
2491
  display: "flex",
1869
2492
  justifyContent: "center",
1870
- padding: "1.5em 1.5em",
1871
2493
  alignItems: "center",
1872
2494
  backgroundColor: `palette.background.overlay`,
1873
2495
  zIndex: "modal",
1874
2496
  "&:not(.screenLock) .modal-enter-done": {
1875
2497
  boxShadow: "modals"
1876
2498
  }
2499
+ },
2500
+ "overlay--stretch": {
2501
+ variant: "layout.common.modals.overlay",
2502
+ alignItems: responsive$1({ 0: "stretch", 2: "center" })
1877
2503
  }
1878
2504
  };
1879
2505
 
1880
2506
  const apiaApi = {
1881
- margin: "auto",
1882
2507
  display: "flex",
1883
- flexDirection: "column",
1884
- wordBreak: "break-word",
1885
- overflow: "hidden",
1886
2508
  width: "100%",
1887
2509
  ".handler__form": {
1888
2510
  display: "flex",
1889
2511
  flexDirection: "column",
1890
- overflow: "hidden",
2512
+ width: "100%",
1891
2513
  gap: spacing(6),
1892
- ".toggleAccordionElement": {
1893
- position: "sticky",
1894
- top: 0
1895
- },
1896
2514
  ".handler__form__elements": {
1897
- display: "flex",
1898
- flexDirection: "column",
1899
- alignItems: "stretch",
1900
- overflowY: "auto",
1901
- maxHeight: "60vh",
1902
- gap: spacing(3),
1903
- pr: spacing(3)
2515
+ flexShrink: 1,
2516
+ overflow: "auto"
1904
2517
  },
1905
2518
  ".handler__form__elements__section__content": {
1906
2519
  display: "flex",
@@ -1919,10 +2532,9 @@ const apiaApi = {
1919
2532
  ".handler__form__buttons": {
1920
2533
  display: "flex",
1921
2534
  flexDirection: "row",
1922
- justifyContent: "center",
2535
+ justifyContent: "end",
1923
2536
  p: 0,
1924
- gap: "0px",
1925
- textAlign: "center"
2537
+ gap: "0px"
1926
2538
  },
1927
2539
  ".radio": {
1928
2540
  display: "flex",
@@ -1966,8 +2578,8 @@ const apiaApi = {
1966
2578
  };
1967
2579
 
1968
2580
  var __defProp$7 = Object.defineProperty;
1969
- var __defProps$3 = Object.defineProperties;
1970
- var __getOwnPropDescs$3 = Object.getOwnPropertyDescriptors;
2581
+ var __defProps$4 = Object.defineProperties;
2582
+ var __getOwnPropDescs$4 = Object.getOwnPropertyDescriptors;
1971
2583
  var __getOwnPropSymbols$7 = Object.getOwnPropertySymbols;
1972
2584
  var __hasOwnProp$7 = Object.prototype.hasOwnProperty;
1973
2585
  var __propIsEnum$7 = Object.prototype.propertyIsEnumerable;
@@ -1983,8 +2595,8 @@ var __spreadValues$7 = (a, b) => {
1983
2595
  }
1984
2596
  return a;
1985
2597
  };
1986
- var __spreadProps$3 = (a, b) => __defProps$3(a, __getOwnPropDescs$3(b));
1987
- const modals = __spreadProps$3(__spreadValues$7({
2598
+ var __spreadProps$4 = (a, b) => __defProps$4(a, __getOwnPropDescs$4(b));
2599
+ const modals = __spreadProps$4(__spreadValues$7({
1988
2600
  apiaApi
1989
2601
  }, overlay), {
1990
2602
  main: __spreadValues$7({
@@ -2014,6 +2626,7 @@ const modals = __spreadProps$3(__spreadValues$7({
2014
2626
  ".modal__headerBar": {
2015
2627
  display: "flex",
2016
2628
  flexDirection: "row",
2629
+ alignItems: "center",
2017
2630
  gap: spacing(3)
2018
2631
  }
2019
2632
  },
@@ -2063,7 +2676,8 @@ const modals = __spreadProps$3(__spreadValues$7({
2063
2676
  },
2064
2677
  "md-fixed": {
2065
2678
  variant: "layout.common.modals.main",
2066
- width: "min(500px, calc(100vw - 10px))"
2679
+ width: "min(500px, calc(100vw - 10px))",
2680
+ maxHeight: responsive$1({ 0: "95vh", 2: "80vh" })
2067
2681
  },
2068
2682
  lg: {
2069
2683
  variant: "layout.common.modals.main",
@@ -2071,7 +2685,7 @@ const modals = __spreadProps$3(__spreadValues$7({
2071
2685
  },
2072
2686
  "lg-fixed": {
2073
2687
  variant: "layout.common.modals.main",
2074
- maxWidth: "640px",
2688
+ width: "640px",
2075
2689
  height: "60vh"
2076
2690
  },
2077
2691
  xl: {
@@ -2088,6 +2702,11 @@ const modals = __spreadProps$3(__spreadValues$7({
2088
2702
  width: responsive$1({ 0: "95vw", 2: "80vw" }),
2089
2703
  maxHeight: responsive$1({ 0: "95vh", 2: "80vh" })
2090
2704
  },
2705
+ "xxl-fixed": {
2706
+ variant: "layout.common.modals.main",
2707
+ width: responsive$1({ 0: "95vw", 2: "80vw" }),
2708
+ height: responsive$1({ 0: "95vh", 2: "80vh" })
2709
+ },
2091
2710
  xxxl: {
2092
2711
  variant: "layout.common.modals.main",
2093
2712
  width: responsive$1({ 0: "95vw", 2: "95vw" }),
@@ -2109,13 +2728,7 @@ const modals = __spreadProps$3(__spreadValues$7({
2109
2728
  },
2110
2729
  cal: {
2111
2730
  variant: "layout.common.modals.sm",
2112
- width: "350px",
2113
- ".react-calendar": {
2114
- backgroundColor: "palette.background.paper",
2115
- button: __spreadProps$3(__spreadValues$7({}, getColorsAndStatesByPath("form.fields")), {
2116
- "&.react-calendar__tile--active": __spreadValues$7({}, getColorsAndStatesByPath("buttons.primary"))
2117
- })
2118
- }
2731
+ width: "350px"
2119
2732
  },
2120
2733
  editGrid: {
2121
2734
  variant: "layout.common.modals.main",
@@ -2126,8 +2739,8 @@ const modals = __spreadProps$3(__spreadValues$7({
2126
2739
  });
2127
2740
 
2128
2741
  var __defProp$6 = Object.defineProperty;
2129
- var __defProps$2 = Object.defineProperties;
2130
- var __getOwnPropDescs$2 = Object.getOwnPropertyDescriptors;
2742
+ var __defProps$3 = Object.defineProperties;
2743
+ var __getOwnPropDescs$3 = Object.getOwnPropertyDescriptors;
2131
2744
  var __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;
2132
2745
  var __hasOwnProp$6 = Object.prototype.hasOwnProperty;
2133
2746
  var __propIsEnum$6 = Object.prototype.propertyIsEnumerable;
@@ -2143,25 +2756,25 @@ var __spreadValues$6 = (a, b) => {
2143
2756
  }
2144
2757
  return a;
2145
2758
  };
2146
- var __spreadProps$2 = (a, b) => __defProps$2(a, __getOwnPropDescs$2(b));
2759
+ var __spreadProps$3 = (a, b) => __defProps$3(a, __getOwnPropDescs$3(b));
2147
2760
  function getSelectionStyles() {
2148
2761
  return {
2149
2762
  'td[data-focused="false"], th[data-focused="false"]': {
2150
2763
  "*:focus-visible, &:focus, &:focus-visible": {
2151
2764
  outline: "none"
2152
2765
  },
2153
- "*:focus": __spreadValues$6({}, focusOutline$1)
2766
+ "*:focus": __spreadValues$6({}, focusOutline)
2154
2767
  },
2155
2768
  '[data-focused="true"]:not(.row__separator__cell)': {
2156
2769
  '&:not([data-editionmode="true"])': {
2157
- "&:focus, & > *:focus, *:focus-visible": __spreadProps$2(__spreadValues$6({}, focusOutline$1), {
2770
+ "&:focus, & > *:focus, *:focus-visible": __spreadProps$3(__spreadValues$6({}, focusOutline), {
2158
2771
  "&.cell__download__document": {
2159
2772
  outlineOffset: 0
2160
2773
  }
2161
2774
  })
2162
2775
  },
2163
2776
  '&[data-editionmode="true"]': {
2164
- "&:focus, *:focus, *:focus-visible": __spreadProps$2(__spreadValues$6({}, focusOutline$1), {
2777
+ "&:focus, *:focus, *:focus-visible": __spreadProps$3(__spreadValues$6({}, focusOutline), {
2165
2778
  outlineStyle: "dotted",
2166
2779
  outlineWidth: "6px",
2167
2780
  outlineOffset: "-4px"
@@ -2176,8 +2789,8 @@ function getSelectionStyles() {
2176
2789
  }
2177
2790
 
2178
2791
  var __defProp$5 = Object.defineProperty;
2179
- var __defProps$1 = Object.defineProperties;
2180
- var __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors;
2792
+ var __defProps$2 = Object.defineProperties;
2793
+ var __getOwnPropDescs$2 = Object.getOwnPropertyDescriptors;
2181
2794
  var __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;
2182
2795
  var __hasOwnProp$5 = Object.prototype.hasOwnProperty;
2183
2796
  var __propIsEnum$5 = Object.prototype.propertyIsEnumerable;
@@ -2193,253 +2806,255 @@ var __spreadValues$5 = (a, b) => {
2193
2806
  }
2194
2807
  return a;
2195
2808
  };
2196
- var __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b));
2197
- const primary$1 = __spreadProps$1(__spreadValues$5({
2198
- variant: "colors.tables.primary",
2199
- backgroundColor: "palette.background.paper",
2200
- borderCollapse: "separate",
2201
- borderSpacing: 0,
2202
- tableLayout: "fixed",
2203
- thead: __spreadProps$1(__spreadValues$5({}, getColorsByPath("tables.primary.thead")), {
2204
- zIndex: 1,
2205
- position: "sticky",
2206
- insetBlockStart: 0,
2207
- backgroundColor: "palette.background.paper",
2208
- "tr:not(.filtersRow):not(.responsiveTable__filters__row)": {
2209
- "th, td": {
2210
- variant: "buttons.primary",
2211
- py: responsive$1({ 0: 3, 4: 4 }),
2212
- px: responsive$1({ 0: 3, 4: 4 }),
2213
- width: "breakWidth",
2214
- backgroundColor: "palette.primary.main",
2215
- borderColor: "palette.primary.dark",
2216
- borderRadius: 0,
2217
- borderStyle: "solid",
2218
- borderWidth: "1px",
2219
- display: "table-cell",
2220
- verticalAlign: "center",
2221
- wordBreak: "break-word",
2222
- "&:last-of-type:not(td)": {
2223
- maxWidth: "100%",
2224
- width: "100%"
2225
- },
2226
- ".headButton__label": {
2227
- textAlign: "left"
2228
- },
2229
- ".headButton__resizer": {
2230
- width: "20px",
2231
- cursor: "ew-resize",
2232
- zIndex: 1e3,
2233
- position: "absolute",
2234
- right: "-10px",
2235
- height: "100%"
2236
- },
2237
- "&:last-of-type .headButton__resizer": {
2238
- right: "0px"
2239
- },
2240
- "&.additionalColumn": {
2241
- minWidth: "50px",
2242
- maxWidth: "50px",
2243
- width: "50px",
2244
- p: 0,
2245
- textAlign: "center",
2246
- verticalAlign: "center"
2247
- },
2248
- ".headButton__container": {
2249
- width: "100%",
2250
- display: "flex",
2251
- alignItems: "center",
2252
- justifyContent: "space-between",
2253
- gap: 3,
2254
- svg: {
2255
- flexShrink: 0
2256
- }
2257
- },
2258
- "&>div": {
2809
+ var __spreadProps$2 = (a, b) => __defProps$2(a, __getOwnPropDescs$2(b));
2810
+ const primary$1 = (theme) => {
2811
+ return __spreadProps$2(__spreadValues$5({
2812
+ variant: "colors.tables.primary",
2813
+ width: "100%",
2814
+ backgroundColor: "components.primaryTable.body.backgroundColor",
2815
+ border: "1px solid",
2816
+ borderColor: "components.primaryTable.borderColor",
2817
+ borderCollapse: "separate",
2818
+ borderSpacing: 0,
2819
+ tableLayout: "fixed",
2820
+ thead: {
2821
+ zIndex: 1,
2822
+ position: "sticky",
2823
+ insetBlockStart: 0,
2824
+ backgroundColor: "palette.background.paper",
2825
+ "tr:not(.filtersRow):not(.responsiveTable__filters__row)": {
2826
+ "th, td": __spreadProps$2(__spreadValues$5({
2827
+ variant: "buttons.primary",
2828
+ py: responsive$1({ 0: 3, 4: 4 }),
2829
+ px: responsive$1({ 0: 3, 4: 4 }),
2830
+ width: "breakWidth",
2831
+ backgroundColor: "palette.primary.main",
2832
+ borderColor: "palette.primary.dark",
2833
+ borderRadius: 0,
2834
+ borderStyle: "solid",
2835
+ borderWidth: "1px",
2259
2836
  color: "palette.primary.contrastText",
2260
- svg: {
2261
- color: "palette.text.primary"
2837
+ display: "table-cell",
2838
+ verticalAlign: "center",
2839
+ wordBreak: "break-word",
2840
+ '&[role="presentation"]': {
2841
+ display: "none"
2262
2842
  }
2263
- },
2264
- "&:not(:last-of-type)": {
2265
- "&>div": {
2266
- borderRightWidth: "1px"
2843
+ }, theme.palette.getStatesFromPath("components.primaryTable.header")), {
2844
+ "& *": {
2845
+ color: "inherit"
2846
+ },
2847
+ ".headButton__label": {
2848
+ textAlign: "left",
2849
+ d: ""
2850
+ },
2851
+ ".headButton__resizer": {
2852
+ width: "20px",
2853
+ cursor: "ew-resize",
2854
+ zIndex: 1e3,
2855
+ position: "absolute",
2856
+ right: "-10px",
2857
+ height: "100%"
2858
+ },
2859
+ "&:last-of-type .headButton__resizer": {
2860
+ right: "0px"
2861
+ },
2862
+ "&:last-of-type:not(td)": {
2863
+ maxWidth: "100%",
2864
+ width: "100%"
2865
+ },
2866
+ "&.additionalColumn": {
2867
+ minWidth: "50px",
2868
+ maxWidth: "50px",
2869
+ width: "50px",
2870
+ p: 0,
2871
+ textAlign: "center",
2872
+ verticalAlign: "center"
2873
+ },
2874
+ ".headButton__container": {
2875
+ width: "100%",
2876
+ display: "flex",
2877
+ alignItems: "center",
2878
+ justifyContent: "space-between",
2879
+ gap: 3,
2880
+ svg: {
2881
+ flexShrink: 0
2882
+ }
2883
+ },
2884
+ // '&>div': {
2885
+ // color: 'components.primaryTable.header.color',
2886
+ // svg: {
2887
+ // color: 'components.primaryTable.body.color',
2888
+ // },
2889
+ // },
2890
+ "&:not(:last-of-type)": {
2891
+ "&>div": {
2892
+ borderRightWidth: "1px"
2893
+ }
2267
2894
  }
2895
+ }),
2896
+ "th.requiredFilterColumn": {
2897
+ borderLeft: "4px solid !important",
2898
+ borderLeftColor: "palette.error.main !important"
2268
2899
  }
2269
2900
  },
2270
- "th.requiredFilterColumn": {
2271
- borderLeft: "4px solid !important",
2272
- borderLeftColor: "#dc3545 !important"
2273
- // TODO USAR PALETTE
2274
- }
2275
- },
2276
- "tr.filtersRow, tr.responsiveTable__filters__row": {
2277
- backgroundColor: "palette.background.paper",
2278
- borderBottomWidth: "1px",
2279
- borderBottomStyle: "solid",
2280
- borderBottomColor: "palette.border.row",
2281
- "th.noFilter": {
2282
- background: "transparent"
2283
- },
2284
- td: {
2285
- "input:not([disabled]), select:not([disabled])": {
2286
- border: "1px solid white"
2901
+ "tr.filtersRow, tr.responsiveTable__filters__row": {
2902
+ backgroundColor: "components.primaryTable.body.backgroundColor",
2903
+ "th.noFilter": {
2904
+ background: "transparent"
2287
2905
  },
2288
- background: "transparent",
2289
- border: "1px solid",
2290
- borderColor: "palette.gray.800",
2291
- p: 0
2292
- },
2293
- transition: "height 0.3s",
2294
- "&.hidden": {
2295
- height: "0",
2296
- overflow: "hidden",
2297
- p: spacing(0),
2298
- border: "none",
2299
- "& *": {
2906
+ "td.requiredFilter__Border": {
2907
+ borderLeftStyle: "solid !important",
2908
+ borderLeftWidth: "4px !important",
2909
+ borderLeftColor: "palette.error.main"
2910
+ },
2911
+ td: {
2912
+ "input:not([disabled]), select:not([disabled])": {
2913
+ border: "1px solid white"
2914
+ },
2915
+ background: "transparent",
2916
+ border: "1px solid",
2917
+ borderColor: "components.primaryTable.body.borderColor",
2918
+ p: 0
2919
+ },
2920
+ transition: "height 0.3s",
2921
+ "&.hidden": {
2300
2922
  height: "0",
2301
2923
  overflow: "hidden",
2302
- fontSize: 0,
2303
- lineHeight: 0,
2304
2924
  p: spacing(0),
2305
- border: "none"
2925
+ border: "none",
2926
+ "& *": {
2927
+ height: "0",
2928
+ overflow: "hidden",
2929
+ fontSize: 0,
2930
+ lineHeight: 0,
2931
+ p: spacing(0),
2932
+ border: "none"
2933
+ }
2306
2934
  }
2307
2935
  }
2308
- }
2309
- }),
2310
- tbody: {
2311
- tr: __spreadProps$1(__spreadValues$5({
2312
- borderBottomWidth: "1px",
2313
- borderBottomStyle: "solid",
2314
- "&.non-selectable": {
2315
- cursor: "not-allowed"
2316
- },
2317
- "&.hidden": {
2318
- display: "none"
2319
- },
2320
- "&.locked": {
2321
- background: "palette.gray.900"
2322
- }
2323
- }, getSelectedColors()), {
2324
- "&.draggingRow": {
2325
- outline: "3px dotted",
2326
- outlineColor: "palette.primary.main",
2327
- outlineOffset: "-3px",
2328
- "*": {
2329
- outline: "none !important"
2936
+ },
2937
+ tbody: {
2938
+ tr: __spreadProps$2(__spreadValues$5(__spreadProps$2(__spreadValues$5({
2939
+ borderBottomWidth: "1px",
2940
+ borderBottomStyle: "solid"
2941
+ }, theme.palette.getStatesFromPath("components.primaryTable.body", {
2942
+ states: {
2943
+ disabled: false,
2944
+ readonly: false,
2945
+ active: false,
2946
+ hover: false,
2947
+ checked: false,
2948
+ focus: false,
2949
+ selected: false
2330
2950
  }
2331
- },
2332
- borderColor: "palette.gray.800",
2333
- ".rowStatesList": {
2334
- display: "flex",
2335
- gap: spacing(3),
2336
- alignItems: "center",
2337
- svg: {
2338
- width: "smallIcon",
2339
- height: "smallIcon",
2340
- cursor: "pointer"
2951
+ })), {
2952
+ "&:nth-of-type(2n)": {
2953
+ backgroundColor: "components.primaryTable.body.evenRowsBackgroundColor"
2954
+ },
2955
+ "&.non-selectable": {
2956
+ cursor: "not-allowed"
2957
+ },
2958
+ "&.hidden": {
2959
+ display: "none"
2960
+ },
2961
+ "&.locked": {
2962
+ background: "palette.gray.900",
2963
+ td: {
2964
+ borderColor: "palette.gray.850"
2965
+ }
2341
2966
  }
2342
- },
2343
- td: {
2344
- verticalAlign: "top",
2345
- wordBreak: "break-word",
2346
- border: "1px solid",
2347
- borderColor: "palette.gray.900",
2348
- "&.stickyColumn": {
2349
- position: "sticky",
2350
- left: 0,
2351
- backgroundColor: "palette.background.paper"
2967
+ }), getSelectedColors(theme)), {
2968
+ "&.draggingRow": {
2969
+ outline: "3px dotted",
2970
+ outlineColor: "components.primaryTable.header.borderColor",
2971
+ outlineOffset: "-3px",
2972
+ "*": {
2973
+ outline: "none !important"
2974
+ }
2352
2975
  },
2353
- ".moreInformationButton": {
2354
- width: "30px",
2355
- height: "30px",
2356
- padding: "3px",
2357
- border: "none",
2358
- background: "transparent"
2976
+ borderColor: "components.primaryTable.body.borderColor",
2977
+ ".rowStatesList": {
2978
+ display: "flex",
2979
+ gap: spacing(3),
2980
+ alignItems: "center",
2981
+ svg: {
2982
+ width: "smallIcon",
2983
+ height: "smallIcon",
2984
+ cursor: "pointer"
2985
+ }
2986
+ },
2987
+ td: {
2988
+ verticalAlign: "top",
2989
+ wordBreak: "break-word",
2990
+ border: "1px solid",
2991
+ borderColor: "components.primaryTable.body.borderColor",
2992
+ "&.stickyColumn": {
2993
+ position: "sticky",
2994
+ left: 0,
2995
+ backgroundColor: "components.primaryTable.body.backgroundColor"
2996
+ },
2997
+ ".moreInformationButton": {
2998
+ width: "30px",
2999
+ height: "30px",
3000
+ padding: "3px",
3001
+ border: "none",
3002
+ background: "transparent"
3003
+ }
2359
3004
  }
2360
- }
2361
- }),
2362
- td: {
2363
- p: spacing(3)
2364
- },
2365
- ".responsiveTable__additionalInfoContainer": {
2366
- display: "grid",
2367
- gridTemplateColumns: responsive$1({
2368
- 0: "repeat(2, 1fr)",
2369
- 5: "repeat(4, 1fr)"
2370
3005
  }),
2371
- columnGap: 3,
2372
- rowGap: 2
3006
+ td: {
3007
+ p: spacing(3)
3008
+ },
3009
+ ".responsiveTable__additionalInfoContainer": {
3010
+ display: "grid",
3011
+ gridTemplateColumns: responsive$1({
3012
+ 0: "repeat(2, 1fr)",
3013
+ 5: "repeat(4, 1fr)"
3014
+ }),
3015
+ columnGap: 3,
3016
+ rowGap: 2
3017
+ },
3018
+ ".responsiveTable__additionalInfoContainer .responsiveTable__additionalInfoItem.separator": {
3019
+ gridColumnStart: "1",
3020
+ gridColumnEnd: "5",
3021
+ borderBottom: "1px solid",
3022
+ borderBottomColor: "palette.gray.700",
3023
+ height: "auto"
3024
+ }
2373
3025
  },
2374
- ".responsiveTable__additionalInfoContainer .responsiveTable__additionalInfoItem.separator": {
2375
- gridColumnStart: "1",
2376
- gridColumnEnd: "5",
2377
- borderBottom: "1px solid",
2378
- borderBottomColor: "palette.gray.700",
2379
- height: "auto"
3026
+ ".editionMode": {
3027
+ border: "3px solid",
3028
+ borderColor: "components.primaryTable.header.borderColor",
3029
+ borderWidth: "1.5px",
3030
+ borderStyle: "dotted"
3031
+ },
3032
+ ".stateCell": {
3033
+ width: "50px",
3034
+ maxWidth: "50px",
3035
+ minWidth: "50px",
3036
+ textAlign: "center",
3037
+ verticalAlign: "middle"
2380
3038
  }
2381
- },
2382
- ".row__separator__cell": {
2383
- backgroundColor: "palette.secondary.light"
2384
- },
2385
- ".pro_inst_warn_date": {
2386
- backgroundColor: "palette.warning.light"
2387
- },
2388
- ".pro_inst_overdue_date": {
2389
- backgroundColor: "palette.error.light"
2390
- },
2391
- ".pro_ele_inst_warn_date": {
2392
- backgroundColor: "palette.warning.light"
2393
- },
2394
- ".pro_ele_inst_overdue_date": {
2395
- backgroundColor: "palette.error.light"
2396
- },
2397
- ".pro_inst_warn_date__row": {},
2398
- ".pro_inst_overdue_date__row": {},
2399
- ".pro_ele_inst_warn_date__row": {},
2400
- ".pro_ele_inst_overdue_date__row": {},
2401
- ".priority": {
2402
- textAlign: "center"
2403
- },
2404
- ".editionMode": {
2405
- border: "3px solid",
2406
- borderColor: "palette.primary.main",
2407
- borderWidth: "1.5px",
2408
- borderStyle: "dotted"
2409
- },
2410
- ".stateCell": {
2411
- width: "50px",
2412
- maxWidth: "50px",
2413
- minWidth: "50px",
2414
- textAlign: "center",
2415
- verticalAlign: "middle"
2416
- }
2417
- }, getSelectionStyles()), {
2418
- ".no__registers": {
2419
- py: 6
2420
- },
2421
- ".requiredFilter__Marker": {
2422
- color: "red",
2423
- paddingX: "5px"
2424
- },
2425
- ".requiredFilter__Column": {
2426
- fontWeight: "bold"
2427
- },
2428
- "&.dataGrid__printTable": {
2429
- m: 2,
2430
- border: "1px solid",
2431
- borderColor: "palette.border.article"
2432
- },
2433
- ".bold": {
2434
- fontWeight: "bold"
2435
- },
2436
- ".light": {
2437
- color: "#6a6a6a"
2438
- },
2439
- ".additionalInfo__cell, .stateCell": {
2440
- verticalAlign: "middle"
2441
- }
2442
- });
3039
+ }, getSelectionStyles()), {
3040
+ ".no__registers": {
3041
+ py: 6,
3042
+ minWidth: "200px"
3043
+ },
3044
+ ".requiredFilter__Column": {
3045
+ fontWeight: "bold"
3046
+ },
3047
+ ".bold": {
3048
+ fontWeight: "bold"
3049
+ },
3050
+ ".light": {
3051
+ color: "#6a6a6a"
3052
+ },
3053
+ ".additionalInfo__cell, .stateCell": {
3054
+ verticalAlign: "middle"
3055
+ }
3056
+ });
3057
+ };
2443
3058
 
2444
3059
  const information = {
2445
3060
  width: "100%",
@@ -2481,7 +3096,7 @@ const information = {
2481
3096
  }
2482
3097
  };
2483
3098
 
2484
- const accordion = {
3099
+ const accordion$1 = {
2485
3100
  display: "flex",
2486
3101
  flexDirection: "column",
2487
3102
  gap: spacing(2),
@@ -2534,38 +3149,6 @@ const accordion = {
2534
3149
  "&.rah-static--height-auto, &.rah-animating--down": {
2535
3150
  "& > div": { py: 5 }
2536
3151
  },
2537
- ".pro_inst_warn_date": {
2538
- color: "priorityNormal"
2539
- // backgroundColor: 'priorityNormal',
2540
- },
2541
- ".pro_inst_overdue_date": {
2542
- color: "priorityUrgent"
2543
- // backgroundColor: 'priorityUrgent',
2544
- },
2545
- ".pro_ele_inst_warn_date": {
2546
- color: "priorityNormal"
2547
- // backgroundColor: 'priorityNormal',
2548
- },
2549
- ".pro_ele_inst_overdue_date": {
2550
- color: "priorityUrgent"
2551
- // backgroundColor: 'priorityUrgent',
2552
- },
2553
- ".pro_inst_warn_date__row": {
2554
- // color: 'priorityNormal',
2555
- // backgroundColor: 'priorityNormal',
2556
- },
2557
- ".pro_inst_overdue_date__row": {
2558
- // color: 'priorityUrgent',
2559
- backgroundColor: "priorityUrgent"
2560
- },
2561
- ".pro_ele_inst_warn_date__row": {
2562
- // color: 'priorityNormal',
2563
- // backgroundColor: 'priorityNormal',
2564
- },
2565
- ".pro_ele_inst_overdue_date__row": {
2566
- // color: 'priorityUrgent',
2567
- // backgroundColor: 'priorityUrgent',
2568
- },
2569
3152
  ".priority_container": { display: "flex", alignItems: "center" },
2570
3153
  ".priority": { display: "flex" }
2571
3154
  }
@@ -2580,50 +3163,107 @@ const print = {
2580
3163
  }
2581
3164
  };
2582
3165
 
2583
- const responsive = {
2584
- maxHeight: "100%",
2585
- overflow: "auto",
2586
- position: "relative",
2587
- table: {
2588
- width: "100%"
2589
- },
2590
- "&.isLoading": {
2591
- overflow: "hidden"
2592
- },
2593
- ".responsiveTable__isLoading": {
2594
- position: "absolute",
2595
- top: 0,
2596
- left: 0,
2597
- right: 0,
2598
- bottom: 0,
2599
- background: tinycolor(window.currentPalette.background.paper).setAlpha(0.7).toRgbString(),
2600
- zIndex: 1,
2601
- display: "flex",
2602
- alignItems: "center",
2603
- justifyContent: "center"
2604
- },
2605
- ".cell__download__document": {
2606
- display: "flex",
2607
- gap: 3,
2608
- alignItems: "center",
2609
- justifyContent: "start",
2610
- "&, *": {
2611
- color: "palette.primary.main"
3166
+ const responsive = (theme) => {
3167
+ return {
3168
+ maxHeight: "100%",
3169
+ overflow: "auto",
3170
+ position: "relative",
3171
+ "&.isLoading": {
3172
+ overflow: "hidden"
2612
3173
  },
2613
- svg: {
2614
- flexShrink: 0
3174
+ ".responsiveTable__isLoading": {
3175
+ position: "absolute",
3176
+ top: 0,
3177
+ left: 0,
3178
+ right: 0,
3179
+ bottom: 0,
3180
+ background: tinycolor(theme.palette.background.paper).setAlpha(0.7).toRgbString(),
3181
+ zIndex: 1,
3182
+ display: "flex",
3183
+ alignItems: "center",
3184
+ justifyContent: "center"
3185
+ },
3186
+ ".cell__download__document": {
3187
+ display: "flex",
3188
+ gap: 3,
3189
+ alignItems: "center",
3190
+ justifyContent: "start",
3191
+ "&, *": {
3192
+ color: "palette.primary.main"
3193
+ },
3194
+ svg: {
3195
+ flexShrink: 0
3196
+ }
3197
+ }
3198
+ /* PREPEND HERE */
3199
+ };
3200
+ };
3201
+
3202
+ var __defProp$4 = Object.defineProperty;
3203
+ var __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;
3204
+ var __hasOwnProp$4 = Object.prototype.hasOwnProperty;
3205
+ var __propIsEnum$4 = Object.prototype.propertyIsEnumerable;
3206
+ var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3207
+ var __spreadValues$4 = (a, b) => {
3208
+ for (var prop in b || (b = {}))
3209
+ if (__hasOwnProp$4.call(b, prop))
3210
+ __defNormalProp$4(a, prop, b[prop]);
3211
+ if (__getOwnPropSymbols$4)
3212
+ for (var prop of __getOwnPropSymbols$4(b)) {
3213
+ if (__propIsEnum$4.call(b, prop))
3214
+ __defNormalProp$4(a, prop, b[prop]);
2615
3215
  }
3216
+ return a;
3217
+ };
3218
+ const secondary = {
3219
+ variant: "layout.common.tables.primary",
3220
+ borderColor: "components.secondaryTable.borderColor",
3221
+ "& thead": {
3222
+ "tr:not(.filtersRow):not(.responsiveTable__filters__row)": {
3223
+ "& th, & td": () => __spreadValues$4({}, getColorsAndStatesByPath("components.secondaryTable.header"))
3224
+ }
3225
+ },
3226
+ "& tbody": {
3227
+ tr: __spreadValues$4({
3228
+ "&:nth-of-type(2n)": {
3229
+ backgroundColor: "components.secondaryTable.body.evenRowsBackgroundColor"
3230
+ },
3231
+ td: {
3232
+ borderColor: "components.secondaryTable.body.borderColor"
3233
+ },
3234
+ '&[aria-selected="true"]': {
3235
+ backgroundColor: "components.secondaryTable.body.selectedRows.backgroundColor",
3236
+ "& td": {
3237
+ borderColor: "components.secondaryTable.body.selectedRows.borderColor"
3238
+ },
3239
+ color: "components.secondaryTable.body.selectedRows.color"
3240
+ },
3241
+ borderBottomWidth: "1px",
3242
+ borderBottomStyle: "solid"
3243
+ }, getColorsAndStatesByPath("components.secondaryTable.body", {
3244
+ states: {
3245
+ disabled: false,
3246
+ readonly: false,
3247
+ active: false,
3248
+ hover: false,
3249
+ checked: false,
3250
+ focus: false,
3251
+ selected: false
3252
+ }
3253
+ }))
2616
3254
  }
2617
- /* PREPEND HERE */
2618
3255
  };
2619
3256
 
2620
- const tables = {
2621
- accordion,
2622
- information,
2623
- primary: primary$1,
2624
- print,
2625
- responsive
2626
- /* PREPEND HERE */
3257
+ const tables = (theme) => {
3258
+ return {
3259
+ accordion: accordion$1,
3260
+ information,
3261
+ primary: primary$1(theme),
3262
+ print,
3263
+ responsive: responsive(theme),
3264
+ secondary
3265
+ /* PREPEND HERE */
3266
+ };
2627
3267
  };
2628
3268
 
2629
3269
  const captcha = {
@@ -2669,461 +3309,404 @@ const forms = {
2669
3309
  /* PREPEND HERE */
2670
3310
  };
2671
3311
 
2672
- var __defProp$4 = Object.defineProperty;
2673
- var __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;
2674
- var __hasOwnProp$4 = Object.prototype.hasOwnProperty;
2675
- var __propIsEnum$4 = Object.prototype.propertyIsEnumerable;
2676
- var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2677
- var __spreadValues$4 = (a, b) => {
3312
+ var __defProp$3 = Object.defineProperty;
3313
+ var __getOwnPropSymbols$3 = Object.getOwnPropertySymbols;
3314
+ var __hasOwnProp$3 = Object.prototype.hasOwnProperty;
3315
+ var __propIsEnum$3 = Object.prototype.propertyIsEnumerable;
3316
+ var __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3317
+ var __spreadValues$3 = (a, b) => {
2678
3318
  for (var prop in b || (b = {}))
2679
- if (__hasOwnProp$4.call(b, prop))
2680
- __defNormalProp$4(a, prop, b[prop]);
2681
- if (__getOwnPropSymbols$4)
2682
- for (var prop of __getOwnPropSymbols$4(b)) {
2683
- if (__propIsEnum$4.call(b, prop))
2684
- __defNormalProp$4(a, prop, b[prop]);
3319
+ if (__hasOwnProp$3.call(b, prop))
3320
+ __defNormalProp$3(a, prop, b[prop]);
3321
+ if (__getOwnPropSymbols$3)
3322
+ for (var prop of __getOwnPropSymbols$3(b)) {
3323
+ if (__propIsEnum$3.call(b, prop))
3324
+ __defNormalProp$3(a, prop, b[prop]);
2685
3325
  }
2686
3326
  return a;
2687
3327
  };
2688
- const primary = {
2689
- /* PREPEND HERE */
2690
- position: "relative",
2691
- '[role="tree"]:focus': {
2692
- outline: "none",
2693
- ".focus": focusOutline
2694
- },
2695
- ul: {
2696
- listStyle: "none",
2697
- p: 0
2698
- },
2699
- ".tree__searchLabelBox": {
2700
- alignItems: "center",
2701
- borderRadius: "2px",
2702
- display: "flex",
2703
- float: "right",
2704
- gap: spacing(3),
2705
- justifyContent: "center",
2706
- position: "sticky",
2707
- right: "4px",
2708
- top: "4px",
2709
- transform: "translateX(0)",
2710
- width: "100%",
2711
- zIndex: "stickyElements",
2712
- ".tree__loading": {
2713
- position: "fixed",
2714
- top: 0,
2715
- right: "4px",
2716
- height: "iconmd",
2717
- width: "iconmd",
2718
- background: "palette.background.paper"
3328
+ const primary = (theme) => {
3329
+ return {
3330
+ /* PREPEND HERE */
3331
+ position: "relative",
3332
+ '[role="tree"]:focus': {
3333
+ outline: "none",
3334
+ ".focus": focusOutline
2719
3335
  },
2720
- button: {
2721
- cursor: "pointer"
2722
- }
2723
- },
2724
- ".tree__searchLabel": __spreadValues$4({
2725
- alignItems: "center",
2726
- display: "flex",
2727
- gap: spacing(3),
2728
- justifyContent: "center",
2729
- position: "fixed",
2730
- p: "2px 5px",
2731
- right: 0,
2732
- top: 0
2733
- }, getColorState(
2734
- { backgroundColor: "palette.background.paper" },
2735
- "selected"
2736
- )),
2737
- '[role="treeitem"]': {
2738
- '&[aria-expanded="false"] ul': {
2739
- display: "none"
3336
+ ul: {
3337
+ listStyle: "none",
3338
+ p: 0
3339
+ },
3340
+ ".tree__searchLabelBox": {
3341
+ alignItems: "center",
3342
+ borderRadius: "2px",
3343
+ display: "flex",
3344
+ float: "right",
3345
+ gap: spacing(3),
3346
+ justifyContent: "center",
3347
+ position: "sticky",
3348
+ right: "4px",
3349
+ top: "4px",
3350
+ transform: "translateX(0)",
3351
+ width: "100%",
3352
+ zIndex: "stickyElements",
3353
+ ".tree__loading": {
3354
+ position: "fixed",
3355
+ top: 0,
3356
+ right: "4px",
3357
+ height: "iconMd",
3358
+ width: "iconMd",
3359
+ background: "palette.background.paper"
3360
+ },
3361
+ button: {
3362
+ cursor: "pointer",
3363
+ "&:hover": {
3364
+ textDecoration: "underline"
3365
+ }
3366
+ }
2740
3367
  },
2741
- '&[aria-selected="true"] > .tree__nodeItemLabel': getColorState(
3368
+ ".tree__searchLabel": __spreadValues$3({
3369
+ alignItems: "center",
3370
+ display: "flex",
3371
+ gap: spacing(3),
3372
+ justifyContent: "center",
3373
+ position: "fixed",
3374
+ p: "2px 5px",
3375
+ right: 0,
3376
+ top: 0
3377
+ }, theme.palette.getOneState(
2742
3378
  { backgroundColor: "palette.background.paper" },
2743
3379
  "selected"
2744
- ),
2745
- background: "transparent"
2746
- },
2747
- ".tree__nodeItemLabel": {
2748
- display: "flex",
2749
- flexWrap: "nowrap",
2750
- gap: 3,
2751
- alignItems: "center",
2752
- "& > *:not(.tree__nodeItemLabelRenderer)": {
2753
- flexShrink: 0,
2754
- textAlign: "left"
3380
+ )),
3381
+ '[role="treeitem"]': {
3382
+ '&[aria-expanded="false"] ul': {
3383
+ display: "none"
3384
+ },
3385
+ '&[aria-selected="true"] > .tree__nodeItemLabel': theme.palette.getOneState(
3386
+ { backgroundColor: "palette.background.paper" },
3387
+ "selected"
3388
+ ),
3389
+ background: "transparent"
2755
3390
  },
2756
- "&:hover": getColorState(
2757
- { backgroundColor: "palette.background.paper" },
2758
- "hover"
2759
- )
2760
- },
2761
- ".spacer": {
2762
- borderLeft: "1px solid",
2763
- borderLeftColor: "palette.border.section",
2764
- width: "20px",
2765
- alignSelf: "stretch"
2766
- }
3391
+ ".tree__nodeItemLabel": {
3392
+ display: "flex",
3393
+ flexWrap: "nowrap",
3394
+ gap: 3,
3395
+ alignItems: "center",
3396
+ wordBreak: "break-all",
3397
+ button: {
3398
+ cursor: "pointer",
3399
+ "&:hover": {
3400
+ textDecoration: "underline"
3401
+ },
3402
+ span: {
3403
+ textOverflow: "ellipsis",
3404
+ overflow: "hidden",
3405
+ whiteSpace: "nowrap"
3406
+ }
3407
+ },
3408
+ ".tree__nodeItemLabelRenderer": {
3409
+ display: "flex",
3410
+ overflow: " hidden",
3411
+ width: "100%"
3412
+ },
3413
+ ".button__content": {
3414
+ textAlign: "left"
3415
+ },
3416
+ "& > *:not(.tree__nodeItemLabelRenderer)": {
3417
+ flexShrink: 0,
3418
+ textAlign: "left"
3419
+ },
3420
+ "&:hover": theme.palette.getOneState(
3421
+ { backgroundColor: "palette.background.paper" },
3422
+ "hover"
3423
+ )
3424
+ },
3425
+ ".spacer": {
3426
+ borderLeft: "1px solid",
3427
+ borderLeftColor: "palette.border.section",
3428
+ width: "20px",
3429
+ alignSelf: "stretch"
3430
+ }
3431
+ };
2767
3432
  };
2768
3433
 
2769
3434
  const trees = {
2770
3435
  primary
2771
3436
  };
2772
3437
 
2773
- const common = {
2774
- forms,
2775
- modals,
2776
- tables,
2777
- trees
2778
- /* PREPEND HERE */
2779
- };
2780
-
2781
- const layout = {
2782
- common
2783
- /* PREPEND HERE */
2784
- };
2785
-
2786
- const transitions = {
2787
- "@keyframes growHorizontal": {
2788
- from: { transform: "scaleX(0)" },
2789
- to: { transform: "scaleY(100%)" }
2790
- },
2791
- ".mainMenu__animate": {
2792
- transition: "transform 150ms, opacity 150ms",
2793
- transform: "translateX(-1000px)",
2794
- opacity: 0
2795
- },
2796
- ".mainMenu-enter,\n.mainMenu-appear": {
2797
- transform: "translateX(-1000px)",
2798
- opacity: 0
2799
- },
2800
- ".mainMenu-enter-active,\n.mainMenu-appear-active": {
2801
- transform: "translateX(0)",
2802
- opacity: 1
2803
- },
2804
- ".mainMenu-enter-done,\n.mainMenu-appear-done": {
2805
- transform: "translateX(0)",
2806
- opacity: 1
2807
- },
2808
- ".mainMenu-exit": { opacity: 0 },
2809
- ".mainMenu-exit-done": { transform: "translateX(-1000px)", opacity: 0 },
2810
- ".mainMenu-exit-active": { transform: "translateX(-1000px)", opacity: 1 },
2811
- ".hamburguerMenu": { display: "none" },
2812
- ".hamburguerMenu-enter,\n.hamburguerMenu-appear": {
2813
- display: "block",
2814
- transform: "scale(0.7)",
2815
- opacity: 0
2816
- },
2817
- ".hamburguerMenu-enter-active,\n.hamburguerMenu-appear-active": {
2818
- transform: "translateX(0)",
2819
- transition: "opacity 150ms, transform 150ms",
2820
- transformOrigin: "right top",
2821
- opacity: 1
2822
- },
2823
- ".hamburguerMenu-enter-done,\n.hamburguerMenu-appear-done": {
2824
- display: "block"
2825
- },
2826
- ".hamburguerMenu-exit": {
2827
- display: "block",
2828
- transform: "scale(1)",
2829
- opacity: 1
2830
- },
2831
- ".hamburguerMenu-exit-active": {
2832
- transform: "scale(0.7) translateX(0)",
2833
- transition: "opacity 150ms, transform 150ms",
2834
- display: "block",
2835
- opacity: 0,
2836
- transformOrigin: "right top"
2837
- },
2838
- ".hamburguerMenu-exit-done": { display: "none" },
2839
- ".modal-enter,\n.modal-appear": { opacity: 0, transform: "scale(0.8)" },
2840
- ".modal-enter-active,\n.modal-appear-active": {
2841
- opacity: 1,
2842
- transform: "translateX(0)",
2843
- transition: "opacity 150ms, transform 150ms",
2844
- transitionDelay: "0"
2845
- },
2846
- ".modal-exit": { opacity: 0 },
2847
- ".modal-exit-done": { opacity: 0, display: "none" },
2848
- ".modal-exit-active": {
2849
- opacity: 0,
2850
- transform: "scale(100)",
2851
- transition: "opacity 150ms, transform 150ms",
2852
- transitionDelay: "0"
2853
- },
2854
- ".overlayAnimation-enter .overlayAnimation:not(.not-released),\n.overlayAnimation-appear .overlayAnimation:not(.not-released)": {
2855
- opacity: 0
2856
- },
2857
- ".overlayAnimation-enter-active .overlayAnimation:not(.not-released),\n.overlayAnimation-appear-active .overlayAnimation:not(.not-released)": {
2858
- opacity: 1,
2859
- transition: "opacity 150ms"
2860
- },
2861
- ".overlayAnimation-exit": { opacity: 1 },
2862
- ".overlayAnimation-exit-active": { opacity: 0, transition: "opacity 150ms" },
2863
- ".fromRight-enter,\n.fromRight-appear": { transform: "translateX(550px)" },
2864
- ".fromRight-enter-active,\n.fromRight-appear-active": {
2865
- transition: "transform 150ms",
2866
- transform: "translateX(0)"
2867
- },
2868
- ".fromRight-exit": { transform: "translateX(0)" },
2869
- ".fromRight-exit-active": {
2870
- transition: "transform 150ms",
2871
- transform: "translateX(550px)"
2872
- },
2873
- ".notification-enter,\n.notification-appear": {
2874
- opacity: 0,
2875
- transform: "scale(0.8)"
2876
- },
2877
- ".notification-enter-active,\n.notification-appear-active": {
2878
- opacity: 1,
2879
- transform: "translateX(0)",
2880
- transition: "opacity 150ms, transform 150ms",
2881
- transitionDelay: "0"
2882
- },
2883
- ".notification-exit": { opacity: 1 },
2884
- ".notification-exit-active": {
2885
- opacity: 0,
2886
- transform: "scale(0.8)",
2887
- transition: "opacity 150ms, transform 150ms",
2888
- transitionDelay: "0"
2889
- },
2890
- ".schedulerStage-enter,\n.schedulerStage-appear": {
2891
- opacity: 0,
2892
- transform: "scale(0.8)"
2893
- },
2894
- ".schedulerStage-enter-active,\n.schedulerStage-appear-active": {
2895
- opacity: 1,
2896
- transform: "translateX(0)",
2897
- transition: "opacity 150ms, transform 150ms",
2898
- transitionDelay: "0"
2899
- },
2900
- ".schedulerStage-exit": { opacity: 1 },
2901
- ".schedulerStage-exit-active": {
2902
- opacity: 0,
2903
- transform: "scale(0.8)",
2904
- transition: "opacity 150ms, transform 150ms",
2905
- transitionDelay: "0"
2906
- }
2907
- };
2908
-
2909
- var __defProp$3 = Object.defineProperty;
2910
- var __getOwnPropSymbols$3 = Object.getOwnPropertySymbols;
2911
- var __hasOwnProp$3 = Object.prototype.hasOwnProperty;
2912
- var __propIsEnum$3 = Object.prototype.propertyIsEnumerable;
2913
- var __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2914
- var __spreadValues$3 = (a, b) => {
3438
+ var __defProp$2 = Object.defineProperty;
3439
+ var __defProps$1 = Object.defineProperties;
3440
+ var __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors;
3441
+ var __getOwnPropSymbols$2 = Object.getOwnPropertySymbols;
3442
+ var __hasOwnProp$2 = Object.prototype.hasOwnProperty;
3443
+ var __propIsEnum$2 = Object.prototype.propertyIsEnumerable;
3444
+ var __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3445
+ var __spreadValues$2 = (a, b) => {
2915
3446
  for (var prop in b || (b = {}))
2916
- if (__hasOwnProp$3.call(b, prop))
2917
- __defNormalProp$3(a, prop, b[prop]);
2918
- if (__getOwnPropSymbols$3)
2919
- for (var prop of __getOwnPropSymbols$3(b)) {
2920
- if (__propIsEnum$3.call(b, prop))
2921
- __defNormalProp$3(a, prop, b[prop]);
3447
+ if (__hasOwnProp$2.call(b, prop))
3448
+ __defNormalProp$2(a, prop, b[prop]);
3449
+ if (__getOwnPropSymbols$2)
3450
+ for (var prop of __getOwnPropSymbols$2(b)) {
3451
+ if (__propIsEnum$2.call(b, prop))
3452
+ __defNormalProp$2(a, prop, b[prop]);
2922
3453
  }
2923
3454
  return a;
2924
3455
  };
2925
- const root = __spreadValues$3({
2926
- "*": {
2927
- fontFamily: "body",
2928
- fontWeight: "body",
2929
- fontSize: "100%",
2930
- code: {
2931
- fontFamily: "monospace"
2932
- },
2933
- "&:focus": focusOutline
2934
- },
2935
- body: {
2936
- minHeight: "100vh"
2937
- },
2938
- h1: {
2939
- fontSize: responsive$1({ 0: 26, 3: 32 })
2940
- },
2941
- h2: {
2942
- fontSize: responsive$1({ 0: 22, 3: 28 })
2943
- },
2944
- h3: {
2945
- fontSize: responsive$1({ 0: 19, 3: 25 })
2946
- },
2947
- h4: {
2948
- fontSize: responsive$1({ 0: 18, 3: 22 })
2949
- },
2950
- h5: {
2951
- fontSize: responsive$1({ 0: 18, 3: 22 })
3456
+ var __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b));
3457
+ const pagination = __spreadProps$1(__spreadValues$2({}, getColorsByPath("components.pagination")), {
3458
+ gap: spacing(1),
3459
+ justifyContent: "stretch",
3460
+ "&.onlyRefresh": {
3461
+ justifyContent: "end"
2952
3462
  },
2953
- h6: {
2954
- fontSize: responsive$1({ 0: 17, 3: 17 })
3463
+ alignItems: "center",
3464
+ padding: 1,
3465
+ display: "flex",
3466
+ ".pagination__leftToolbar": {
3467
+ alignItems: "center",
3468
+ display: "flex",
3469
+ width: "100%"
2955
3470
  },
2956
- "h1,h2,h3,h4,h5,h6": {
2957
- letterSpacing: "heading",
2958
- lineHeight: "heading",
2959
- variant: "text.title"
3471
+ ".pagination__deleteLabels": {
3472
+ overflow: "hidden",
3473
+ textOverflow: "ellipsis",
3474
+ whiteSpace: "nowrap"
2960
3475
  },
2961
- "*:not(h1, h2, h3, h4, h5, h6, code)": {
2962
- fontFamily: "body",
2963
- fontSize: 16,
2964
- fontWeight: "body",
2965
- letterSpacing: "body",
2966
- lineHeight: "body"
3476
+ ".pagination__selectPage": {
3477
+ width: "80px",
3478
+ top: "80px",
3479
+ textAlign: "center"
2967
3480
  },
2968
- ".section": {
2969
- border: "2px solid green",
2970
- "&.apia_section_row": {
2971
- display: "flex",
2972
- flexDirection: "row"
2973
- },
2974
- ".panel": {
2975
- width: "fit-content",
2976
- height: "100%"
3481
+ ".iconButton": __spreadProps$1(__spreadValues$2({
3482
+ height: "36px",
3483
+ width: "36px"
3484
+ }, getColorsAndStatesByPath("components.pagination.icons", {
3485
+ states: { disabled: false, path: true }
3486
+ })), {
3487
+ "&:disabled": {
3488
+ background: "transparent"
2977
3489
  }
3490
+ }),
3491
+ ".recordsCounter": {
3492
+ color: "palette.primary.contrastText",
3493
+ pl: spacing(3)
2978
3494
  },
2979
- ".top": {
2980
- display: "flex"
3495
+ ".reachedMax": {
3496
+ color: "red",
3497
+ pl: 2
2981
3498
  },
2982
- ".bottom": {
2983
- display: "block",
2984
- width: "100%"
3499
+ ".pagination__controls": {
3500
+ flexGrow: 1,
3501
+ justifyContent: "center",
3502
+ flexShrink: 0,
3503
+ "&.onlyRefresh": {
3504
+ justifyContent: "end"
3505
+ },
3506
+ alignItems: "stretch",
3507
+ padding: 1,
3508
+ display: "flex",
3509
+ width: responsive$1({ 0: "max-content", 2: "auto" }),
3510
+ "select ~ svg": {
3511
+ display: "none"
3512
+ },
3513
+ ".input": __spreadProps$1(__spreadValues$2({
3514
+ display: "flex",
3515
+ alignItems: "center",
3516
+ gap: spacing(3),
3517
+ fontSize: "1em",
3518
+ border: "1px solid",
3519
+ paddingY: 1,
3520
+ paddingX: 4
3521
+ }, getColorsByPath("components.pagination.pagesBox")), {
3522
+ input: {
3523
+ font: "inherit",
3524
+ background: "none",
3525
+ border: "none",
3526
+ width: "30px",
3527
+ padding: 0,
3528
+ textAlign: "center"
3529
+ },
3530
+ span: {
3531
+ font: "inherit",
3532
+ display: "block",
3533
+ width: "30px"
3534
+ }
3535
+ })
2985
3536
  },
2986
- ".planelContainer": {
2987
- overflowAnchor: "none"
3537
+ ".infoTooltip": {
3538
+ position: "relative",
3539
+ display: "inline-block",
3540
+ borderBottom: "1px dotted black",
3541
+ cursor: "pointer",
3542
+ backgroundColor: "#f7d97f"
2988
3543
  },
2989
- ".minimap": {
2990
- background: "#00000015",
2991
- border: "1px solid #00000025",
2992
- position: "fixed",
2993
- bottom: "10px",
2994
- right: "10px",
2995
- "& > *": {
2996
- background: "#00000015",
2997
- position: "absolute"
2998
- },
2999
- ".dragging": {
3000
- background: "#55000015"
3001
- },
3002
- ".windowFrame": {
3003
- background: "#00005515",
3004
- border: "1px solid #00005525",
3005
- position: "absolute",
3006
- zIndex: 1
3544
+ ".pagination__information": {
3545
+ p: 1,
3546
+ ".pagination__infoIcon": {
3547
+ display: "flex"
3007
3548
  }
3008
3549
  },
3009
- "abbr.required": {
3010
- color: "danger",
3011
- textDecoration: "none"
3012
- },
3013
- '[aria-selected="true"], .selected': __spreadValues$3({}, getPalette().getOneState(
3014
- { backgroundColor: getPalette().primary.main },
3015
- "selected"
3016
- ))
3017
- }, transitions);
3550
+ ".pagination__alertInfo": __spreadValues$2({
3551
+ variant: "buttons.icon-primary"
3552
+ }, getColorsAndStatesByPath("buttons.iconAlert")),
3553
+ ".pagination__rightToolbar": {
3554
+ display: "flex",
3555
+ gap: 0,
3556
+ width: "100%",
3557
+ justifyContent: "end",
3558
+ ".pagination__deleteFiltersButton": {
3559
+ variant: "buttons.primary-sm",
3560
+ textDecoration: "none",
3561
+ px: 3,
3562
+ ".button__content": {
3563
+ display: "flex",
3564
+ flexDirection: "row",
3565
+ gap: 3
3566
+ },
3567
+ ".pagination__appliedFiltersLabel": {
3568
+ backgroundColor: "palette.primary.contrastText",
3569
+ color: "palette.text.title",
3570
+ borderRadius: "100%",
3571
+ display: "inline-flex",
3572
+ alignItems: "center",
3573
+ justifyContent: "center",
3574
+ minWidth: "1.5em",
3575
+ "&.withFilters": {
3576
+ backgroundColor: "favorite",
3577
+ color: "palette.text.primary"
3578
+ }
3579
+ }
3580
+ }
3581
+ }
3582
+ });
3018
3583
 
3019
- const text = {
3020
- default: {
3021
- color: "palette.text.primary",
3022
- fontFamily: "body",
3023
- fontWeight: "body",
3024
- fontSize: 16,
3025
- m: spacing(0),
3026
- width: "100%"
3027
- },
3028
- title: {
3029
- letterSpacing: "heading",
3030
- wordBreak: "normal",
3031
- color: "title",
3032
- fontFamily: "heading",
3033
- lineHeight: "heading",
3034
- fontWeight: "heading"
3584
+ const accordion = {
3585
+ primary: {
3586
+ "&, .accordion__item": {
3587
+ display: "flex",
3588
+ flexDirection: "column",
3589
+ alignItems: "stretch"
3590
+ },
3591
+ ".accordion__item__button__leftGroup, .accordion__item__button__rightGroup": {
3592
+ alignItems: "center",
3593
+ display: "flex",
3594
+ gap: 3,
3595
+ "& > *": {
3596
+ flexShrink: 0,
3597
+ "&.accordion__item__button__label": {
3598
+ flexShrink: 1
3599
+ }
3600
+ }
3601
+ },
3602
+ ".accordion__item__button__label": {
3603
+ overflow: "hidden",
3604
+ textOverflow: "ellipsis",
3605
+ whiteSpace: "nowrap",
3606
+ flexShrink: 1,
3607
+ color: "palette.primary.contrastText",
3608
+ fontSize: 16
3609
+ },
3610
+ ".accordion__item__button__check": {
3611
+ width: "32px",
3612
+ height: "32px",
3613
+ background: "palette.background.paper",
3614
+ border: "1px solid",
3615
+ borderColor: "palette.border.field",
3616
+ cursor: "pointer",
3617
+ display: "flex",
3618
+ alignItems: "stretch",
3619
+ justifyContent: "stretch",
3620
+ p: 2,
3621
+ svg: {
3622
+ color: "palette.text.primary",
3623
+ height: "100%",
3624
+ width: "100%"
3625
+ }
3626
+ },
3627
+ ".accordion__item:last-of-type > *": {
3628
+ borderBottom: "1px solid",
3629
+ borderBottomColor: "palette.border.section"
3630
+ },
3631
+ ".accordion__item__content > *": {
3632
+ p: spacing(3),
3633
+ borderLeft: "1px solid",
3634
+ borderRight: "1px solid",
3635
+ borderLeftColor: "palette.border.section",
3636
+ borderRightColor: "palette.border.section"
3637
+ },
3638
+ ".accordion__item__button": {
3639
+ width: "100%",
3640
+ p: 3,
3641
+ ".button__content": {
3642
+ alignItems: "center",
3643
+ display: "flex",
3644
+ gap: spacing(3),
3645
+ justifyContent: "space-between",
3646
+ width: "100%"
3647
+ }
3648
+ }
3035
3649
  }
3036
3650
  };
3037
3651
 
3038
- const baseTheme = {
3039
- alerts,
3040
- breakpoints: ["0px", "250px", "500px", "700px", "1000px", "1260px", "1580px"],
3041
- buttons,
3042
- colors: getThemeColorsObject(),
3043
- fonts: {
3044
- body: "Arial",
3045
- heading: "inherit",
3046
- monospace: "Menlo, monospace"
3047
- },
3048
- fontSizes: Array(60).fill(1).map((_, i) => {
3049
- return i;
3050
- }),
3051
- forms: forms$1(),
3052
- layout,
3053
- lineHeights: {
3054
- body: 1.5,
3055
- heading: 1.125
3056
- },
3057
- letterSpacings: {
3058
- body: "0.01em",
3059
- heading: "-0.015em"
3060
- },
3061
- radii: {
3062
- alerts: 0,
3063
- buttons: 0,
3064
- default: 0
3065
- },
3066
- shadows: {
3067
- modals: "",
3068
- tabs: ""
3069
- },
3070
- space: [0, 2, 4, 8, 12, 16, 24, 32, 40, 48, 64, 80, 96, 112, 128],
3071
- sizes: {
3072
- // Layout
3073
- applicationMenu: "350px",
3074
- floatingNotifications: "min(550px, calc(100vw - 30px))",
3075
- root: "992px",
3076
- mainImage: "64px",
3077
- twoColumns: "calc(992px + 350px)",
3078
- twoColumnsCentered: "calc(992px + 350px + 16px)",
3079
- // Icons
3080
- iconxs: "12px",
3081
- iconsm: "16px",
3082
- iconmd: "22px",
3083
- iconlg: "32px",
3084
- iconxl: "48px"
3085
- },
3086
- styles: {
3087
- root
3088
- },
3089
- text,
3090
- zIndices: {
3091
- stickyElements: 600,
3092
- menu: 1e3,
3093
- maximizedTables: 1100,
3094
- modal: 1200,
3095
- tooltip: 1400,
3096
- notifications: 1600,
3097
- contextMenu: 1800
3098
- },
3099
- useRootStyles: true
3652
+ const components = {
3653
+ accordion,
3654
+ pagination
3655
+ };
3656
+
3657
+ const common = (theme) => {
3658
+ return {
3659
+ forms,
3660
+ modals,
3661
+ tables: tables(theme),
3662
+ components,
3663
+ trees
3664
+ /* PREPEND HERE */
3665
+ };
3666
+ };
3667
+
3668
+ const layout = (theme) => {
3669
+ return {
3670
+ common: common(theme)
3671
+ /* PREPEND HERE */
3672
+ };
3100
3673
  };
3101
3674
 
3102
3675
  const makeTheme = (t) => {
3103
3676
  return t;
3104
3677
  };
3105
3678
  let declaredStyles = {};
3106
- new class MainThemeEmitter extends EventEmitter {
3107
- }();
3108
- function getMainTheme(customTheme) {
3109
- return makeTheme(
3110
- merge(baseTheme, { layout: declaredStyles }, customTheme != null ? customTheme : {})
3679
+ function getMainTheme(customTheme, customPalette) {
3680
+ const theme = makeTheme(
3681
+ merge(baseTheme(), { layout: declaredStyles }, customTheme != null ? customTheme : {}, {
3682
+ palette: {}
3683
+ })
3684
+ );
3685
+ const palette = parsePalette(
3686
+ merge({}, defaultPalette, customPalette != null ? customPalette : theme.palette),
3687
+ theme
3111
3688
  );
3689
+ theme.palette = palette;
3690
+ theme.colors = getThemeColorsObject(theme);
3691
+ theme.forms = forms$1(theme);
3692
+ theme.layout = merge(layout(theme), theme.layout);
3693
+ theme.styles = merge({}, customTheme == null ? void 0 : customTheme.styles, { root: theme.layout.root });
3694
+ return theme;
3112
3695
  }
3113
3696
 
3114
- var __defProp$2 = Object.defineProperty;
3115
- var __getOwnPropSymbols$2 = Object.getOwnPropertySymbols;
3116
- var __hasOwnProp$2 = Object.prototype.hasOwnProperty;
3117
- var __propIsEnum$2 = Object.prototype.propertyIsEnumerable;
3118
- var __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3119
- var __spreadValues$2 = (a, b) => {
3697
+ var __defProp$1 = Object.defineProperty;
3698
+ var __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;
3699
+ var __hasOwnProp$1 = Object.prototype.hasOwnProperty;
3700
+ var __propIsEnum$1 = Object.prototype.propertyIsEnumerable;
3701
+ var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3702
+ var __spreadValues$1 = (a, b) => {
3120
3703
  for (var prop in b || (b = {}))
3121
- if (__hasOwnProp$2.call(b, prop))
3122
- __defNormalProp$2(a, prop, b[prop]);
3123
- if (__getOwnPropSymbols$2)
3124
- for (var prop of __getOwnPropSymbols$2(b)) {
3125
- if (__propIsEnum$2.call(b, prop))
3126
- __defNormalProp$2(a, prop, b[prop]);
3704
+ if (__hasOwnProp$1.call(b, prop))
3705
+ __defNormalProp$1(a, prop, b[prop]);
3706
+ if (__getOwnPropSymbols$1)
3707
+ for (var prop of __getOwnPropSymbols$1(b)) {
3708
+ if (__propIsEnum$1.call(b, prop))
3709
+ __defNormalProp$1(a, prop, b[prop]);
3127
3710
  }
3128
3711
  return a;
3129
3712
  };
@@ -3134,12 +3717,22 @@ function handleNewStyles(ev) {
3134
3717
  injectedStyles[ev.path] = ev.styles;
3135
3718
  }
3136
3719
  mainThemeEmitter.on("newStyles", handleNewStyles);
3137
- function useMainTheme(customTheme) {
3138
- const [theme, setTheme] = useState(getMainTheme(customTheme));
3720
+ function useMainTheme(customTheme, customPalette) {
3721
+ const [theme, setTheme] = useState(
3722
+ getMainTheme(customTheme, customPalette)
3723
+ );
3724
+ const previousTheme = useRef(customTheme);
3725
+ const previousPalette = useRef(customPalette);
3726
+ if (previousTheme.current !== customTheme)
3727
+ setTheme(getMainTheme(customTheme));
3728
+ previousTheme.current = customTheme;
3729
+ if (previousPalette.current !== customPalette)
3730
+ setTheme(getMainTheme(customTheme, customPalette));
3731
+ previousPalette.current = customPalette;
3139
3732
  useMount(() => {
3140
3733
  setTheme((current) => {
3141
3734
  mainThemeEmitter.off("newStyles", handleNewStyles);
3142
- let initialTheme = __spreadValues$2({}, current);
3735
+ let initialTheme = __spreadValues$1({}, current);
3143
3736
  Object.entries(injectedStyles).forEach(([path, styles]) => {
3144
3737
  const newStyles = setValueByPath({}, path, styles);
3145
3738
  initialTheme = merge(initialTheme, newStyles);
@@ -3148,79 +3741,18 @@ function useMainTheme(customTheme) {
3148
3741
  });
3149
3742
  return mainThemeEmitter.on("newStyles", (ev) => {
3150
3743
  const newStyles = setValueByPath({}, ev.path, ev.styles);
3151
- setTheme((current) => merge(__spreadValues$2({}, current), newStyles));
3744
+ setTheme((current) => merge(__spreadValues$1({}, current), newStyles));
3152
3745
  });
3153
3746
  });
3154
3747
  return theme;
3155
3748
  }
3156
3749
 
3157
- let timeout = -1;
3158
- function logTheme(theme) {
3159
- clearTimeout(timeout);
3160
- timeout = setTimeout(() => {
3161
- console.info({ theme });
3162
- }, 100);
3163
- }
3164
- const ThemeProviderContext = createContext({});
3165
- const ThemeProvider = ({ children, customTheme }) => {
3166
- const theme = useMainTheme(customTheme);
3167
- logTheme(theme);
3168
- return /* @__PURE__ */ jsx(ThemeProviderContext.Provider, { value: theme, children: /* @__PURE__ */ jsx(ThemeProvider$1, { theme, children }) });
3169
- };
3170
-
3171
- var __defProp$1 = Object.defineProperty;
3172
- var __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;
3173
- var __hasOwnProp$1 = Object.prototype.hasOwnProperty;
3174
- var __propIsEnum$1 = Object.prototype.propertyIsEnumerable;
3175
- var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3176
- var __spreadValues$1 = (a, b) => {
3177
- for (var prop in b || (b = {}))
3178
- if (__hasOwnProp$1.call(b, prop))
3179
- __defNormalProp$1(a, prop, b[prop]);
3180
- if (__getOwnPropSymbols$1)
3181
- for (var prop of __getOwnPropSymbols$1(b)) {
3182
- if (__propIsEnum$1.call(b, prop))
3183
- __defNormalProp$1(a, prop, b[prop]);
3184
- }
3185
- return a;
3186
- };
3187
- function getColorsByDefinition(definition, options) {
3188
- return merge(
3189
- buildColorsObject(__spreadValues$1(__spreadValues$1(__spreadValues$1({}, definition.color ? { color: definition.color } : null), definition.backgroundColor ? { backgroundColor: definition.backgroundColor } : null), definition.borderColor ? {
3190
- borderColor: definition.borderColor
3191
- } : null)),
3192
- options == null ? void 0 : options.mergeObject
3193
- );
3194
- }
3195
-
3196
- function getColorsAndStatesByDefinition(definition, options) {
3197
- var _a, _b, _c, _d, _e, _f, _g, _h, _i;
3198
- const active = getColorState(definition, "active");
3199
- const checked = getColorState(definition, "checked");
3200
- const disabled = getColorState(definition, "disabled");
3201
- const focus = ((_a = options == null ? void 0 : options.states) == null ? void 0 : _a.focus) ? getColorState(definition, "focus") : {};
3202
- const hover = getColorState(definition, "hover");
3203
- const readonly = getColorState(definition, "readonly");
3204
- const selected = getColorState(definition, "selected");
3205
- return merge(
3206
- ((_b = options == null ? void 0 : options.states) == null ? void 0 : _b.default) !== false ? getColorsByDefinition(definition) : null,
3207
- ((_c = options == null ? void 0 : options.states) == null ? void 0 : _c.checked) !== false ? buildStateObject(checked, "checked") : {},
3208
- ((_d = options == null ? void 0 : options.states) == null ? void 0 : _d.focus) !== false ? buildStateObject(focus, "focus") : {},
3209
- ((_e = options == null ? void 0 : options.states) == null ? void 0 : _e.hover) !== false ? buildStateObject(hover, "hover") : {},
3210
- ((_f = options == null ? void 0 : options.states) == null ? void 0 : _f.active) !== false ? buildStateObject(active, "active") : {},
3211
- ((_g = options == null ? void 0 : options.states) == null ? void 0 : _g.selected) !== false ? buildStateObject(selected, "selected") : {},
3212
- ((_h = options == null ? void 0 : options.states) == null ? void 0 : _h.disabled) !== false ? buildStateObject(disabled, "disabled") : {},
3213
- ((_i = options == null ? void 0 : options.states) == null ? void 0 : _i.readonly) !== false ? buildStateObject(readonly, "readonly") : {},
3214
- options == null ? void 0 : options.mergeObject
3215
- );
3216
- }
3217
-
3218
3750
  const CustomThemeProvider = ({
3219
3751
  children,
3220
3752
  customTheme
3221
3753
  }) => {
3222
3754
  const theme = getMainTheme(customTheme);
3223
- return /* @__PURE__ */ jsx(ThemeProvider$1, { theme, children });
3755
+ return /* @__PURE__ */ jsx(ThemeUIProvider, { theme, children });
3224
3756
  };
3225
3757
 
3226
3758
  var __defProp = Object.defineProperty;
@@ -3243,10 +3775,14 @@ var __spreadValues = (a, b) => {
3243
3775
  };
3244
3776
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
3245
3777
  function makeStyledComponent(displayName, stylesPath, styles, Component, unwraped = false) {
3246
- const theme = setValueByPath({}, stylesPath, styles);
3247
3778
  return Object.assign(
3248
3779
  (props) => {
3249
3780
  const avoidFirstRender = useRef(0);
3781
+ const { theme: tuiTheme } = useThemeUI();
3782
+ const theme = useMemo(
3783
+ () => __spreadValues(__spreadValues({}, tuiTheme), setValueByPath({}, stylesPath, styles)),
3784
+ [tuiTheme]
3785
+ );
3250
3786
  if (unwraped) {
3251
3787
  return /* @__PURE__ */ jsx(CustomThemeProvider, { customTheme: theme, children: /* @__PURE__ */ jsx(NoThemePrevent, { avoidFirstRender, children: /* @__PURE__ */ jsx(Suspense, { children: /* @__PURE__ */ jsx(Component, __spreadValues({}, props)) }) }) });
3252
3788
  }
@@ -3271,5 +3807,21 @@ function injectStyles(par1, par2) {
3271
3807
  mainThemeEmitter.emit("newStyles", { path, styles });
3272
3808
  }
3273
3809
 
3274
- export { ThemeProvider, ThemeProviderContext, applyStatesGetColor, focusOutline, getColorState, getColorStates, getColorsAndStatesByDefinition, getColorsAndStatesByPath, getColorsByDefinition, getColorsByPath, getOneColorState, getPalette, getVariant, injectStyles, makeStyledComponent, responsive$1 as responsive, smallButton, spacing, useMainTheme };
3275
- //# sourceMappingURL=index.js.map
3810
+ let timeout = -1;
3811
+ function logTheme(theme) {
3812
+ clearTimeout(timeout);
3813
+ timeout = setTimeout(() => {
3814
+ console.info("Theme log: ", { theme });
3815
+ }, 100);
3816
+ }
3817
+ const ApiaThemeProvider = ({
3818
+ children,
3819
+ customTheme,
3820
+ customPalette
3821
+ }) => {
3822
+ const theme = useMainTheme(customTheme, customPalette);
3823
+ logTheme(theme);
3824
+ return /* @__PURE__ */ jsx(ThemeProvider, { theme, children });
3825
+ };
3826
+
3827
+ export { ApiaThemeProvider, applyStatesGetColor, focusOutline, getColorState, getColorStates, getColorsAndStatesByDefinition, getColorsAndStatesByPath, getColorsByDefinition, getColorsByPath, getOneColorState, getVariant, injectStyles, makeStyledComponent, parsePalette, responsive$1 as responsive, smallButton, spacing, useMainTheme };