@apia/theme 0.1.0 → 0.1.3

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,3275 +1 @@
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
- import tinycolor from 'tinycolor2';
7
- import { focusOutline as focusOutline$1 } from '@apia/theme';
8
-
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;
24
- }
25
- function spacing(index) {
26
- var _a;
27
- return (_a = defaultPalette.spacing(index)) != null ? _a : index;
28
- }
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 };
42
- }
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);
149
- }
150
-
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) => {
157
- 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]);
164
- }
165
- return a;
166
- };
167
- const getColorState = (definition, state) => {
168
- var _a, _b, _c, _d;
169
- if (state === "default")
170
- return buildColorsObject(definition);
171
- const palette = getPalette();
172
- const opacity = palette.action[`${state}Opacity`];
173
- const actualState = state === "checked" ? "selected" : state;
174
- definition = Object.fromEntries(
175
- Object.entries(definition).map(([name, value]) => {
176
- if ([
177
- "backgroundColor",
178
- "borderColor",
179
- "borderLeftColor",
180
- "borderRightColor",
181
- "borderBottomColor",
182
- "borderTopColor",
183
- "color"
184
- ].includes(name) && (value != null ? value : "").startsWith("palette"))
185
- value = getValueByPath(
186
- palette,
187
- value.slice("palette.".length)
188
- );
189
- return [name, value];
190
- })
191
- );
192
- const calculatedBackgroundColor = tinycolor.mix(
193
- (_a = definition.backgroundColor) != null ? _a : "",
194
- tinycolor((_b = definition.backgroundColor) != null ? _b : "").isLight() ? palette.action[actualState].light : palette.action[actualState].dark,
195
- 100 * opacity
196
- ).toRgbString();
197
- return buildColorsObject(__spreadValues$m(__spreadValues$m({}, definition.backgroundColor ? {
198
- backgroundColor: state === "checked" ? (_c = definition.backgroundColor) != null ? _c : "" : calculatedBackgroundColor,
199
- color: state === "checked" ? tinycolor.mix(
200
- tinycolor((_d = definition.color) != null ? _d : "black"),
201
- tinycolor(palette.action.selected.dark),
202
- 100 * palette.action.selectedOpacity
203
- ).toRgbString() : window.currentPalette.getContrastText(
204
- calculatedBackgroundColor
205
- )
206
- } : null), definition.borderColor ? {
207
- borderColor: tinycolor.mix(
208
- definition.borderColor,
209
- tinycolor(definition.borderColor).isLight() ? palette.action[actualState].light : palette.action[actualState].dark,
210
- 100 * opacity
211
- ).toRgbString()
212
- } : null));
213
- };
214
-
215
- const applyStatesGetColor = (definition, states) => {
216
- const newStates = (states == null ? void 0 : states.default) !== false ? cloneDeep(definition) : {};
217
- if ((states == null ? void 0 : states.active) !== false) {
218
- newStates.active = getColorState(definition, "active");
219
- }
220
- if ((states == null ? void 0 : states.disabled) !== false) {
221
- newStates.disabled = getColorState(definition, "disabled");
222
- }
223
- if ((states == null ? void 0 : states.focus) !== false) {
224
- newStates.focus = getColorState(definition, "focus");
225
- }
226
- if ((states == null ? void 0 : states.hover) !== false) {
227
- newStates.hover = getColorState(definition, "hover");
228
- }
229
- if ((states == null ? void 0 : states.readonly) !== false) {
230
- newStates.readonly = getColorState(definition, "readonly");
231
- }
232
- if ((states == null ? void 0 : states.selected) !== false) {
233
- newStates.selected = getColorState(definition, "selected");
234
- }
235
- if ((states == null ? void 0 : states.checked) !== false) {
236
- newStates.checked = getColorState(definition, "checked");
237
- }
238
- return newStates;
239
- };
240
-
241
- function applyStates(properties, states) {
242
- properties.forEach((def) => {
243
- Object.entries(def).forEach(([key, value]) => {
244
- if (typeof value === "string")
245
- return;
246
- 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);
261
- });
262
- });
263
- }
264
-
265
- function isColorDefinition(value) {
266
- return !!value && typeof value === "object" && "main" in value;
267
- }
268
-
269
- function defaultLighten(color, ratio) {
270
- return tinycolor(color).lighten(ratio != null ? ratio : 20).toRgbString();
271
- }
272
- function defaultDarken(color, ratio) {
273
- return tinycolor(color).darken(ratio != null ? ratio : 20).toRgbString();
274
- }
275
- function defaultGetContrastText(color) {
276
- const current = tinycolor(color);
277
- return tinycolor.readability("white", current) < tinycolor.readability("black", current) ? "black" : "white";
278
- }
279
-
280
- const buildStateObject = (props, state) => {
281
- switch (state) {
282
- case "active":
283
- return {
284
- "&:active": props,
285
- "input[role]:active ~ &": props,
286
- "input[role]:active ~ & path": props
287
- };
288
- case "checked":
289
- return {
290
- "&:checked": props,
291
- "input[role]:checked ~ &": props,
292
- "input[role]:checked ~ & path": props
293
- };
294
- case "disabled":
295
- return {
296
- "&:disabled": props,
297
- "input[role]:disabled ~ &": props,
298
- "input[role]:disabled ~ & path": props
299
- };
300
- case "focus": {
301
- const focusObject = merge({}, focusOutline, props);
302
- return {
303
- "&:focus": focusObject,
304
- "input[role]:focus ~ &": focusObject
305
- };
306
- }
307
- case "hover": {
308
- return {
309
- '&:hover:not([readonly], :disabled,[aria-selected="true"],:active)': props,
310
- 'input[role]:hover:not([readonly], :active, :disabled) ~ &:not(:disabled,[aria-selected="true"])': props,
311
- 'input[role]:hover:not([readonly], :active, :disabled) ~ &:not(:disabled,[aria-selected="true"]) path': props
312
- };
313
- }
314
- case "readonly":
315
- return {
316
- "&[readonly]": props,
317
- "input[role][readonly] ~ &": props,
318
- "input[role][readonly] ~ & path": props,
319
- "&.readonly input ~ &, &.readOnly input ~ &": props,
320
- "&.readonly input ~ & path, &.readOnly input ~ & path": props,
321
- "&.readonly, &.readOnly": props
322
- };
323
- case "selected":
324
- return {
325
- "&:selected": props,
326
- "input[role]:selected ~ &": props,
327
- "input[role]:selected ~ & path": props,
328
- '&[aria-selected="true"]': props
329
- };
330
- default:
331
- return props;
332
- }
333
- };
334
-
335
- function getColorsByPath(path, options) {
336
- return merge(
337
- buildColorsObject({
338
- color: `${path}.color`,
339
- backgroundColor: `${path}.backgroundColor`,
340
- borderColor: `${path}.borderColor`
341
- }),
342
- options == null ? void 0 : options.mergeObject
343
- );
344
- }
345
-
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) => {
352
- 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]);
359
- }
360
- return a;
361
- };
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({
367
- 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({
372
- cursor: "notAllowed"
373
- }, getColorsByPath(`${path}.readonly`, options));
374
- const selected = getColorsByPath(`${path}.selected`, options);
375
- 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),
377
- options == null ? void 0 : options.mergeObject
378
- );
379
- }
380
-
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) => {
387
- 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]);
394
- }
395
- return a;
396
- };
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);
399
- };
400
-
401
- const getOneColorState = (color, state) => {
402
- if (state === "default")
403
- return color;
404
- const actualState = state === "checked" ? "selected" : state;
405
- const palette = getPalette();
406
- const opacity = palette.action[`${state}Opacity`];
407
- return tinycolor.mix(
408
- color,
409
- tinycolor(color).isLight() ? palette.action[actualState].light : palette.action[actualState].dark,
410
- 100 * opacity
411
- ).toRgbString();
412
- };
413
-
414
- function parsePalette(palette) {
415
- var _a, _b, _c, _d, _e, _f, _g, _h;
416
- 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;
424
- Object.entries(palette).forEach(([key, value]) => {
425
- var _a2, _b2, _c2;
426
- const castedValue = value;
427
- if (isColorDefinition(castedValue)) {
428
- newPalette[key] = {
429
- main: castedValue.main,
430
- light: (_a2 = castedValue.light) != null ? _a2 : newPalette.lightenColor(castedValue.main),
431
- dark: (_b2 = castedValue.dark) != null ? _b2 : newPalette.darkenColor(castedValue.main),
432
- contrastText: (_c2 = castedValue.contrastText) != null ? _c2 : newPalette.getContrastText(castedValue.main)
433
- };
434
- } else {
435
- newPalette[key] = value;
436
- }
437
- });
438
- newPalette.border.article = (_d = newPalette.border.article) != null ? _d : newPalette.secondary.main;
439
- newPalette.border.field = (_e = newPalette.border.field) != null ? _e : newPalette.text.primary;
440
- newPalette.border.section = (_f = newPalette.border.section) != null ? _f : newPalette.primary.main;
441
- function parseAction(action) {
442
- var _a2, _b2;
443
- if (typeof action === "string")
444
- return {
445
- dark: action,
446
- light: action
447
- };
448
- return {
449
- dark: (_a2 = action.dark) != null ? _a2 : action.light,
450
- light: (_b2 = action.light) != null ? _b2 : action.dark
451
- };
452
- }
453
- newPalette.action.active = parseAction(newPalette.action.active);
454
- newPalette.action.disabled = parseAction(newPalette.action.disabled);
455
- newPalette.action.focus = parseAction(newPalette.action.focus);
456
- newPalette.action.hover = parseAction(newPalette.action.hover);
457
- newPalette.action.readonly = parseAction(newPalette.action.readonly);
458
- 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
- newPalette.gray = (_g = newPalette.gray) != null ? _g : {};
466
- for (let i = 1; i <= 18; i++) {
467
- const index = Math.round((255 - 255 / 18) / 18 * i);
468
- newPalette.gray[i * 50] = (_h = newPalette.gray[i * 50]) != null ? _h : `rgb(${index},${index},${index})`;
469
- }
470
- return newPalette;
471
- }
472
-
473
- const schemas = {
474
- ocean: ["#008E1B", "#009155", "#009187", "#008EB1", "#006872", "#2F4858"],
475
- sunset: ["#ae76de", "#D65DB1", "#FF6F91", "#FF9671", "#FFC75F", "#F9F871"],
476
- red: ["#dc143c", "#ff2400", "#800020", "#b22222", "#e52b50", "#ff7f50"],
477
- orange: ["#F76E11", "#FF9F45", "#FFBC80", "#FC4F4F", "#eb9605", "#964000"],
478
- green: ["#a4de02", "#76ba1b", "#4c9a2a", "#acdf87", "#68bb59", "#1e5631"],
479
- blue: ["#7ad6f4", "#45bdee", "#28a7ea", "#006cbb", "#034698", "#032f64"],
480
- violet: ["#80007e", "#a02d9c", "#c37ecd", "#9e5fb8", "#7f3e98", "#4c197f"],
481
- turquoise: ["#0ddbcc", "#43ebff", "#19ceeb", "#28acea", "#388ee9", "#3d76e0"],
482
- yellow: ["#fff700", "#ffff9f", "#fef54f", "#f9e231", "#f6c616", "#eab200"],
483
- grey: ["#b1b5ba", "#d2d5d6", "#dee0e0", "#bdbdbb", "#9fa19c", "#686e67"]
484
- };
485
-
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) => {
494
- 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]);
501
- }
502
- return a;
503
- };
504
- var __spreadProps$a = (a, b) => __defProps$a(a, __getOwnPropDescs$a(b));
505
- const darkBlue = "#004085";
506
- const lightBlue = "#cce5ff";
507
- const white = "white";
508
- function getSelectedColors() {
509
- const palette = getPalette();
510
- return palette.getStatesFromDefinition(
511
- {
512
- backgroundColor: palette.background.paper,
513
- color: palette.text.primary
514
- },
515
- {
516
- active: false,
517
- checked: false,
518
- default: false,
519
- disabled: false,
520
- focus: false,
521
- readonly: false
522
- }
523
- );
524
- }
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() {
540
- 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"
573
- }),
574
- collapsibleAsidePanelTitle: {
575
- color: palette.text.primary
576
- },
577
- deletableInputButton: {
578
- backgroundColor: "transparent",
579
- color: palette.secondary.main,
580
- active: {
581
- color: palette.darkenColor(palette.secondary.main, 40)
582
- },
583
- disabled: {
584
- color: palette.secondary.main
585
- },
586
- focus: {
587
- color: palette.darkenColor(palette.secondary.main, 20)
588
- },
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
598
- },
599
- focus: {
600
- color: palette.secondary.contrastText
601
- }
602
- },
603
- iconAlert: {
604
- backgroundColor: "transparent",
605
- color: "#e5c200",
606
- active: {
607
- backgroundColor: "transparent",
608
- color: tinycolor("#e5c200").darken(10).toRgbString()
609
- },
610
- focus: {
611
- backgroundColor: "transparent",
612
- color: tinycolor("#e5c200").darken(5).toRgbString()
613
- },
614
- hover: {
615
- backgroundColor: "transparent",
616
- color: tinycolor("#e5c200").darken(5).toRgbString()
617
- }
618
- },
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
627
- },
628
- hover: {
629
- color: palette.primary.contrastText
630
- }
631
- },
632
- iconToggled: {
633
- backgroundColor: palette.primary.main,
634
- color: palette.primary.contrastText,
635
- active: {
636
- color: palette.primary.contrastText
637
- },
638
- focus: {
639
- color: palette.common.white
640
- },
641
- hover: {
642
- color: palette.common.white
643
- }
644
- },
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
- )
709
- },
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
- )
725
- }
726
- },
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
745
- }
746
- },
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
- 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
840
- },
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
- }
858
- },
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
- }
882
- }
883
- },
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
- ]);
949
- return colors;
950
- }
951
-
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) => {
958
- 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]);
965
- }
966
- return a;
967
- };
968
- const alerts = {
969
- primary: {
970
- border: "1px solid",
971
- borderLeft: "12px solid",
972
- borderRadius: "alerts",
973
- display: "flex",
974
- flexDirection: "column",
975
- fontWeight: "normal",
976
- maxHeight: "60vh",
977
- overflow: "auto",
978
- p: 0,
979
- "&:focus": {
980
- outline: "none"
981
- },
982
- ".notification__header": {
983
- display: "flex",
984
- alignItems: "center",
985
- justifyContent: "space-between",
986
- position: "sticky",
987
- top: 0,
988
- width: "100%",
989
- p: spacing(5)
990
- },
991
- ".notification__title": {
992
- fontSize: 18,
993
- fontWeight: "bold",
994
- color: "palette.text.primary",
995
- display: "flex",
996
- gap: spacing(5),
997
- alignItems: "center"
998
- },
999
- ".notification__closeButton": {
1000
- flexShrink: 0
1001
- },
1002
- ".notification__body": {
1003
- alignItems: "center",
1004
- display: "flex",
1005
- flexDirection: "row",
1006
- gap: spacing(5),
1007
- width: "100%",
1008
- p: spacing(5)
1009
- },
1010
- ".notification__header ~ .notification__body": {
1011
- pt: 0
1012
- },
1013
- ".notification__content": {
1014
- display: "flex",
1015
- alignItems: "stretch",
1016
- flexDirection: "column",
1017
- gap: spacing(5),
1018
- width: "100%"
1019
- },
1020
- ".notification__icon": {
1021
- flexShrink: 0,
1022
- height: "iconMd",
1023
- svg: {
1024
- height: "iconMd",
1025
- width: "iconMd"
1026
- }
1027
- },
1028
- ".notification__message": {
1029
- display: "flex",
1030
- flexDirection: "column",
1031
- fontWeight: "normal",
1032
- gap: spacing(3),
1033
- width: "100%",
1034
- wordBreak: "break-word"
1035
- },
1036
- ".notification__trace": {
1037
- maxWidth: "100%",
1038
- overflow: "hidden",
1039
- maxHeight: "30vh",
1040
- flexShrink: 0,
1041
- backgroundColor: "rgba(10,10,10,0.02)",
1042
- pt: spacing(5),
1043
- ".notification__traceLabel": {
1044
- pl: spacing(5)
1045
- },
1046
- ".notification__traceText": {
1047
- fontWeight: "normal",
1048
- p: spacing(5),
1049
- maxHeight: "30vh",
1050
- overflow: "auto",
1051
- maxWidth: "100%",
1052
- position: "relative"
1053
- }
1054
- },
1055
- "&:focus .notification__closeButton": focusOutline
1056
- },
1057
- warning: {
1058
- variant: "alerts.primary",
1059
- "&, & .notification__header": __spreadValues$i({}, getColorsByPath("notifications.warning"))
1060
- },
1061
- danger: {
1062
- variant: "alerts.primary",
1063
- "&, & .notification__header": __spreadValues$i({}, getColorsByPath("notifications.error"))
1064
- },
1065
- success: {
1066
- variant: "alerts.primary",
1067
- "&, & .notification__header": __spreadValues$i({}, getColorsByPath("notifications.success"))
1068
- }
1069
- };
1070
-
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) => {
1079
- 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]);
1086
- }
1087
- return a;
1088
- };
1089
- var __spreadProps$9 = (a, b) => __defProps$9(a, __getOwnPropDescs$9(b));
1090
- const buttons = {
1091
- inherit: {
1092
- color: "inherit",
1093
- background: "inherit",
1094
- border: "none",
1095
- borderRadius: 0,
1096
- font: "inherit",
1097
- cursor: "pointer",
1098
- padding: 0,
1099
- margin: 0
1100
- },
1101
- collapsibleAsidePanelTitle: __spreadValues$h({
1102
- variant: "buttons.inherit",
1103
- display: "flex",
1104
- justifyContent: "space-between",
1105
- alignItems: "center",
1106
- width: "100%"
1107
- }, getColorsAndStatesByPath("buttons.collapsibleAsidePanelTitle")),
1108
- primary: __spreadProps$9(__spreadValues$h({
1109
- borderWidth: "2px",
1110
- borderStyle: "solid",
1111
- variant: "text.default",
1112
- py: responsive$1({ 0: 3, 4: 4 }),
1113
- px: responsive$1({ 0: 5, 4: 6 }),
1114
- display: "inline-block",
1115
- width: responsive$1({ 0: "100%", 1: "auto" }),
1116
- cursor: "pointer",
1117
- borderRadius: "buttons",
1118
- fontWeight: "normal",
1119
- userSelect: "none",
1120
- transition: "background-color 300ms ease-out, color 300ms ease-out",
1121
- wordBreak: "keep-all"
1122
- }, getColorsAndStatesByPath("buttons.primary")), {
1123
- "&:focus, &:focus-visible": {
1124
- outlineColor: "#00daff"
1125
- }
1126
- }),
1127
- "primary-sm": __spreadValues$h({
1128
- variant: "buttons.primary",
1129
- "&:focus, &:focus-visible": {}
1130
- }, smallButton),
1131
- secondary: __spreadValues$h({
1132
- variant: "buttons.primary",
1133
- "&:focus, &:focus-visible": {},
1134
- borderWidth: "0px",
1135
- borderStyle: "solid"
1136
- }, getColorsAndStatesByPath("buttons.secondary")),
1137
- "secondary-sm": __spreadValues$h({
1138
- variant: "buttons.secondary"
1139
- }, smallButton),
1140
- "light-secondary": __spreadValues$h({
1141
- variant: "buttons.secondary"
1142
- }, getColorsAndStatesByPath("buttons.lightSecondary")),
1143
- danger: __spreadValues$h({
1144
- variant: "buttons.primary",
1145
- "&:focus, &:focus-visible": {}
1146
- }, getColorsAndStatesByPath("buttons.danger")),
1147
- "danger-sm": __spreadValues$h({
1148
- variant: "buttons.danger"
1149
- }, smallButton),
1150
- warning: __spreadValues$h({
1151
- variant: "buttons.primary",
1152
- "&:focus, &:focus-visible": {}
1153
- }, getColorsAndStatesByPath("buttons.warning")),
1154
- "warning-sm": __spreadValues$h({
1155
- variant: "buttons.warning"
1156
- }, smallButton),
1157
- close: __spreadValues$h({
1158
- cursor: "pointer",
1159
- ml: "auto",
1160
- mr: "2",
1161
- borderRadius: "buttons"
1162
- }, getColorsAndStatesByPath("buttons.close")),
1163
- accordion: {
1164
- variant: "buttons.primary",
1165
- "&:focus, &:focus-visible": {},
1166
- cursor: "pointer",
1167
- m: spacing(0),
1168
- py: responsive$1({ 0: 3, 4: 4 }),
1169
- px: responsive$1({ 0: 5, 4: 6 }),
1170
- width: "100%",
1171
- display: "flex",
1172
- alignItems: "center",
1173
- justifyContent: "space-between",
1174
- borderRadius: "buttons",
1175
- textAlign: "left",
1176
- fontFamily: "heading",
1177
- fontSize: "text.default",
1178
- textDecoration: "none",
1179
- textTransform: "none",
1180
- fontWeight: "bold",
1181
- border: "none",
1182
- transition: "background-color 300ms ease-out, color 300ms ease-out",
1183
- userSelect: "text",
1184
- "&, *": getColorsAndStatesByPath("buttons.accordion")
1185
- },
1186
- "accordion-primary": __spreadValues$h({
1187
- variant: "buttons.accordion",
1188
- border: "none"
1189
- }, getColorsAndStatesByPath("buttons.accordionPrimary")),
1190
- icon: __spreadProps$9(__spreadValues$h({
1191
- display: "flex",
1192
- justifyContent: "center",
1193
- alignItems: "center",
1194
- p: spacing(0),
1195
- m: spacing(0),
1196
- bg: "secondary",
1197
- cursor: "pointer",
1198
- transition: "background-color 300ms ease-out, color 300ms ease-out",
1199
- borderRadius: "buttons",
1200
- border: "none"
1201
- }, getColorsAndStatesByPath("buttons.icon")), {
1202
- svg: {
1203
- width: "auto",
1204
- height: "20px",
1205
- display: "block"
1206
- },
1207
- "&.isToggled": __spreadValues$h({}, getColorsAndStatesByPath("buttons.iconToggled"))
1208
- }),
1209
- "icon-primary": __spreadValues$h({
1210
- variant: "buttons.icon"
1211
- }, getColorsAndStatesByPath("buttons.iconPrimary")),
1212
- "icon-outline": __spreadValues$h({
1213
- variant: "buttons.icon",
1214
- bg: "white",
1215
- border: "1px solid"
1216
- }, getColorsAndStatesByPath("buttons.iconOutline")),
1217
- "icon-outline-danger": __spreadValues$h({
1218
- variant: "buttons.icon",
1219
- bg: "white",
1220
- border: "1px solid"
1221
- }, getColorsAndStatesByPath("buttons.outlineDanger")),
1222
- "icon-only": __spreadValues$h({
1223
- variant: "buttons.icon"
1224
- }, getColorsAndStatesByPath("buttons.iconOnly")),
1225
- link: __spreadValues$h({
1226
- variant: "inherit",
1227
- width: "auto",
1228
- border: "none",
1229
- textDecoration: "underline",
1230
- px: 2,
1231
- py: 1,
1232
- borderRadius: "buttons",
1233
- cursor: "pointer",
1234
- textTransform: "none",
1235
- transition: "background-color 300ms ease-out, color 300ms ease-out"
1236
- }, getColorsAndStatesByPath("buttons.link")),
1237
- "link-sm": __spreadValues$h({
1238
- variant: "buttons.link"
1239
- }, smallButton),
1240
- outline: __spreadValues$h({
1241
- variant: "buttons.primary",
1242
- borderWidth: "2px",
1243
- borderStyle: "solid",
1244
- borderRadius: "buttons",
1245
- "&:focus, &:focus-visible": {}
1246
- }, getColorsAndStatesByPath("buttons.outline")),
1247
- "outline-sm": __spreadValues$h({
1248
- variant: "buttons.outline"
1249
- }, smallButton),
1250
- "transparent-sm": __spreadValues$h({
1251
- variant: "buttons.outline",
1252
- "&:focus, &:focus-visible": {},
1253
- bg: "transparent",
1254
- color: "inherit",
1255
- border: "none",
1256
- font: "inherit",
1257
- textTransform: "inherit"
1258
- }, smallButton),
1259
- "outline-danger": __spreadValues$h({
1260
- variant: "buttons.outline",
1261
- "&:focus, &:focus-visible": {}
1262
- }, getColorsAndStatesByPath("buttons.outlineDanger")),
1263
- "outline-danger-sm": __spreadValues$h({
1264
- variant: "buttons.outline-danger"
1265
- }, smallButton),
1266
- "outline-warning": __spreadValues$h({
1267
- variant: "buttons.outline",
1268
- "&:focus, &:focus-visible": {}
1269
- }, getColorsAndStatesByPath("buttons.outlineWarning")),
1270
- "outline-warning-sm": __spreadValues$h({
1271
- variant: "buttons.outline-warning"
1272
- }, smallButton),
1273
- "outline-extended": {
1274
- variant: "buttons.outline",
1275
- gridColumnStart: 1,
1276
- gridColumnEnd: 3,
1277
- width: "100%"
1278
- },
1279
- "outline-danger-extended": {
1280
- variant: "buttons.outline-danger",
1281
- gridColumnStart: 1,
1282
- gridColumnEnd: 3,
1283
- width: "100%"
1284
- },
1285
- "primary-extended": {
1286
- variant: "buttons.primary",
1287
- "&:focus, &:focus-visible": {},
1288
- gridColumnStart: 1,
1289
- gridColumnEnd: 3,
1290
- width: "100%"
1291
- },
1292
- query: {
1293
- extended: {
1294
- variant: "buttons.outline",
1295
- "&:focus, &:focus-visible": {},
1296
- gridColumnStart: 1,
1297
- gridColumnEnd: 3
1298
- }
1299
- },
1300
- tableAccordion: __spreadValues$h({
1301
- variant: "buttons.accordion",
1302
- fontSize: "text.default",
1303
- p: spacing(3),
1304
- wordBreak: "keep-all",
1305
- a: {
1306
- color: "background"
1307
- }
1308
- }, getColorsAndStatesByPath("buttons.tableAccordion")),
1309
- tableHeader: __spreadValues$h({
1310
- variant: "buttons.tableAccordion",
1311
- alignItems: "center",
1312
- justifyContent: "center",
1313
- height: "100%",
1314
- border: "none",
1315
- svg: {
1316
- ml: spacing(2)
1317
- }
1318
- }, getColorsAndStatesByPath("buttons.tableHeader"))
1319
- };
1320
-
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
1356
- }
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
- };
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",
1401
- display: "flex",
1402
- alignItems: "center",
1403
- justifyContent: "center",
1404
- top: 0,
1405
- left: 0,
1406
- right: 0,
1407
- bottom: 0,
1408
- fontSize: "larger",
1409
- fontWeight: "bolder",
1410
- borderRadius: "5px",
1411
- cursor: "pointer"
1412
- },
1413
- "&:indeterminate::before": {
1414
- content: '"-"',
1415
- color: "palette.text.primary",
1416
- position: "absolute",
1417
- display: "flex",
1418
- alignItems: "center",
1419
- justifyContent: "center",
1420
- top: "-1px",
1421
- left: 0,
1422
- right: 0,
1423
- bottom: 0,
1424
- fontSize: "xx-large",
1425
- fontWeight: "600",
1426
- borderRadius: "5px",
1427
- cursor: "pointer"
1428
- }
1429
- }
1430
- });
1431
-
1432
- var __defProp$e = Object.defineProperty;
1433
- var __defProps$7 = Object.defineProperties;
1434
- var __getOwnPropDescs$7 = Object.getOwnPropertyDescriptors;
1435
- var __getOwnPropSymbols$e = Object.getOwnPropertySymbols;
1436
- var __hasOwnProp$e = Object.prototype.hasOwnProperty;
1437
- var __propIsEnum$e = Object.prototype.propertyIsEnumerable;
1438
- var __defNormalProp$e = (obj, key, value) => key in obj ? __defProp$e(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1439
- var __spreadValues$e = (a, b) => {
1440
- for (var prop in b || (b = {}))
1441
- if (__hasOwnProp$e.call(b, prop))
1442
- __defNormalProp$e(a, prop, b[prop]);
1443
- if (__getOwnPropSymbols$e)
1444
- for (var prop of __getOwnPropSymbols$e(b)) {
1445
- if (__propIsEnum$e.call(b, prop))
1446
- __defNormalProp$e(a, prop, b[prop]);
1447
- }
1448
- return a;
1449
- };
1450
- var __spreadProps$7 = (a, b) => __defProps$7(a, __getOwnPropDescs$7(b));
1451
- const dateInput = __spreadProps$7(__spreadValues$e({
1452
- display: "flex",
1453
- flexDirection: "column",
1454
- alignItems: "stretch",
1455
- justifyContent: "stretch",
1456
- gap: spacing(2),
1457
- width: "100%",
1458
- "&.readOnly": {
1459
- input: {
1460
- color: "Text.fields",
1461
- bg: "Background.fields"
1462
- }
1463
- },
1464
- ".iconInput": {
1465
- width: "100%",
1466
- position: "relative"
1467
- },
1468
- 'input:hover~.delete_date_button:not(:disabled,[aria-selected="true"]), input:hover~.delete_date_button:not(:disabled,[aria-selected="true"]) path, .delete_date_button': __spreadValues$e({
1469
- position: "absolute",
1470
- right: "59px",
1471
- padding: 0,
1472
- top: "calc(50% - 10px)",
1473
- margin: 0,
1474
- marginRight: 0,
1475
- borderRadius: "100%",
1476
- width: "20px",
1477
- height: "20px"
1478
- }, getColorsAndStatesByPath("buttons.icon-outline")),
1479
- input: {
1480
- flexShrink: 1
1481
- },
1482
- "& > div": {
1483
- display: "flex",
1484
- gap: spacing(2),
1485
- flexShrink: 0,
1486
- width: "auto",
1487
- maxWidth: "100%",
1488
- minWidth: 0,
1489
- button: {
1490
- width: "45px",
1491
- flexShrink: 0
1492
- }
1493
- }
1494
- }, getColorsAndStatesByPath("form.fields", {
1495
- states: {
1496
- hover: false,
1497
- active: false,
1498
- focus: false
1499
- }
1500
- })), {
1501
- backgroundColor: void 0
1502
- });
1503
-
1504
- var __defProp$d = Object.defineProperty;
1505
- var __getOwnPropSymbols$d = Object.getOwnPropertySymbols;
1506
- var __hasOwnProp$d = Object.prototype.hasOwnProperty;
1507
- var __propIsEnum$d = Object.prototype.propertyIsEnumerable;
1508
- var __defNormalProp$d = (obj, key, value) => key in obj ? __defProp$d(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1509
- var __spreadValues$d = (a, b) => {
1510
- for (var prop in b || (b = {}))
1511
- if (__hasOwnProp$d.call(b, prop))
1512
- __defNormalProp$d(a, prop, b[prop]);
1513
- if (__getOwnPropSymbols$d)
1514
- for (var prop of __getOwnPropSymbols$d(b)) {
1515
- if (__propIsEnum$d.call(b, prop))
1516
- __defNormalProp$d(a, prop, b[prop]);
1517
- }
1518
- return a;
1519
- };
1520
- const iconInput = {
1521
- display: "flex",
1522
- gap: spacing(1),
1523
- justifyContent: "stretch",
1524
- alignItems: "center",
1525
- "&.readOnly": {
1526
- input: __spreadValues$d({}, getColorsByPath("form.fields"))
1527
- },
1528
- input: {
1529
- height: "50px",
1530
- width: "100%"
1531
- },
1532
- button: {
1533
- display: "flex",
1534
- width: "45px",
1535
- flexShrink: 0,
1536
- height: "50px"
1537
- }
1538
- };
1539
-
1540
- var __defProp$c = Object.defineProperty;
1541
- var __defProps$6 = Object.defineProperties;
1542
- var __getOwnPropDescs$6 = Object.getOwnPropertyDescriptors;
1543
- var __getOwnPropSymbols$c = Object.getOwnPropertySymbols;
1544
- var __hasOwnProp$c = Object.prototype.hasOwnProperty;
1545
- var __propIsEnum$c = Object.prototype.propertyIsEnumerable;
1546
- var __defNormalProp$c = (obj, key, value) => key in obj ? __defProp$c(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1547
- var __spreadValues$c = (a, b) => {
1548
- for (var prop in b || (b = {}))
1549
- if (__hasOwnProp$c.call(b, prop))
1550
- __defNormalProp$c(a, prop, b[prop]);
1551
- if (__getOwnPropSymbols$c)
1552
- for (var prop of __getOwnPropSymbols$c(b)) {
1553
- if (__propIsEnum$c.call(b, prop))
1554
- __defNormalProp$c(a, prop, b[prop]);
1555
- }
1556
- return a;
1557
- };
1558
- var __spreadProps$6 = (a, b) => __defProps$6(a, __getOwnPropDescs$6(b));
1559
- const input = __spreadProps$6(__spreadValues$c({
1560
- variant: "text.default",
1561
- border: "1px solid",
1562
- borderRadius: "default",
1563
- padding: responsive$1({ 0: 3, 3: 4 }),
1564
- "::placeholder": {
1565
- color: "#b0b0b0"
1566
- }
1567
- }, getColorsAndStatesByPath("form.fields", {
1568
- states: {
1569
- active: false,
1570
- hover: false,
1571
- focus: false
1572
- }
1573
- })), {
1574
- material: {
1575
- input: {
1576
- borderLeft: "none",
1577
- borderRight: "none",
1578
- borderTop: "none",
1579
- borderBottomColor: "palette.border.section",
1580
- "& + .input__underline": {
1581
- transform: "scale(1)"
1582
- },
1583
- "&:focus": {
1584
- outline: "none",
1585
- "~::after": {
1586
- animationName: "growHorizontal",
1587
- animationDuration: "150ms",
1588
- animationTimingFunction: "ease-out",
1589
- content: '""',
1590
- display: "block",
1591
- height: "0",
1592
- outlineColor: "palette.primary.main",
1593
- outlineStyle: "solid",
1594
- outlineWidth: "1.5px",
1595
- outlineOffset: 0,
1596
- position: "fixed",
1597
- transformOrigin: "center center",
1598
- width: "100%"
1599
- }
1600
- }
1601
- }
1602
- }
1603
- });
1604
-
1605
- const label = {
1606
- variant: "text.default",
1607
- alignItems: "center",
1608
- width: "auto",
1609
- textTransform: "none",
1610
- cursor: "pointer",
1611
- "&:not(.radio-label)": {
1612
- fontWeight: "bold"
1613
- },
1614
- "&.required": {
1615
- position: "relative",
1616
- "&::before": {
1617
- color: "danger",
1618
- position: "absolute",
1619
- content: '"*"',
1620
- top: 0,
1621
- left: "-10px"
1622
- }
1623
- },
1624
- "&:last-of-type": {
1625
- "input, textarea, select": {
1626
- mb: spacing(0)
1627
- }
1628
- }
1629
- };
1630
-
1631
- var __defProp$b = Object.defineProperty;
1632
- var __getOwnPropSymbols$b = Object.getOwnPropertySymbols;
1633
- var __hasOwnProp$b = Object.prototype.hasOwnProperty;
1634
- var __propIsEnum$b = Object.prototype.propertyIsEnumerable;
1635
- var __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$b(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1636
- var __spreadValues$b = (a, b) => {
1637
- for (var prop in b || (b = {}))
1638
- if (__hasOwnProp$b.call(b, prop))
1639
- __defNormalProp$b(a, prop, b[prop]);
1640
- if (__getOwnPropSymbols$b)
1641
- for (var prop of __getOwnPropSymbols$b(b)) {
1642
- if (__propIsEnum$b.call(b, prop))
1643
- __defNormalProp$b(a, prop, b[prop]);
1644
- }
1645
- return a;
1646
- };
1647
- const radio = __spreadValues$b({
1648
- width: "32px",
1649
- height: "32px",
1650
- input: {
1651
- height: "32px !important"
1652
- }
1653
- }, getColorsAndStatesByPath("form.radio"));
1654
-
1655
- var __defProp$a = Object.defineProperty;
1656
- var __getOwnPropSymbols$a = Object.getOwnPropertySymbols;
1657
- var __hasOwnProp$a = Object.prototype.hasOwnProperty;
1658
- var __propIsEnum$a = Object.prototype.propertyIsEnumerable;
1659
- var __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$a(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1660
- var __spreadValues$a = (a, b) => {
1661
- for (var prop in b || (b = {}))
1662
- if (__hasOwnProp$a.call(b, prop))
1663
- __defNormalProp$a(a, prop, b[prop]);
1664
- if (__getOwnPropSymbols$a)
1665
- for (var prop of __getOwnPropSymbols$a(b)) {
1666
- if (__propIsEnum$a.call(b, prop))
1667
- __defNormalProp$a(a, prop, b[prop]);
1668
- }
1669
- return a;
1670
- };
1671
- const select = __spreadValues$a({
1672
- variant: "text.default",
1673
- display: "inline-block",
1674
- fontFamily: "body",
1675
- p: spacing(4),
1676
- pr: 7,
1677
- borderRadius: "default",
1678
- width: "100%",
1679
- maxWidth: "100%"
1680
- }, getColorsAndStatesByPath("form.fields", {
1681
- states: {
1682
- active: false,
1683
- hover: false,
1684
- focus: false
1685
- }
1686
- }));
1687
-
1688
- var __defProp$9 = Object.defineProperty;
1689
- var __defProps$5 = Object.defineProperties;
1690
- var __getOwnPropDescs$5 = Object.getOwnPropertyDescriptors;
1691
- var __getOwnPropSymbols$9 = Object.getOwnPropertySymbols;
1692
- var __hasOwnProp$9 = Object.prototype.hasOwnProperty;
1693
- var __propIsEnum$9 = Object.prototype.propertyIsEnumerable;
1694
- var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1695
- var __spreadValues$9 = (a, b) => {
1696
- for (var prop in b || (b = {}))
1697
- if (__hasOwnProp$9.call(b, prop))
1698
- __defNormalProp$9(a, prop, b[prop]);
1699
- if (__getOwnPropSymbols$9)
1700
- for (var prop of __getOwnPropSymbols$9(b)) {
1701
- if (__propIsEnum$9.call(b, prop))
1702
- __defNormalProp$9(a, prop, b[prop]);
1703
- }
1704
- return a;
1705
- };
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,
1727
- "selected"
1728
- )
1729
- )
1730
- }
1731
- }),
1732
- "+ svg": {
1733
- display: "none"
1734
- }
1735
- }, getColorsAndStatesByPath("form.fields", {
1736
- states: {
1737
- active: false,
1738
- hover: false,
1739
- focus: false
1740
- }
1741
- }));
1742
-
1743
- const Switch = {
1744
- "+ span": {
1745
- fontSize: 14,
1746
- fontWeight: "normal",
1747
- wordBreak: "break-all"
1748
- },
1749
- backgroundColor: "form.fields.checked.borderColor"
1750
- };
1751
-
1752
- const textarea = {
1753
- "&, & textarea": {
1754
- height: "100%",
1755
- minHeight: "130px",
1756
- resize: "vertical"
1757
- },
1758
- textarea: {
1759
- variant: "forms.input"
1760
- }
1761
- };
1762
-
1763
- var __defProp$8 = Object.defineProperty;
1764
- var __defProps$4 = Object.defineProperties;
1765
- var __getOwnPropDescs$4 = Object.getOwnPropertyDescriptors;
1766
- var __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;
1767
- var __hasOwnProp$8 = Object.prototype.hasOwnProperty;
1768
- var __propIsEnum$8 = Object.prototype.propertyIsEnumerable;
1769
- var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1770
- var __spreadValues$8 = (a, b) => {
1771
- for (var prop in b || (b = {}))
1772
- if (__hasOwnProp$8.call(b, prop))
1773
- __defNormalProp$8(a, prop, b[prop]);
1774
- if (__getOwnPropSymbols$8)
1775
- for (var prop of __getOwnPropSymbols$8(b)) {
1776
- if (__propIsEnum$8.call(b, prop))
1777
- __defNormalProp$8(a, prop, b[prop]);
1778
- }
1779
- return a;
1780
- };
1781
- var __spreadProps$4 = (a, b) => __defProps$4(a, __getOwnPropDescs$4(b));
1782
- const deletableInput = {
1783
- border: "1px solid",
1784
- borderColor: "palette.border.field",
1785
- display: "inline-block",
1786
- position: "relative",
1787
- pr: "45px",
1788
- ".deletableInput__input": {
1789
- border: "none"
1790
- },
1791
- ".deletableInput__deleteButton": __spreadValues$8({
1792
- height: "100%",
1793
- outlineOffset: "-2px",
1794
- position: "absolute",
1795
- right: 0,
1796
- top: 0,
1797
- width: "45px"
1798
- }, getColorsAndStatesByPath("buttons.deletableInputButton")),
1799
- "&:focus-within:not(.asMaterial)": __spreadProps$4(__spreadValues$8({}, focusOutline), {
1800
- ".deletableInput__input:focus": {
1801
- outline: "none"
1802
- },
1803
- ".deletableInput__deleteButton:focus": {
1804
- outline: "none"
1805
- }
1806
- }),
1807
- "&.asMaterial": {
1808
- borderLeft: "none",
1809
- borderRight: "none",
1810
- borderTop: "none",
1811
- borderBottomColor: "palette.border.section",
1812
- "& + .input__underline": {
1813
- transform: "scale(1)"
1814
- },
1815
- ".deletableInput__input:focus": {
1816
- outline: "none",
1817
- "~.input__underline::after": {
1818
- animationName: "growHorizontal",
1819
- animationDuration: "150ms",
1820
- animationTimingFunction: "ease-out",
1821
- content: '""',
1822
- display: "block",
1823
- height: "0",
1824
- outlineColor: "palette.primary.main",
1825
- outlineStyle: "solid",
1826
- outlineWidth: "1.5px",
1827
- outlineOffset: 0,
1828
- position: "absolute",
1829
- transformOrigin: "center center",
1830
- left: 0,
1831
- right: 0
1832
- }
1833
- }
1834
- }
1835
- };
1836
-
1837
- const forms$1 = () => {
1838
- return {
1839
- checkbox,
1840
- customCheckbox,
1841
- dateInput,
1842
- deletableInput,
1843
- iconInput,
1844
- input,
1845
- label,
1846
- radio,
1847
- select,
1848
- selectMultiple,
1849
- switch: Switch,
1850
- textarea,
1851
- /* PREPEND HERE */
1852
- 'input[type="date"]': {
1853
- variant: "forms.input"
1854
- }
1855
- };
1856
- };
1857
-
1858
- const overlay = {
1859
- overlay: {
1860
- position: "fixed",
1861
- overflow: "hidden",
1862
- top: "0",
1863
- right: "0",
1864
- bottom: "0",
1865
- left: "0",
1866
- width: "100vw",
1867
- height: "100vh",
1868
- display: "flex",
1869
- justifyContent: "center",
1870
- padding: "1.5em 1.5em",
1871
- alignItems: "center",
1872
- backgroundColor: `palette.background.overlay`,
1873
- zIndex: "modal",
1874
- "&:not(.screenLock) .modal-enter-done": {
1875
- boxShadow: "modals"
1876
- }
1877
- }
1878
- };
1879
-
1880
- const apiaApi = {
1881
- margin: "auto",
1882
- display: "flex",
1883
- flexDirection: "column",
1884
- wordBreak: "break-word",
1885
- overflow: "hidden",
1886
- width: "100%",
1887
- ".handler__form": {
1888
- display: "flex",
1889
- flexDirection: "column",
1890
- overflow: "hidden",
1891
- gap: spacing(6),
1892
- ".toggleAccordionElement": {
1893
- position: "sticky",
1894
- top: 0
1895
- },
1896
- ".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)
1904
- },
1905
- ".handler__form__elements__section__content": {
1906
- display: "flex",
1907
- flexDirection: "column",
1908
- wordBreak: "break-word",
1909
- background: "palette.background.paper",
1910
- p: 0,
1911
- gap: spacing(3)
1912
- },
1913
- ".content .handler__form__elements__section__content": {
1914
- border: "1px solid",
1915
- borderColor: "palette.border.section",
1916
- borderTop: "none",
1917
- p: spacing(6)
1918
- },
1919
- ".handler__form__buttons": {
1920
- display: "flex",
1921
- flexDirection: "row",
1922
- justifyContent: "center",
1923
- p: 0,
1924
- gap: "0px",
1925
- textAlign: "center"
1926
- },
1927
- ".radio": {
1928
- display: "flex",
1929
- flexDirection: "column",
1930
- flexWrap: "wrap",
1931
- listStyle: "none",
1932
- variant: "layout.execution.form.fields.radio"
1933
- },
1934
- ".handler__checkbox, .handler__radio": {
1935
- "label span": {
1936
- fontWeight: "normal"
1937
- }
1938
- },
1939
- ".checkbox": {
1940
- flexDirection: "row-reverse",
1941
- alignItems: "center",
1942
- justifyContent: "start",
1943
- gap: spacing(4),
1944
- ".semicolon": {
1945
- display: "none"
1946
- },
1947
- input: {
1948
- width: "100%"
1949
- }
1950
- },
1951
- ".handler__hidden": {
1952
- display: "none"
1953
- },
1954
- "label.select > div": {
1955
- width: "100%"
1956
- },
1957
- ".spacer": {
1958
- height: spacing(7)
1959
- }
1960
- },
1961
- ".progressBox": {
1962
- p: spacing(5),
1963
- pt: spacing(0)
1964
- }
1965
- /* PREPEND HERE */
1966
- };
1967
-
1968
- var __defProp$7 = Object.defineProperty;
1969
- var __defProps$3 = Object.defineProperties;
1970
- var __getOwnPropDescs$3 = Object.getOwnPropertyDescriptors;
1971
- var __getOwnPropSymbols$7 = Object.getOwnPropertySymbols;
1972
- var __hasOwnProp$7 = Object.prototype.hasOwnProperty;
1973
- var __propIsEnum$7 = Object.prototype.propertyIsEnumerable;
1974
- var __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$7(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1975
- var __spreadValues$7 = (a, b) => {
1976
- for (var prop in b || (b = {}))
1977
- if (__hasOwnProp$7.call(b, prop))
1978
- __defNormalProp$7(a, prop, b[prop]);
1979
- if (__getOwnPropSymbols$7)
1980
- for (var prop of __getOwnPropSymbols$7(b)) {
1981
- if (__propIsEnum$7.call(b, prop))
1982
- __defNormalProp$7(a, prop, b[prop]);
1983
- }
1984
- return a;
1985
- };
1986
- var __spreadProps$3 = (a, b) => __defProps$3(a, __getOwnPropDescs$3(b));
1987
- const modals = __spreadProps$3(__spreadValues$7({
1988
- apiaApi
1989
- }, overlay), {
1990
- main: __spreadValues$7({
1991
- zIndex: "modal",
1992
- display: "flex",
1993
- flexDirection: "column",
1994
- p: spacing(6),
1995
- alignItems: "center",
1996
- justifyItems: "center",
1997
- maxHeight: "100vh",
1998
- maxWidth: "calc(100vw - 10px)",
1999
- resize: "both",
2000
- overflow: "auto",
2001
- border: "1px solid",
2002
- gap: spacing(5),
2003
- "&>div": {
2004
- overflow: "hidden",
2005
- flexGrow: 0,
2006
- flexShrink: 0,
2007
- p: "3px",
2008
- width: "100%"
2009
- },
2010
- "&>div.modal__header": {
2011
- alignItems: responsive$1({ 0: "end", 4: "center" }),
2012
- flexShrink: 0,
2013
- overflow: "visible",
2014
- ".modal__headerBar": {
2015
- display: "flex",
2016
- flexDirection: "row",
2017
- gap: spacing(3)
2018
- }
2019
- },
2020
- "&>div.modal__content, &>div.modal__content>form": {
2021
- overflow: "auto",
2022
- width: "100%",
2023
- flexBasis: "100%",
2024
- flexShrink: 1,
2025
- display: "flex",
2026
- justifyContent: "stretch",
2027
- alignItems: "stretch"
2028
- }
2029
- }, getColorsByPath("modal")),
2030
- finder: {
2031
- variant: "layout.common.modals.main",
2032
- height: responsive$1({ 0: "100vh", 3: "80vh" }),
2033
- width: responsive$1({ 0: "95vw", 3: "80vw", 4: "70vw" }),
2034
- ".modal__content": {
2035
- p: spacing(2),
2036
- overflow: "hidden",
2037
- ".confirm__content": {
2038
- overflow: "hidden",
2039
- ".finder__content": {
2040
- display: "flex",
2041
- alignItems: "stretch"
2042
- },
2043
- ".selection__keyHandler": {
2044
- overflow: "hidden",
2045
- height: "100%",
2046
- ".responsiveTable__wrapper": {
2047
- height: "100%",
2048
- border: "1px solid",
2049
- borderColor: "palette.border.article",
2050
- backgroundColor: "palette.gray.900"
2051
- }
2052
- }
2053
- }
2054
- }
2055
- },
2056
- sm: {
2057
- variant: "layout.common.modals.main",
2058
- maxWidth: "min(350px, calc(100vw - 10px))"
2059
- },
2060
- md: {
2061
- variant: "layout.common.modals.main",
2062
- maxWidth: "min(500px, calc(100vw - 10px))"
2063
- },
2064
- "md-fixed": {
2065
- variant: "layout.common.modals.main",
2066
- width: "min(500px, calc(100vw - 10px))"
2067
- },
2068
- lg: {
2069
- variant: "layout.common.modals.main",
2070
- maxWidth: "min(640px, calc(100vw - 10px))"
2071
- },
2072
- "lg-fixed": {
2073
- variant: "layout.common.modals.main",
2074
- maxWidth: "640px",
2075
- height: "60vh"
2076
- },
2077
- xl: {
2078
- variant: "layout.common.modals.main",
2079
- maxWidth: "min(730px, calc(100vw - 10px))"
2080
- },
2081
- "xl-fixed": {
2082
- variant: "layout.common.modals.main",
2083
- width: responsive$1({ 0: "95vw", 2: "60vw" }),
2084
- height: responsive$1({ 0: "95vh", 2: "80vh" })
2085
- },
2086
- xxl: {
2087
- variant: "layout.common.modals.main",
2088
- width: responsive$1({ 0: "95vw", 2: "80vw" }),
2089
- maxHeight: responsive$1({ 0: "95vh", 2: "80vh" })
2090
- },
2091
- xxxl: {
2092
- variant: "layout.common.modals.main",
2093
- width: responsive$1({ 0: "95vw", 2: "95vw" }),
2094
- maxHeight: responsive$1({ 0: "95vh", 2: "95vh" })
2095
- },
2096
- "xxxl-fixed": {
2097
- variant: "layout.common.modals.main",
2098
- width: responsive$1({ 0: "95vw", 2: "95vw" }),
2099
- height: responsive$1({ 0: "95vh", 2: "95vh" })
2100
- },
2101
- flex: {
2102
- variant: "layout.common.modals.main",
2103
- maxWidth: "95vw",
2104
- maxHeight: "95vh",
2105
- ".modal__content": {
2106
- p: spacing(2),
2107
- overflow: "auto"
2108
- }
2109
- },
2110
- cal: {
2111
- 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
- }
2119
- },
2120
- editGrid: {
2121
- variant: "layout.common.modals.main",
2122
- width: "root",
2123
- maxHeight: "90vh"
2124
- }
2125
- /* PREPEND HERE */
2126
- });
2127
-
2128
- var __defProp$6 = Object.defineProperty;
2129
- var __defProps$2 = Object.defineProperties;
2130
- var __getOwnPropDescs$2 = Object.getOwnPropertyDescriptors;
2131
- var __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;
2132
- var __hasOwnProp$6 = Object.prototype.hasOwnProperty;
2133
- var __propIsEnum$6 = Object.prototype.propertyIsEnumerable;
2134
- var __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2135
- var __spreadValues$6 = (a, b) => {
2136
- for (var prop in b || (b = {}))
2137
- if (__hasOwnProp$6.call(b, prop))
2138
- __defNormalProp$6(a, prop, b[prop]);
2139
- if (__getOwnPropSymbols$6)
2140
- for (var prop of __getOwnPropSymbols$6(b)) {
2141
- if (__propIsEnum$6.call(b, prop))
2142
- __defNormalProp$6(a, prop, b[prop]);
2143
- }
2144
- return a;
2145
- };
2146
- var __spreadProps$2 = (a, b) => __defProps$2(a, __getOwnPropDescs$2(b));
2147
- function getSelectionStyles() {
2148
- return {
2149
- 'td[data-focused="false"], th[data-focused="false"]': {
2150
- "*:focus-visible, &:focus, &:focus-visible": {
2151
- outline: "none"
2152
- },
2153
- "*:focus": __spreadValues$6({}, focusOutline$1)
2154
- },
2155
- '[data-focused="true"]:not(.row__separator__cell)': {
2156
- '&:not([data-editionmode="true"])': {
2157
- "&:focus, & > *:focus, *:focus-visible": __spreadProps$2(__spreadValues$6({}, focusOutline$1), {
2158
- "&.cell__download__document": {
2159
- outlineOffset: 0
2160
- }
2161
- })
2162
- },
2163
- '&[data-editionmode="true"]': {
2164
- "&:focus, *:focus, *:focus-visible": __spreadProps$2(__spreadValues$6({}, focusOutline$1), {
2165
- outlineStyle: "dotted",
2166
- outlineWidth: "6px",
2167
- outlineOffset: "-4px"
2168
- })
2169
- }
2170
- },
2171
- '[data-focused="true"].row__separator__cell': {
2172
- backgroundColor: "palette.secondary.main",
2173
- outline: "none"
2174
- }
2175
- };
2176
- }
2177
-
2178
- var __defProp$5 = Object.defineProperty;
2179
- var __defProps$1 = Object.defineProperties;
2180
- var __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors;
2181
- var __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;
2182
- var __hasOwnProp$5 = Object.prototype.hasOwnProperty;
2183
- var __propIsEnum$5 = Object.prototype.propertyIsEnumerable;
2184
- var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2185
- var __spreadValues$5 = (a, b) => {
2186
- for (var prop in b || (b = {}))
2187
- if (__hasOwnProp$5.call(b, prop))
2188
- __defNormalProp$5(a, prop, b[prop]);
2189
- if (__getOwnPropSymbols$5)
2190
- for (var prop of __getOwnPropSymbols$5(b)) {
2191
- if (__propIsEnum$5.call(b, prop))
2192
- __defNormalProp$5(a, prop, b[prop]);
2193
- }
2194
- return a;
2195
- };
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": {
2259
- color: "palette.primary.contrastText",
2260
- svg: {
2261
- color: "palette.text.primary"
2262
- }
2263
- },
2264
- "&:not(:last-of-type)": {
2265
- "&>div": {
2266
- borderRightWidth: "1px"
2267
- }
2268
- }
2269
- },
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"
2287
- },
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
- "& *": {
2300
- height: "0",
2301
- overflow: "hidden",
2302
- fontSize: 0,
2303
- lineHeight: 0,
2304
- p: spacing(0),
2305
- border: "none"
2306
- }
2307
- }
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"
2330
- }
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"
2341
- }
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"
2352
- },
2353
- ".moreInformationButton": {
2354
- width: "30px",
2355
- height: "30px",
2356
- padding: "3px",
2357
- border: "none",
2358
- background: "transparent"
2359
- }
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
- }),
2371
- columnGap: 3,
2372
- rowGap: 2
2373
- },
2374
- ".responsiveTable__additionalInfoContainer .responsiveTable__additionalInfoItem.separator": {
2375
- gridColumnStart: "1",
2376
- gridColumnEnd: "5",
2377
- borderBottom: "1px solid",
2378
- borderBottomColor: "palette.gray.700",
2379
- height: "auto"
2380
- }
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
- });
2443
-
2444
- const information = {
2445
- width: "100%",
2446
- border: "1px solid",
2447
- borderColor: "primary",
2448
- borderCollapse: "collapse",
2449
- thead: {
2450
- tr: {
2451
- th: {
2452
- bg: "primary",
2453
- color: "white",
2454
- textAlign: "center",
2455
- fontWeight: "bold",
2456
- p: spacing(4)
2457
- }
2458
- }
2459
- },
2460
- tbody: {
2461
- tr: {
2462
- "td,th": {
2463
- borderColor: "muted",
2464
- p: spacing(4)
2465
- },
2466
- "&:not(tr:last-of-type)": {
2467
- "td,th": {
2468
- borderBottom: "1px solid"
2469
- }
2470
- },
2471
- "td:not(td:last-child),th:not(th:last-child)": {
2472
- borderRight: "1px solid"
2473
- },
2474
- th: {
2475
- textAlign: "left",
2476
- whiteSpace: "nowrap",
2477
- minWidth: "min-content",
2478
- width: 0
2479
- }
2480
- }
2481
- }
2482
- };
2483
-
2484
- const accordion = {
2485
- display: "flex",
2486
- flexDirection: "column",
2487
- gap: spacing(2),
2488
- ".responsiveTable__accordionElement__toggler": {
2489
- variant: "buttons.outline",
2490
- borderWidth: "1px",
2491
- display: "flex",
2492
- gap: spacing(3),
2493
- alignItems: "stretch",
2494
- width: "100%",
2495
- px: 4,
2496
- py: 3,
2497
- "&:hover h3": {
2498
- color: "palette.primary.contrastText"
2499
- },
2500
- ".accordionElement__toggler__checkbox": {
2501
- flexShrink: 0,
2502
- m: spacing(2)
2503
- },
2504
- ".accordionElement__toggler__button": {
2505
- flexGrow: 100,
2506
- display: "flex",
2507
- justifyContent: "space-between",
2508
- py: 2,
2509
- pr: spacing(2),
2510
- alignItems: "center",
2511
- ".accordionElement__toggler__label": {
2512
- flexGrow: 100,
2513
- m: spacing(0),
2514
- textAlign: "left",
2515
- fontSize: 16
2516
- },
2517
- ".accordionElement__toggler__expandIcon": {
2518
- flexShrink: 0,
2519
- svg: {
2520
- width: "32px"
2521
- }
2522
- }
2523
- }
2524
- },
2525
- ".responsiveTable__accordionElement__content": {
2526
- "& > div": {
2527
- backgroundColor: "palette.background.paper",
2528
- transition: "padding-bottom 300ms, padding-top 300ms",
2529
- px: 5
2530
- },
2531
- "&.rah-static--height-zero": {
2532
- "& > div": { py: 0 }
2533
- },
2534
- "&.rah-static--height-auto, &.rah-animating--down": {
2535
- "& > div": { py: 5 }
2536
- },
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
- ".priority_container": { display: "flex", alignItems: "center" },
2570
- ".priority": { display: "flex" }
2571
- }
2572
- };
2573
-
2574
- const print = {
2575
- border: "2px solid",
2576
- borderColor: "printView.list.table.borderColor",
2577
- "td, th": {
2578
- p: 3,
2579
- textAlign: "left"
2580
- }
2581
- };
2582
-
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"
2612
- },
2613
- svg: {
2614
- flexShrink: 0
2615
- }
2616
- }
2617
- /* PREPEND HERE */
2618
- };
2619
-
2620
- const tables = {
2621
- accordion,
2622
- information,
2623
- primary: primary$1,
2624
- print,
2625
- responsive
2626
- /* PREPEND HERE */
2627
- };
2628
-
2629
- const captcha = {
2630
- display: "flex",
2631
- flexDirection: "column",
2632
- gap: spacing(2),
2633
- ".captcha__imageContainer": {
2634
- border: "1px solid",
2635
- borderColor: "palette.border.field",
2636
- p: spacing(4)
2637
- },
2638
- ".captcha__inputContainer": {
2639
- display: "flex",
2640
- gap: spacing(2),
2641
- justifyContent: "stretch",
2642
- input: {
2643
- flexGrow: 1,
2644
- width: "100%"
2645
- },
2646
- ".captcha__buttons": {
2647
- width: "24px",
2648
- flexDirection: "column",
2649
- display: "flex",
2650
- gap: spacing(2),
2651
- flexShrink: 0,
2652
- button: {
2653
- width: "24px",
2654
- height: "24px",
2655
- p: "5px",
2656
- variant: "buttons.icon-outline",
2657
- svg: {
2658
- color: "palette.text.primary",
2659
- height: "16px",
2660
- width: "16px"
2661
- }
2662
- }
2663
- }
2664
- }
2665
- };
2666
-
2667
- const forms = {
2668
- captcha
2669
- /* PREPEND HERE */
2670
- };
2671
-
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) => {
2678
- 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]);
2685
- }
2686
- return a;
2687
- };
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"
2719
- },
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"
2740
- },
2741
- '&[aria-selected="true"] > .tree__nodeItemLabel': getColorState(
2742
- { backgroundColor: "palette.background.paper" },
2743
- "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"
2755
- },
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
- }
2767
- };
2768
-
2769
- const trees = {
2770
- primary
2771
- };
2772
-
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) => {
2915
- 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]);
2922
- }
2923
- return a;
2924
- };
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 })
2952
- },
2953
- h6: {
2954
- fontSize: responsive$1({ 0: 17, 3: 17 })
2955
- },
2956
- "h1,h2,h3,h4,h5,h6": {
2957
- letterSpacing: "heading",
2958
- lineHeight: "heading",
2959
- variant: "text.title"
2960
- },
2961
- "*:not(h1, h2, h3, h4, h5, h6, code)": {
2962
- fontFamily: "body",
2963
- fontSize: 16,
2964
- fontWeight: "body",
2965
- letterSpacing: "body",
2966
- lineHeight: "body"
2967
- },
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%"
2977
- }
2978
- },
2979
- ".top": {
2980
- display: "flex"
2981
- },
2982
- ".bottom": {
2983
- display: "block",
2984
- width: "100%"
2985
- },
2986
- ".planelContainer": {
2987
- overflowAnchor: "none"
2988
- },
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
3007
- }
3008
- },
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);
3018
-
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"
3035
- }
3036
- };
3037
-
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
3100
- };
3101
-
3102
- const makeTheme = (t) => {
3103
- return t;
3104
- };
3105
- let declaredStyles = {};
3106
- new class MainThemeEmitter extends EventEmitter {
3107
- }();
3108
- function getMainTheme(customTheme) {
3109
- return makeTheme(
3110
- merge(baseTheme, { layout: declaredStyles }, customTheme != null ? customTheme : {})
3111
- );
3112
- }
3113
-
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) => {
3120
- 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]);
3127
- }
3128
- return a;
3129
- };
3130
- const injectedStyles = {};
3131
- const mainThemeEmitter = new class MainThemeEmitter extends EventEmitter {
3132
- }();
3133
- function handleNewStyles(ev) {
3134
- injectedStyles[ev.path] = ev.styles;
3135
- }
3136
- mainThemeEmitter.on("newStyles", handleNewStyles);
3137
- function useMainTheme(customTheme) {
3138
- const [theme, setTheme] = useState(getMainTheme(customTheme));
3139
- useMount(() => {
3140
- setTheme((current) => {
3141
- mainThemeEmitter.off("newStyles", handleNewStyles);
3142
- let initialTheme = __spreadValues$2({}, current);
3143
- Object.entries(injectedStyles).forEach(([path, styles]) => {
3144
- const newStyles = setValueByPath({}, path, styles);
3145
- initialTheme = merge(initialTheme, newStyles);
3146
- });
3147
- return initialTheme;
3148
- });
3149
- return mainThemeEmitter.on("newStyles", (ev) => {
3150
- const newStyles = setValueByPath({}, ev.path, ev.styles);
3151
- setTheme((current) => merge(__spreadValues$2({}, current), newStyles));
3152
- });
3153
- });
3154
- return theme;
3155
- }
3156
-
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
- const CustomThemeProvider = ({
3219
- children,
3220
- customTheme
3221
- }) => {
3222
- const theme = getMainTheme(customTheme);
3223
- return /* @__PURE__ */ jsx(ThemeProvider$1, { theme, children });
3224
- };
3225
-
3226
- var __defProp = Object.defineProperty;
3227
- var __defProps = Object.defineProperties;
3228
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
3229
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
3230
- var __hasOwnProp = Object.prototype.hasOwnProperty;
3231
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
3232
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3233
- var __spreadValues = (a, b) => {
3234
- for (var prop in b || (b = {}))
3235
- if (__hasOwnProp.call(b, prop))
3236
- __defNormalProp(a, prop, b[prop]);
3237
- if (__getOwnPropSymbols)
3238
- for (var prop of __getOwnPropSymbols(b)) {
3239
- if (__propIsEnum.call(b, prop))
3240
- __defNormalProp(a, prop, b[prop]);
3241
- }
3242
- return a;
3243
- };
3244
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
3245
- function makeStyledComponent(displayName, stylesPath, styles, Component, unwraped = false) {
3246
- const theme = setValueByPath({}, stylesPath, styles);
3247
- return Object.assign(
3248
- (props) => {
3249
- const avoidFirstRender = useRef(0);
3250
- if (unwraped) {
3251
- return /* @__PURE__ */ jsx(CustomThemeProvider, { customTheme: theme, children: /* @__PURE__ */ jsx(NoThemePrevent, { avoidFirstRender, children: /* @__PURE__ */ jsx(Suspense, { children: /* @__PURE__ */ jsx(Component, __spreadValues({}, props)) }) }) });
3252
- }
3253
- return /* @__PURE__ */ jsx(CustomThemeProvider, { customTheme: theme, children: /* @__PURE__ */ jsx(NoThemePrevent, { avoidFirstRender, children: /* @__PURE__ */ jsx(Box, __spreadProps(__spreadValues({ className: "variant__holder" }, getVariant(stylesPath)), { children: /* @__PURE__ */ jsx(Suspense, { children: /* @__PURE__ */ jsx(Component, __spreadValues({}, props)) }) })) }) });
3254
- },
3255
- { displayName }
3256
- );
3257
- }
3258
- const NoThemePrevent = ({
3259
- avoidFirstRender,
3260
- children
3261
- }) => {
3262
- avoidFirstRender.current++;
3263
- if (avoidFirstRender.current <= 1)
3264
- return null;
3265
- return /* @__PURE__ */ jsx(Fragment, { children });
3266
- };
3267
-
3268
- function injectStyles(par1, par2) {
3269
- const path = typeof par1 === "string" ? par1 : "";
3270
- const styles = typeof par1 === "string" ? par2 : par1;
3271
- mainThemeEmitter.emit("newStyles", { path, styles });
3272
- }
3273
-
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
1
+ import{jsx as x,Fragment as So}from"react/jsx-runtime";import{ThemeProvider as U,Box as J}from"theme-ui";import{useRef as Po,Suspense as K,useState as To,createContext as Io}from"react";import{cloneDeep as z,merge as O}from"lodash";import{getValueByPath as Ro,setValueByPath as M,EventEmitter as Q,useMount as Bo}from"@apia/util";import f from"tinycolor2";import{focusOutline as L}from"@apia/theme";function c(o){var e;const r=[];for(let i=0;i<=6;i++)r[i+1]=(e=o[i])!=null?e:null;if(o.print)r[0]=o.print;else for(let i=5;i>=0;i--)o[i]!==void 0&&(r[0]=o[i]);return r}function t(o){var e;return(e=Z.spacing(o))!=null?e:o}const C={py:2,px:4,fontSize:"0.9em"},j={outlineColor:"outlineColor",outlineWidth:"3px",outlineStyle:"solid",outlineOffset:"-3px"};function H(o){return{variant:o,"data-variant":o}}const D={dark:"#cce5ff",light:"#557"},Wo=Array(50).fill(1).map((o,e)=>c({0:Math.ceil(e/2.5),1:Math.ceil(e/2.1),2:Math.ceil(e/1.7),3:Math.ceil(e/1.3),4:e})),Z={action:{disabled:"#d9d9d9",disabledOpacity:1,active:D,activeOpacity:.45,focus:D,focusOpacity:.05,hover:D,hoverOpacity:.1,readonly:D,readonlyOpacity:.4,selected:"rgb(204 214 222)",selectedOpacity:1},background:{default:"#f4f4f4",overlay:"rgba(0, 0, 0, 0.2)",paper:"white"},border:{article:"#cacaca",field:"#444",section:"#aaa"},common:{black:"black",white:"white"},info:{main:"#fff"},primary:{main:"#00496c"},secondary:{main:"#6c757d"},spacing:o=>Wo[o],text:{accent:"#609",disabled:"#555",icon:"white",link:"#00496c",primary:"#4a4a4a",secondary:"white",title:"#00496c"},error:{main:"#db7678",light:"#fff2f4"},success:{main:"#8bde8b",light:"#e7ffd9"},warning:{main:"#f8f588",light:"#fffdd9"},darkenRatio:15,lightenRatio:35,responsive:c,queryColumnsMultiplier:2};var Do=Object.defineProperty,ee=Object.getOwnPropertySymbols,Eo=Object.prototype.hasOwnProperty,Ao=Object.prototype.propertyIsEnumerable,oe=(o,e,r)=>e in o?Do(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r,re=(o,e)=>{for(var r in e||(e={}))Eo.call(e,r)&&oe(o,r,e[r]);if(ee)for(var r of ee(e))Ao.call(e,r)&&oe(o,r,e[r]);return o};function I(o){return re(re({},o),o.borderColor?{borderLeftColor:o.borderColor,borderRightColor:o.borderColor,borderBottomColor:o.borderColor,borderTopColor:o.borderColor}:void 0)}var Fo=Object.defineProperty,te=Object.getOwnPropertySymbols,zo=Object.prototype.hasOwnProperty,Mo=Object.prototype.propertyIsEnumerable,ae=(o,e,r)=>e in o?Fo(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r,ne=(o,e)=>{for(var r in e||(e={}))zo.call(e,r)&&ae(o,r,e[r]);if(te)for(var r of te(e))Mo.call(e,r)&&ae(o,r,e[r]);return o};const p=(o,e)=>{var r,i,u,l;if(e==="default")return I(o);const b=R(),y=b.action[`${e}Opacity`],w=e==="checked"?"selected":e;o=Object.fromEntries(Object.entries(o).map(([v,s])=>(["backgroundColor","borderColor","borderLeftColor","borderRightColor","borderBottomColor","borderTopColor","color"].includes(v)&&(s??"").startsWith("palette")&&(s=Ro(b,s.slice(8))),[v,s])));const a=f.mix((r=o.backgroundColor)!=null?r:"",f((i=o.backgroundColor)!=null?i:"").isLight()?b.action[w].light:b.action[w].dark,100*y).toRgbString();return I(ne(ne({},o.backgroundColor?{backgroundColor:e==="checked"?(u=o.backgroundColor)!=null?u:"":a,color:e==="checked"?f.mix(f((l=o.color)!=null?l:"black"),f(b.action.selected.dark),100*b.action.selectedOpacity).toRgbString():window.currentPalette.getContrastText(a)}:null),o.borderColor?{borderColor:f.mix(o.borderColor,f(o.borderColor).isLight()?b.action[w].light:b.action[w].dark,100*y).toRgbString()}:null))},E=(o,e)=>{const r=e?.default!==!1?z(o):{};return e?.active!==!1&&(r.active=p(o,"active")),e?.disabled!==!1&&(r.disabled=p(o,"disabled")),e?.focus!==!1&&(r.focus=p(o,"focus")),e?.hover!==!1&&(r.hover=p(o,"hover")),e?.readonly!==!1&&(r.readonly=p(o,"readonly")),e?.selected!==!1&&(r.selected=p(o,"selected")),e?.checked!==!1&&(r.checked=p(o,"checked")),r};function ie(o,e){o.forEach(r=>{Object.entries(r).forEach(([i,u])=>{if(typeof u=="string")return;const l=u;if(typeof l!="string"&&!l.preventParse){l.active||(l.active={}),l.checked||(l.checked={}),l.focus||(l.focus={}),l.disabled||(l.disabled={}),l.hover||(l.hover={}),l.selected||(l.selected={});const b=E(l,e);r[i]=O(b,l)}})})}function Lo(o){return!!o&&typeof o=="object"&&"main"in o}function Ho(o,e){return f(o).lighten(e??20).toRgbString()}function Xo(o,e){return f(o).darken(e??20).toRgbString()}function qo(o){const e=f(o);return f.readability("white",e)<f.readability("black",e)?"black":"white"}const m=(o,e)=>{switch(e){case"active":return{"&:active":o,"input[role]:active ~ &":o,"input[role]:active ~ & path":o};case"checked":return{"&:checked":o,"input[role]:checked ~ &":o,"input[role]:checked ~ & path":o};case"disabled":return{"&:disabled":o,"input[role]:disabled ~ &":o,"input[role]:disabled ~ & path":o};case"focus":{const r=O({},j,o);return{"&:focus":r,"input[role]:focus ~ &":r}}case"hover":return{'&:hover:not([readonly], :disabled,[aria-selected="true"],:active)':o,'input[role]:hover:not([readonly], :active, :disabled) ~ &:not(:disabled,[aria-selected="true"])':o,'input[role]:hover:not([readonly], :active, :disabled) ~ &:not(:disabled,[aria-selected="true"]) path':o};case"readonly":return{"&[readonly]":o,"input[role][readonly] ~ &":o,"input[role][readonly] ~ & path":o,"&.readonly input ~ &, &.readOnly input ~ &":o,"&.readonly input ~ & path, &.readOnly input ~ & path":o,"&.readonly, &.readOnly":o};case"selected":return{"&:selected":o,"input[role]:selected ~ &":o,"input[role]:selected ~ & path":o,'&[aria-selected="true"]':o};default:return o}};function h(o,e){return O(I({color:`${o}.color`,backgroundColor:`${o}.backgroundColor`,borderColor:`${o}.borderColor`}),e?.mergeObject)}var Go=Object.defineProperty,le=Object.getOwnPropertySymbols,No=Object.prototype.hasOwnProperty,Vo=Object.prototype.propertyIsEnumerable,ce=(o,e,r)=>e in o?Go(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r,$=(o,e)=>{for(var r in e||(e={}))No.call(e,r)&&ce(o,r,e[r]);if(le)for(var r of le(e))Vo.call(e,r)&&ce(o,r,e[r]);return o};function n(o,e){var r,i,u,l,b,y,w,a;const v=h(`${o}.active`,e),s=h(`${o}.checked`,e),g=$({cursor:"not-allowed"},h(`${o}.disabled`,e)),_=h(`${o}.hover`,e),P=((r=e?.states)==null?void 0:r.focus)!==!1?h(`${o}.focus`,e):{},T=$({cursor:"notAllowed"},h(`${o}.readonly`,e)),k=h(`${o}.selected`,e);return O($($($($($($($($({},((i=e?.states)==null?void 0:i.default)!==!1?h(o,e):null),((u=e?.states)==null?void 0:u.checked)!==!1?m(s,"checked"):null),m(P,"focus")),((l=e?.states)==null?void 0:l.hover)!==!1?m(_,"hover"):null),((b=e?.states)==null?void 0:b.selected)!==!1?m(k,"selected"):null),((y=e?.states)==null?void 0:y.active)!==!1?m(v,"active"):null),((w=e?.states)==null?void 0:w.disabled)!==!1?m(g,"disabled"):null),((a=e?.states)==null?void 0:a.readonly)!==!1?m(T,"readonly"):null),e?.mergeObject)}var Yo=Object.defineProperty,de=Object.getOwnPropertySymbols,Uo=Object.prototype.hasOwnProperty,Jo=Object.prototype.propertyIsEnumerable,se=(o,e,r)=>e in o?Yo(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r,S=(o,e)=>{for(var r in e||(e={}))Uo.call(e,r)&&se(o,r,e[r]);if(de)for(var r of de(e))Jo.call(e,r)&&se(o,r,e[r]);return o};const pe=(o,e)=>S(S(S(S(S(S(S(S({},e?.default!==!1?o:null),e?.checked!==!1?m(p(o,"checked"),"checked"):null),m(p(o,"focus"),"focus")),e?.selected!==!1?m(p(o,"selected"),"selected"):null),e?.hover!==!1?m(p(o,"hover"),"hover"):null),e?.active!==!1?m(p(o,"active"),"active"):null),e?.disabled!==!1?m(p(o,"disabled"),"disabled"):null),e?.readonly!==!1?m(p(o,"readonly"),"readonly"):null),ue=(o,e)=>{if(e==="default")return o;const r=e==="checked"?"selected":e,i=R(),u=i.action[`${e}Opacity`];return f.mix(o,f(o).isLight()?i.action[r].light:i.action[r].dark,100*u).toRgbString()};function be(o){var e,r,i,u,l,b,y,w;const a=z(o);a.lightenColor=(e=o.lightenColor)!=null?e:(s,g)=>Ho(s,g??o.lightenRatio),a.darkenColor=(r=o.darkenColor)!=null?r:(s,g)=>Xo(s,g??o.darkenRatio),a.getContrastText=(i=o.getContrastText)!=null?i:qo,Object.entries(o).forEach(([s,g])=>{var _,P,T;const k=g;Lo(k)?a[s]={main:k.main,light:(_=k.light)!=null?_:a.lightenColor(k.main),dark:(P=k.dark)!=null?P:a.darkenColor(k.main),contrastText:(T=k.contrastText)!=null?T:a.getContrastText(k.main)}:a[s]=g}),a.border.article=(u=a.border.article)!=null?u:a.secondary.main,a.border.field=(l=a.border.field)!=null?l:a.text.primary,a.border.section=(b=a.border.section)!=null?b:a.primary.main;function v(s){var g,_;return typeof s=="string"?{dark:s,light:s}:{dark:(g=s.dark)!=null?g:s.light,light:(_=s.light)!=null?_:s.dark}}a.action.active=v(a.action.active),a.action.disabled=v(a.action.disabled),a.action.focus=v(a.action.focus),a.action.hover=v(a.action.hover),a.action.readonly=v(a.action.readonly),a.action.selected=v(a.action.selected),a.buildStateObject=m,a.getColor=ue,a.getStatesForColors=E,a.getOneState=p,a.getStatesFromDefinition=pe,a.getStatesFromPath=n,a.gray=(y=a.gray)!=null?y:{};for(let s=1;s<=18;s++){const g=Math.round(13.37962962962963*s);a.gray[s*50]=(w=a.gray[s*50])!=null?w:`rgb(${g},${g},${g})`}return a}var Ko=Object.defineProperty,fe=Object.getOwnPropertySymbols,Qo=Object.prototype.hasOwnProperty,Zo=Object.prototype.propertyIsEnumerable,me=(o,e,r)=>e in o?Ko(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r,X=(o,e)=>{for(var r in e||(e={}))Qo.call(e,r)&&me(o,r,e[r]);if(fe)for(var r of fe(e))Zo.call(e,r)&&me(o,r,e[r]);return o};function ge(o,e){return O(I(X(X(X({},o.color?{color:o.color}:null),o.backgroundColor?{backgroundColor:o.backgroundColor}:null),o.borderColor?{borderColor:o.borderColor}:null)),e?.mergeObject)}function er(o,e){var r,i,u,l,b,y,w,a,v;const s=p(o,"active"),g=p(o,"checked"),_=p(o,"disabled"),P=(r=e?.states)!=null&&r.focus?p(o,"focus"):{},T=p(o,"hover"),k=p(o,"readonly"),jo=p(o,"selected");return O(((i=e?.states)==null?void 0:i.default)!==!1?ge(o):null,((u=e?.states)==null?void 0:u.checked)!==!1?m(g,"checked"):{},((l=e?.states)==null?void 0:l.focus)!==!1?m(P,"focus"):{},((b=e?.states)==null?void 0:b.hover)!==!1?m(T,"hover"):{},((y=e?.states)==null?void 0:y.active)!==!1?m(s,"active"):{},((w=e?.states)==null?void 0:w.selected)!==!1?m(jo,"selected"):{},((a=e?.states)==null?void 0:a.disabled)!==!1?m(_,"disabled"):{},((v=e?.states)==null?void 0:v.readonly)!==!1?m(k,"readonly"):{},e?.mergeObject)}const or={ocean:["#008E1B","#009155","#009187","#008EB1","#006872","#2F4858"],sunset:["#ae76de","#D65DB1","#FF6F91","#FF9671","#FFC75F","#F9F871"],red:["#dc143c","#ff2400","#800020","#b22222","#e52b50","#ff7f50"],orange:["#F76E11","#FF9F45","#FFBC80","#FC4F4F","#eb9605","#964000"],green:["#a4de02","#76ba1b","#4c9a2a","#acdf87","#68bb59","#1e5631"],blue:["#7ad6f4","#45bdee","#28a7ea","#006cbb","#034698","#032f64"],violet:["#80007e","#a02d9c","#c37ecd","#9e5fb8","#7f3e98","#4c197f"],turquoise:["#0ddbcc","#43ebff","#19ceeb","#28acea","#388ee9","#3d76e0"],yellow:["#fff700","#ffff9f","#fef54f","#f9e231","#f6c616","#eab200"],grey:["#b1b5ba","#d2d5d6","#dee0e0","#bdbdbb","#9fa19c","#686e67"]},rr=()=>{const o=window.currentPalette;return{datagrid:{borderColor:o.background.paper,header:{backgroundColor:o.background.default,color:o.text.primary,borderColor:o.background.default},body:{preventParse:!0,backgroundColor:o.background.paper,evenRowsBackgroundColor:o.darkenColor(o.background.paper,3),color:o.text.primary,borderColor:o.gray[800],selectedRows:{borderColor:o.gray[800],backgroundColor:o.getOneState({backgroundColor:o.background.paper},"selected").backgroundColor,color:o.getContrastText(o.getOneState({backgroundColor:o.background.paper},"selected").backgroundColor)}}},pagination:{backgroundColor:o.primary.main,icons:{backgroundColor:o.primary.main,borderColor:o.primary.main,color:o.primary.contrastText},pagesBox:{preventParse:!0,backgroundColor:o.background.paper,borderColor:o.border.field,color:o.text.primary}},primaryTable:{borderColor:o.background.paper,header:{backgroundColor:o.primary.main,color:o.primary.contrastText,borderColor:o.primary.main},body:{preventParse:!0,backgroundColor:o.background.paper,evenRowsBackgroundColor:o.darkenColor(o.background.paper,3),color:o.text.primary,borderColor:o.gray[800],selectedRows:{borderColor:o.gray[800],backgroundColor:o.getOneState({backgroundColor:o.background.paper},"selected").backgroundColor,color:o.getContrastText(o.getOneState({backgroundColor:o.background.paper},"selected").backgroundColor)}}},secondaryTable:{borderColor:o.background.paper,header:{backgroundColor:o.background.default,color:o.text.primary,borderColor:o.background.default},body:{preventParse:!0,backgroundColor:o.background.paper,evenRowsBackgroundColor:o.darkenColor(o.background.paper,3),color:o.text.primary,borderColor:o.gray[800],selectedRows:{borderColor:o.gray[800],backgroundColor:o.getOneState({backgroundColor:o.background.paper},"selected").backgroundColor,color:o.getContrastText(o.getOneState({backgroundColor:o.background.paper},"selected").backgroundColor)}}}}};var tr=Object.defineProperty,ar=Object.defineProperties,nr=Object.getOwnPropertyDescriptors,ye=Object.getOwnPropertySymbols,ir=Object.prototype.hasOwnProperty,lr=Object.prototype.propertyIsEnumerable,he=(o,e,r)=>e in o?tr(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r,ve=(o,e)=>{for(var r in e||(e={}))ir.call(e,r)&&he(o,r,e[r]);if(ye)for(var r of ye(e))lr.call(e,r)&&he(o,r,e[r]);return o},xe=(o,e)=>ar(o,nr(e));const we="#004085",cr="#cce5ff",q="white";function ke(){const o=R();return o.getStatesFromDefinition({backgroundColor:o.background.paper,color:o.text.primary},{active:!1,checked:!1,default:!1,disabled:!1,focus:!1,readonly:!1})}function R(o){const e=o===!0,r=typeof o!="boolean"?o:void 0;return window.currentPalette&&!e||(window.currentPalette=be(O(Z,window.defaultPalette,r??window.customPalette))),window.currentPalette}function dr(){var o;const e=z((o=window.currentPalette)!=null?o:R()),r={palette:xe(ve({},e),{lightenColor:void 0,darkenColor:void 0,getContrastText:void 0,buildStateObject:void 0,getColor:void 0,getOneState:void 0,getStatesForColors:void 0,getStatesFromDefinition:void 0,getStatesFromPath:void 0}),accordion:{borderColor:e.border.section},buttons:{accordion:{backgroundColor:e.primary.main,borderColor:e.border.section,color:e.primary.contrastText},accordionPrimary:{backgroundColor:e.primary.main,borderColor:e.border.section,color:e.primary.contrastText},close:xe(ve({},E({color:e.text.primary,backgroundColor:e.background.paper})),{backgroundColor:"transparent"}),collapsibleAsidePanelTitle:{color:e.text.primary},deletableInputButton:{backgroundColor:"transparent",color:e.secondary.main,active:{color:e.darkenColor(e.secondary.main,40)},disabled:{color:e.secondary.main},focus:{color:e.darkenColor(e.secondary.main,20)},hover:{color:e.darkenColor(e.secondary.main,20)}},icon:{backgroundColor:e.secondary.main,color:e.text.icon,hover:{color:e.secondary.contrastText},focus:{color:e.secondary.contrastText}},iconAlert:{backgroundColor:"transparent",color:e.text.icon,active:{backgroundColor:"transparent",color:f("#e5c200").darken(10).toRgbString()},focus:{backgroundColor:"transparent",color:f("#e5c200").darken(5).toRgbString()},hover:{backgroundColor:"transparent",color:f("#e5c200").darken(5).toRgbString()}},iconPrimary:{backgroundColor:e.primary.main,color:e.primary.contrastText,active:{color:e.primary.contrastText},focus:{color:e.primary.contrastText},hover:{color:e.primary.contrastText},disabled:{color:e.gray[500]}},iconToggled:{backgroundColor:e.primary.main,color:e.primary.contrastText,active:{color:e.primary.contrastText},focus:{color:e.common.white},hover:{color:e.common.white}},iconOutline:{backgroundColor:e.background.paper,color:e.primary.main,borderColor:e.border.article},imagePreview:{backgroundColor:e.background.paper,color:e.text.primary,borderColor:e.border.article},link:{backgroundColor:"transparent",color:e.text.primary,borderColor:"transparent",active:{color:e.text.primary},focus:{color:e.text.primary},hover:{color:e.text.primary}},openTab:{backgroundColor:e.primary.main,color:e.primary.contrastText,borderColor:e.primary.dark},outline:{backgroundColor:e.background.paper,color:e.text.primary,borderColor:e.primary.main},outlineDanger:{backgroundColor:e.background.paper,color:e.primary.main,borderColor:e.primary.main,active:{borderColor:e.darkenColor(e.error.dark,e.action.activeOpacity*80),backgroundColor:e.darkenColor(e.error.dark,e.action.activeOpacity*80),color:e.getContrastText(e.darkenColor(e.error.dark,e.action.activeOpacity*80))},focus:{borderColor:e.darkenColor(e.error.dark,e.action.activeOpacity*60),backgroundColor:e.darkenColor(e.error.dark,e.action.activeOpacity*60),color:e.getContrastText(e.darkenColor(e.error.dark,e.action.activeOpacity*60))},hover:{borderColor:e.darkenColor(e.error.dark,e.action.activeOpacity*70),backgroundColor:e.darkenColor(e.error.dark,e.action.activeOpacity*70),color:e.getContrastText(e.darkenColor(e.error.dark,e.action.activeOpacity*70))}},outlineWarning:{backgroundColor:e.background.paper,color:e.text.primary,borderColor:e.primary.main,active:{borderColor:e.warning.main,backgroundColor:e.warning.main,color:e.warning.contrastText},focus:{borderColor:e.warning.main,backgroundColor:e.warning.main,color:e.warning.contrastText},hover:{borderColor:e.warning.main,backgroundColor:e.warning.main,color:e.warning.contrastText}},paper:{backgroundColor:e.background.paper,color:e.text.primary,borderColor:e.background.paper},primary:{backgroundColor:e.primary.main,color:e.primary.contrastText,borderColor:e.primary.main},secondary:{backgroundColor:e.secondary.main,color:e.secondary.contrastText,borderColor:e.secondary.main},tab:{backgroundColor:e.background.paper,color:e.text.primary,borderColor:e.border.article},toggleIcon:{color:e.secondary.contrastText,backgroundColor:e.secondary.main,borderColor:e.border.field,danger:{backgroundColor:e.error.main,borderColor:e.border.field,color:e.error.contrastText},toggled:{backgroundColor:e.primary.main,borderColor:e.border.field,color:e.primary.contrastText}},transparentIcon:{backgroundColor:"transparent",color:e.text.primary,hover:{color:e.primary.main},focus:{color:e.primary.main}}},components:rr(),dropzone:{backgroundColor:e.background.paper,borderColor:e.border.section,color:e.background.default},form:{backgroundColor:e.background.paper,fields:{backgroundColor:e.background.paper,color:e.text.primary,borderColor:e.border.field},radio:{backgroundColor:"transparent",color:f(window.currentPalette.text.primary).lighten(15).toRgbString(),borderColor:e.text.primary,active:{backgroundColor:"transparent",color:f(window.currentPalette.text.primary).lighten(0).toRgbString()},checked:{backgroundColor:"red",color:f(window.currentPalette.text.primary).lighten(15).toRgbString()},disabled:{backgroundColor:"transparent",color:f(window.currentPalette.text.primary).lighten(55).toRgbString()},hover:{backgroundColor:"transparent",color:f(window.currentPalette.text.primary).lighten(7).toRgbString()},readonly:{color:f(window.currentPalette.text.primary).lighten(38).toRgbString(),backgroundColor:"transparent"}}},modal:{borderColor:e.border.section,backgroundColor:e.background.paper},notifications:{error:{backgroundColor:e.error.light,color:e.getContrastText(e.error.light),borderColor:e.error.main},success:{backgroundColor:e.success.light,color:e.getContrastText(e.success.light),borderColor:e.success.main},warning:{backgroundColor:e.warning.light,color:e.getContrastText(e.warning.light),borderColor:e.warning.main}},pagination:{color:e.primary.contrastText,backgroundColor:e.primary.main},printView:{main:{backgroundColor:e.background.default,page:{backgroundColor:e.background.paper,borderColor:e.border.article}},list:{table:{borderColor:e.border.section},th:{backgroundColor:"#eee"},cell:{borderColor:e.border.article}}},schemas:or,scrollbars:{bar:{color:e.secondary.main,backgroundColor:e.background.default,hover:{backgroundColor:e.lightenColor(e.background.default,10),color:e.lightenColor(e.secondary.main,10)},active:{backgroundColor:e.lightenColor(e.background.default,10),color:e.lightenColor(e.secondary.main,20)}}},tab:{backgroundColor:e.background.paper,borderColor:e.border.section},topBar:{backgroundColor:e.primary.main},accent:e.text.accent,background:e.background.default,iconWarning:"rgb(246 222 87)",muted:e.text.disabled,primary:e.primary.main,secondary:e.secondary.main,text:e.text.primary,warning:e.warning.main,danger:e.error.main,link:e.text.accent,success:e.success.main,title:e.text.title,selected:e.getOneState({backgroundColor:e.background.paper},"selected").backgroundColor,lightBorder:"hsl(0, 12%, 85%)",outlineColor:"#00a8f6",touchedBorderColor:"orange",baseGrey:"#dfdfdf",darkBorder:"hsl(247, 98%, 10%)",darkBlue:we,disabled:"#efefef",favorite:"#e5c200",filtersRowBackground:q,formBackground:q,grey:"#777",gridRowHighlight:"#e1f3ff",highlightButton:"hsl(61, 100%, 91%)",lightBlue:cr,oddRow:"#f0f5ff",paginationBackground:"hsl(229deg, 75%, 90%)",readOnlyText:"#737373",required:"darkred",scrollbarBack:"rgb(206, 206, 206)",scrollbarFront:"rgb(156, 156, 156)",sysExceptionNotificationBg:"#f8d7da",sysMessageNotificationBg:"#fff3cd",tabBackground:"white",treeRuler:"#ccc",white:q,priorityNone:"gray",priorityLow:e.success.main,priorityNormal:"rgb(255 211 34)",priorityHigh:"rgb(255 150 0)",priorityUrgent:"red",charts:{front:we}};return ie([r?.buttons,r?.form]),r}var sr=Object.defineProperty,Ce=Object.getOwnPropertySymbols,pr=Object.prototype.hasOwnProperty,ur=Object.prototype.propertyIsEnumerable,Oe=(o,e,r)=>e in o?sr(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r,G=(o,e)=>{for(var r in e||(e={}))pr.call(e,r)&&Oe(o,r,e[r]);if(Ce)for(var r of Ce(e))ur.call(e,r)&&Oe(o,r,e[r]);return o};const br={primary:{border:"1px solid",borderLeft:"12px solid",borderRadius:"alerts",display:"flex",flexDirection:"column",fontWeight:"normal",maxHeight:"60vh",overflow:"auto",p:0,"&:focus":{outline:"none"},".notification__header":{display:"flex",alignItems:"center",justifyContent:"space-between",position:"sticky",top:0,width:"100%",p:t(5)},".notification__title":{fontSize:18,fontWeight:"bold",color:"palette.text.primary",display:"flex",gap:t(5),alignItems:"center"},".notification__closeButton":{flexShrink:0},".notification__body":{alignItems:"center",display:"flex",flexDirection:"row",gap:t(5),width:"100%",p:t(5)},".notification__header ~ .notification__body":{pt:0},".notification__content":{display:"flex",alignItems:"stretch",flexDirection:"column",gap:t(5),width:"100%"},".notification__icon":{flexShrink:0,height:"iconMd",svg:{height:"iconMd",width:"iconMd"}},".notification__message":{display:"flex",flexDirection:"column",fontWeight:"normal",gap:t(3),width:"100%",wordBreak:"break-word"},".notification__trace":{maxWidth:"100%",overflow:"hidden",maxHeight:"30vh",flexShrink:0,backgroundColor:"rgba(10,10,10,0.02)",pt:t(5),".notification__traceLabel":{pl:t(5),display:"flex",gap:2},".notification__traceText":{fontWeight:"normal",p:t(5),maxHeight:"30vh",overflow:"auto",maxWidth:"100%",position:"relative"}},"&:focus .notification__closeButton":j},warning:{variant:"alerts.primary","&, & .notification__header":G({},h("notifications.warning"))},danger:{variant:"alerts.primary","&, & .notification__header":G({},h("notifications.error"))},success:{variant:"alerts.primary","&, & .notification__header":G({},h("notifications.success"))}};var fr=Object.defineProperty,mr=Object.defineProperties,gr=Object.getOwnPropertyDescriptors,$e=Object.getOwnPropertySymbols,yr=Object.prototype.hasOwnProperty,hr=Object.prototype.propertyIsEnumerable,_e=(o,e,r)=>e in o?fr(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r,d=(o,e)=>{for(var r in e||(e={}))yr.call(e,r)&&_e(o,r,e[r]);if($e)for(var r of $e(e))hr.call(e,r)&&_e(o,r,e[r]);return o},je=(o,e)=>mr(o,gr(e));const vr={inherit:{color:"inherit",background:"inherit",border:"none",borderRadius:0,font:"inherit",cursor:"pointer",padding:0,margin:0},collapsibleAsidePanelTitle:d({variant:"buttons.inherit",display:"flex",justifyContent:"space-between",alignItems:"center",width:"100%"},n("buttons.collapsibleAsidePanelTitle")),primary:je(d({borderWidth:"2px",borderStyle:"solid",variant:"text.default",py:c({0:3,4:4}),px:c({0:5,4:6}),display:"inline-block",width:c({0:"100%",1:"auto"}),cursor:"pointer",borderRadius:"buttons",fontWeight:"normal",userSelect:"none",transition:"background-color 300ms ease-out, color 300ms ease-out",wordBreak:"keep-all"},n("buttons.primary")),{"&:focus, &:focus-visible":{outlineColor:"#00daff"}}),"primary-sm":d({variant:"buttons.primary","&:focus, &:focus-visible":{}},C),secondary:d({variant:"buttons.primary","&:focus, &:focus-visible":{},borderWidth:"0px",borderStyle:"solid"},n("buttons.secondary")),"secondary-sm":d({variant:"buttons.secondary"},C),"light-secondary":d({variant:"buttons.secondary"},n("buttons.lightSecondary")),danger:d({variant:"buttons.primary","&:focus, &:focus-visible":{}},n("buttons.danger")),"danger-sm":d({variant:"buttons.danger"},C),warning:d({variant:"buttons.primary","&:focus, &:focus-visible":{}},n("buttons.warning")),"warning-sm":d({variant:"buttons.warning"},C),close:d({cursor:"pointer",ml:"auto",mr:"2",borderRadius:"buttons"},n("buttons.close")),accordion:{variant:"buttons.primary","&:focus, &:focus-visible":{},cursor:"pointer",m:t(0),py:c({0:3,4:4}),px:c({0:5,4:6}),width:"100%",display:"flex",alignItems:"center",justifyContent:"space-between",borderRadius:"buttons",textAlign:"left",fontFamily:"heading",fontSize:"text.default",textDecoration:"none",textTransform:"none",fontWeight:"bold",border:"none",transition:"background-color 300ms ease-out, color 300ms ease-out",userSelect:"text","&, *":n("buttons.accordion"),"h3.toggleAccordionElementLabel":{variant:"text.default",color:"inherit",margin:0,wordBreak:"break-word"}},"accordion-primary":d({variant:"buttons.accordion",border:"none"},n("buttons.accordionPrimary")),icon:je(d({display:"flex",justifyContent:"center",alignItems:"center",p:t(0),m:t(0),bg:"secondary",cursor:"pointer",transition:"background-color 300ms ease-out, color 300ms ease-out",borderRadius:"buttons",border:"none"},n("buttons.icon")),{svg:{width:"auto",height:"20px",display:"block"},"&.isToggled":d({},n("buttons.iconToggled"))}),"icon-primary":d({variant:"buttons.icon"},n("buttons.iconPrimary")),"icon-outline":d({variant:"buttons.icon",bg:"white",border:"1px solid"},n("buttons.iconOutline")),"icon-outline-danger":d({variant:"buttons.icon",bg:"white",border:"1px solid"},n("buttons.outlineDanger")),"icon-only":d({variant:"buttons.icon"},n("buttons.iconOnly")),link:d({variant:"inherit",width:"auto",border:"none",textDecoration:"underline",px:2,py:1,borderRadius:"buttons",cursor:"pointer",textTransform:"none",transition:"background-color 300ms ease-out, color 300ms ease-out"},n("buttons.link")),"link-sm":d({variant:"buttons.link"},C),outline:d({variant:"buttons.primary",borderWidth:"2px",borderStyle:"solid",borderRadius:"buttons","&:focus, &:focus-visible":{}},n("buttons.outline",{states:{active:!1,checked:!1,disabled:!1,focus:!1,hover:!1,readonly:!1,selected:!1}})),"outline-sm":d({variant:"buttons.outline"},C),"transparent-sm":d({variant:"buttons.outline","&:focus, &:focus-visible":{},bg:"transparent",color:"inherit",border:"none",font:"inherit",textTransform:"inherit"},C),"outline-danger":d({variant:"buttons.outline","&:focus, &:focus-visible":{}},n("buttons.outlineDanger")),"outline-danger-sm":d({variant:"buttons.outline-danger"},C),"outline-warning":d({variant:"buttons.outline","&:focus, &:focus-visible":{}},n("buttons.outlineWarning")),"outline-warning-sm":d({variant:"buttons.outline-warning"},C),"outline-extended":{variant:"buttons.outline",gridColumnStart:1,gridColumnEnd:3,width:"100%"},"outline-danger-extended":{variant:"buttons.outline-danger",gridColumnStart:1,gridColumnEnd:3,width:"100%"},"primary-extended":{variant:"buttons.primary","&:focus, &:focus-visible":{},gridColumnStart:1,gridColumnEnd:3,width:"100%"},query:{extended:{variant:"buttons.outline","&:focus, &:focus-visible":{},gridColumnStart:1,gridColumnEnd:3}},tableAccordion:d({variant:"buttons.accordion",fontSize:"text.default",p:t(3),wordBreak:"keep-all",a:{color:"background"}},n("buttons.tableAccordion")),tableHeader:d({variant:"buttons.tableAccordion",alignItems:"center",justifyContent:"center",height:"100%",border:"none",svg:{ml:t(2)}},n("buttons.tableHeader")),paper:d({variant:"buttons.primary",borderWidth:"2px",borderStyle:"solid",borderRadius:"buttons"},n("buttons.paper")),"paper-sm":d(d({variant:"buttons.primary",borderWidth:"2px",borderStyle:"solid",borderRadius:"buttons"},n("buttons.paper")),C)};var xr=Object.defineProperty,Se=Object.getOwnPropertySymbols,wr=Object.prototype.hasOwnProperty,kr=Object.prototype.propertyIsEnumerable,Pe=(o,e,r)=>e in o?xr(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r,Cr=(o,e)=>{for(var r in e||(e={}))wr.call(e,r)&&Pe(o,r,e[r]);if(Se)for(var r of Se(e))kr.call(e,r)&&Pe(o,r,e[r]);return o};const Or=Cr({display:"inline-flex",borderRadius:"default",flexBasis:"32px",flexShrink:0,width:"32px",height:"32px",alignItems:"center",justifyContent:"center",p:"3px",border:"1px solid",svg:{width:"20px"}},n("form.fields",{states:{active:!1,hover:!1,focus:!1}}));var $r=Object.defineProperty,_r=Object.defineProperties,jr=Object.getOwnPropertyDescriptors,Te=Object.getOwnPropertySymbols,Sr=Object.prototype.hasOwnProperty,Pr=Object.prototype.propertyIsEnumerable,Ie=(o,e,r)=>e in o?$r(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r,Tr=(o,e)=>{for(var r in e||(e={}))Sr.call(e,r)&&Ie(o,r,e[r]);if(Te)for(var r of Te(e))Pr.call(e,r)&&Ie(o,r,e[r]);return o},Ir=(o,e)=>_r(o,jr(e));const Rr=Ir(Tr({borderRadius:"default"},n("form.fields",{states:{active:!1,focus:!1,hover:!1}})),{backgroundColor:"unset",alignItems:"center","&.nativeCheckbox":{appearance:"none",width:"25px",height:"25px",border:"solid 1px #cccccc",marginRight:"8px",position:"relative",cursor:"pointer","&:checked::before":{content:'"\u2713"',color:"palette.text.primary",position:"absolute",display:"flex",alignItems:"center",justifyContent:"center",top:0,left:0,right:0,bottom:0,fontSize:"larger",fontWeight:"bolder",borderRadius:"5px",cursor:"pointer"},"&:indeterminate::before":{content:'"-"',color:"palette.text.primary",position:"absolute",display:"flex",alignItems:"center",justifyContent:"center",top:"-1px",left:0,right:0,bottom:0,fontSize:"xx-large",fontWeight:"600",borderRadius:"5px",cursor:"pointer"}}});var Br=Object.defineProperty,Wr=Object.defineProperties,Dr=Object.getOwnPropertyDescriptors,Re=Object.getOwnPropertySymbols,Er=Object.prototype.hasOwnProperty,Ar=Object.prototype.propertyIsEnumerable,Be=(o,e,r)=>e in o?Br(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r,We=(o,e)=>{for(var r in e||(e={}))Er.call(e,r)&&Be(o,r,e[r]);if(Re)for(var r of Re(e))Ar.call(e,r)&&Be(o,r,e[r]);return o},Fr=(o,e)=>Wr(o,Dr(e));const zr=Fr(We({display:"flex",flexDirection:"column",alignItems:"stretch",justifyContent:"stretch",gap:t(2),width:"100%","&.readOnly":{input:{color:"Text.fields",bg:"Background.fields"}},".iconInput":{width:"100%",position:"relative"},'input:hover~.delete_date_button:not(:disabled,[aria-selected="true"]), input:hover~.delete_date_button:not(:disabled,[aria-selected="true"]) path, .delete_date_button':We({position:"absolute",right:"59px",padding:0,top:"calc(50% - 10px)",margin:0,marginRight:0,borderRadius:"100%",width:"20px",height:"20px"},n("buttons.icon-outline")),input:{flexShrink:1},"& > div":{display:"flex",gap:t(2),flexShrink:0,width:"auto",maxWidth:"100%",minWidth:0,button:{width:"45px",flexShrink:0}}},n("form.fields",{states:{hover:!1,active:!1,focus:!1}})),{backgroundColor:void 0});var Mr=Object.defineProperty,De=Object.getOwnPropertySymbols,Lr=Object.prototype.hasOwnProperty,Hr=Object.prototype.propertyIsEnumerable,Ee=(o,e,r)=>e in o?Mr(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r,Xr=(o,e)=>{for(var r in e||(e={}))Lr.call(e,r)&&Ee(o,r,e[r]);if(De)for(var r of De(e))Hr.call(e,r)&&Ee(o,r,e[r]);return o};const qr={display:"flex",gap:t(1),justifyContent:"stretch",alignItems:"center","&.readOnly":{input:Xr({},h("form.fields"))},input:{height:"50px",width:"100%"},button:{display:"flex",width:"45px",flexShrink:0,height:"50px"}};var Gr=Object.defineProperty,Nr=Object.defineProperties,Vr=Object.getOwnPropertyDescriptors,Ae=Object.getOwnPropertySymbols,Yr=Object.prototype.hasOwnProperty,Ur=Object.prototype.propertyIsEnumerable,Fe=(o,e,r)=>e in o?Gr(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r,Jr=(o,e)=>{for(var r in e||(e={}))Yr.call(e,r)&&Fe(o,r,e[r]);if(Ae)for(var r of Ae(e))Ur.call(e,r)&&Fe(o,r,e[r]);return o},Kr=(o,e)=>Nr(o,Vr(e));const Qr=Kr(Jr({variant:"text.default",border:"1px solid",borderRadius:"default",padding:c({0:3,3:4}),"::placeholder":{color:"#b0b0b0"}},n("form.fields",{states:{active:!1,hover:!1,focus:!1}})),{material:{input:{borderLeft:"none",borderRight:"none",borderTop:"none",borderBottomColor:"palette.border.section","& + .input__underline":{transform:"scale(1)"},"&:focus":{outline:"none","~::after":{animationName:"growHorizontal",animationDuration:"150ms",animationTimingFunction:"ease-out",content:'""',display:"block",height:"0",outlineColor:"palette.primary.main",outlineStyle:"solid",outlineWidth:"1.5px",outlineOffset:0,position:"fixed",transformOrigin:"center center",width:"100%"}}}}}),Zr={variant:"text.default",alignItems:"center",width:"auto",textTransform:"none",cursor:"pointer","&:not(.radio-label)":{fontWeight:"bold"},"&.required":{position:"relative","&::before":{color:"danger",position:"absolute",content:'"*"',top:0,left:"-10px"}},"&:last-of-type":{"input, textarea, select":{mb:t(0)}}};var et=Object.defineProperty,ze=Object.getOwnPropertySymbols,ot=Object.prototype.hasOwnProperty,rt=Object.prototype.propertyIsEnumerable,Me=(o,e,r)=>e in o?et(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r,tt=(o,e)=>{for(var r in e||(e={}))ot.call(e,r)&&Me(o,r,e[r]);if(ze)for(var r of ze(e))rt.call(e,r)&&Me(o,r,e[r]);return o};const at=tt({width:"32px",height:"32px",input:{height:"32px !important"}},n("form.radio"));var nt=Object.defineProperty,Le=Object.getOwnPropertySymbols,it=Object.prototype.hasOwnProperty,lt=Object.prototype.propertyIsEnumerable,He=(o,e,r)=>e in o?nt(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r,ct=(o,e)=>{for(var r in e||(e={}))it.call(e,r)&&He(o,r,e[r]);if(Le)for(var r of Le(e))lt.call(e,r)&&He(o,r,e[r]);return o};const dt=ct({variant:"text.default",display:"inline-block",fontFamily:"body",p:t(4),pr:7,borderRadius:"default",width:"100%",maxWidth:"100%"},n("form.fields",{states:{active:!1,hover:!1,focus:!1}}));var st=Object.defineProperty,pt=Object.defineProperties,ut=Object.getOwnPropertyDescriptors,Xe=Object.getOwnPropertySymbols,bt=Object.prototype.hasOwnProperty,ft=Object.prototype.propertyIsEnumerable,qe=(o,e,r)=>e in o?st(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r,Ge=(o,e)=>{for(var r in e||(e={}))bt.call(e,r)&&qe(o,r,e[r]);if(Xe)for(var r of Xe(e))ft.call(e,r)&&qe(o,r,e[r]);return o},mt=(o,e)=>pt(o,ut(e));const gt=Ge({variant:"text.default",height:"100%",padding:"4px",borderRadius:"default",border:"1px solid",width:"100%",transition:"background-color 100ms ease-out, color 100ms ease-out",overflow:"auto",option:mt(Ge({padding:2},ke()),{"&:checked":{backgroundColor:window.currentPalette.getColor(window.currentPalette.background.paper,"selected"),color:window.currentPalette.getContrastText(window.currentPalette.getColor(window.currentPalette.background.paper,"selected"))}}),"+ svg":{display:"none"}},n("form.fields",{states:{active:!1,hover:!1,focus:!1}})),yt={"+ span":{fontSize:14,fontWeight:"normal",wordBreak:"break-all"},backgroundColor:"form.fields.checked.borderColor"},ht={"&, & textarea":{height:"100%",minHeight:"130px",resize:"vertical"},textarea:{variant:"forms.input"}};var vt=Object.defineProperty,xt=Object.defineProperties,wt=Object.getOwnPropertyDescriptors,Ne=Object.getOwnPropertySymbols,kt=Object.prototype.hasOwnProperty,Ct=Object.prototype.propertyIsEnumerable,Ve=(o,e,r)=>e in o?vt(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r,Ye=(o,e)=>{for(var r in e||(e={}))kt.call(e,r)&&Ve(o,r,e[r]);if(Ne)for(var r of Ne(e))Ct.call(e,r)&&Ve(o,r,e[r]);return o},Ot=(o,e)=>xt(o,wt(e));const $t={border:"1px solid",borderColor:"palette.border.field",display:"inline-block",position:"relative",pr:"45px",".deletableInput__input":{border:"none"},".deletableInput__deleteButton":Ye({height:"100%",outlineOffset:"-2px",position:"absolute",right:0,top:0,width:"45px"},n("buttons.deletableInputButton")),"&:focus-within:not(.asMaterial)":Ot(Ye({},j),{".deletableInput__input:focus":{outline:"none"},".deletableInput__deleteButton:focus":{outline:"none"}}),"&.asMaterial":{borderLeft:"none",borderRight:"none",borderTop:"none",borderBottomColor:"palette.border.section","& + .input__underline":{transform:"scale(1)"},".deletableInput__input:focus":{outline:"none","~.input__underline::after":{animationName:"growHorizontal",animationDuration:"150ms",animationTimingFunction:"ease-out",content:'""',display:"block",height:"0",outlineColor:"palette.primary.main",outlineStyle:"solid",outlineWidth:"1.5px",outlineOffset:0,position:"absolute",transformOrigin:"center center",left:0,right:0}}}},_t=()=>({checkbox:Rr,customCheckbox:Or,dateInput:zr,deletableInput:$t,iconInput:qr,input:Qr,label:Zr,radio:at,select:dt,selectMultiple:gt,switch:yt,textarea:ht,'input[type="date"]':{variant:"forms.input"}}),jt={overlay:{position:"fixed",overflow:"hidden",top:"0",right:"0",bottom:"0",left:"0",width:"100vw",height:"100vh",display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:"palette.background.overlay",zIndex:"modal","&:not(.screenLock) .modal-enter-done":{boxShadow:"modals"}}},St={margin:"auto",display:"flex",flexDirection:"column",wordBreak:"break-word",overflow:"hidden",width:"100%",".handler__form":{display:"flex",flexDirection:"column",overflow:"hidden",gap:t(6),".toggleAccordionElement":{position:"sticky",top:0},".handler__form__elements":{display:"flex",flexDirection:"column",alignItems:"stretch",overflowY:"auto",maxHeight:"60vh",gap:t(3),pr:t(3)},".handler__form__elements__section__content":{display:"flex",flexDirection:"column",wordBreak:"break-word",background:"palette.background.paper",p:0,gap:t(3)},".content .handler__form__elements__section__content":{border:"1px solid",borderColor:"palette.border.section",borderTop:"none",p:t(6)},".handler__form__buttons":{display:"flex",flexDirection:"row",justifyContent:"center",p:0,gap:"0px",textAlign:"center"},".radio":{display:"flex",flexDirection:"column",flexWrap:"wrap",listStyle:"none",variant:"layout.execution.form.fields.radio"},".handler__checkbox, .handler__radio":{"label span":{fontWeight:"normal"}},".checkbox":{flexDirection:"row-reverse",alignItems:"center",justifyContent:"start",gap:t(4),".semicolon":{display:"none"},input:{width:"100%"}},".handler__hidden":{display:"none"},"label.select > div":{width:"100%"},".spacer":{height:t(7)}},".progressBox":{p:t(5),pt:t(0)}};var Pt=Object.defineProperty,Tt=Object.defineProperties,It=Object.getOwnPropertyDescriptors,Ue=Object.getOwnPropertySymbols,Rt=Object.prototype.hasOwnProperty,Bt=Object.prototype.propertyIsEnumerable,Je=(o,e,r)=>e in o?Pt(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r,A=(o,e)=>{for(var r in e||(e={}))Rt.call(e,r)&&Je(o,r,e[r]);if(Ue)for(var r of Ue(e))Bt.call(e,r)&&Je(o,r,e[r]);return o},Ke=(o,e)=>Tt(o,It(e));const Wt=Ke(A({apiaApi:St},jt),{main:A({zIndex:"modal",display:"flex",flexDirection:"column",p:t(6),alignItems:"center",justifyItems:"center",maxHeight:"100vh",maxWidth:"calc(100vw - 10px)",resize:"both",overflow:"auto",border:"1px solid",gap:t(5),"&>div":{overflow:"hidden",flexGrow:0,flexShrink:0,p:"3px",width:"100%"},"&>div.modal__header":{alignItems:c({0:"end",4:"center"}),flexShrink:0,overflow:"visible",".modal__headerBar":{display:"flex",flexDirection:"row",alignItems:"center",gap:t(3)}},"&>div.modal__content, &>div.modal__content>form":{overflow:"auto",width:"100%",flexBasis:"100%",flexShrink:1,display:"flex",justifyContent:"stretch",alignItems:"stretch"}},h("modal")),finder:{variant:"layout.common.modals.main",height:c({0:"100vh",3:"80vh"}),width:c({0:"95vw",3:"80vw",4:"70vw"}),".modal__content":{p:t(2),overflow:"hidden",".confirm__content":{overflow:"hidden",".finder__content":{display:"flex",alignItems:"stretch"},".selection__keyHandler":{overflow:"hidden",height:"100%",".responsiveTable__wrapper":{height:"100%",border:"1px solid",borderColor:"palette.border.article",backgroundColor:"palette.gray.900"}}}}},sm:{variant:"layout.common.modals.main",maxWidth:"min(350px, calc(100vw - 10px))"},md:{variant:"layout.common.modals.main",maxWidth:"min(500px, calc(100vw - 10px))"},"md-fixed":{variant:"layout.common.modals.main",width:"min(500px, calc(100vw - 10px))",maxHeight:c({0:"95vh",2:"80vh"})},lg:{variant:"layout.common.modals.main",maxWidth:"min(640px, calc(100vw - 10px))"},"lg-fixed":{variant:"layout.common.modals.main",width:"640px",height:"60vh"},xl:{variant:"layout.common.modals.main",maxWidth:"min(730px, calc(100vw - 10px))"},"xl-fixed":{variant:"layout.common.modals.main",width:c({0:"95vw",2:"60vw"}),height:c({0:"95vh",2:"80vh"})},xxl:{variant:"layout.common.modals.main",width:c({0:"95vw",2:"80vw"}),maxHeight:c({0:"95vh",2:"80vh"})},"xxl-fixed":{variant:"layout.common.modals.main",width:c({0:"95vw",2:"80vw"}),height:c({0:"95vh",2:"80vh"})},xxxl:{variant:"layout.common.modals.main",width:c({0:"95vw",2:"95vw"}),maxHeight:c({0:"95vh",2:"95vh"})},"xxxl-fixed":{variant:"layout.common.modals.main",width:c({0:"95vw",2:"95vw"}),height:c({0:"95vh",2:"95vh"})},flex:{variant:"layout.common.modals.main",maxWidth:"95vw",maxHeight:"95vh",".modal__content":{p:t(2),overflow:"auto"}},cal:{variant:"layout.common.modals.sm",width:"350px",".react-calendar":{backgroundColor:"palette.background.paper",button:Ke(A({},n("form.fields")),{"&.react-calendar__tile--active":A({},n("buttons.primary"))})}},editGrid:{variant:"layout.common.modals.main",width:"root",maxHeight:"90vh"}});var Dt=Object.defineProperty,Et=Object.defineProperties,At=Object.getOwnPropertyDescriptors,Qe=Object.getOwnPropertySymbols,Ft=Object.prototype.hasOwnProperty,zt=Object.prototype.propertyIsEnumerable,Ze=(o,e,r)=>e in o?Dt(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r,N=(o,e)=>{for(var r in e||(e={}))Ft.call(e,r)&&Ze(o,r,e[r]);if(Qe)for(var r of Qe(e))zt.call(e,r)&&Ze(o,r,e[r]);return o},eo=(o,e)=>Et(o,At(e));function Mt(){return{'td[data-focused="false"], th[data-focused="false"]':{"*:focus-visible, &:focus, &:focus-visible":{outline:"none"},"*:focus":N({},L)},'[data-focused="true"]:not(.row__separator__cell)':{'&:not([data-editionmode="true"])':{"&:focus, & > *:focus, *:focus-visible":eo(N({},L),{"&.cell__download__document":{outlineOffset:0}})},'&[data-editionmode="true"]':{"&:focus, *:focus, *:focus-visible":eo(N({},L),{outlineStyle:"dotted",outlineWidth:"6px",outlineOffset:"-4px"})}},'[data-focused="true"].row__separator__cell':{backgroundColor:"palette.secondary.main",outline:"none"}}}const oo=({children:o,customTheme:e})=>{const r=go(e);return x(U,{theme:r,children:o})};var Lt=Object.defineProperty,Ht=Object.defineProperties,Xt=Object.getOwnPropertyDescriptors,ro=Object.getOwnPropertySymbols,qt=Object.prototype.hasOwnProperty,Gt=Object.prototype.propertyIsEnumerable,to=(o,e,r)=>e in o?Lt(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r,V=(o,e)=>{for(var r in e||(e={}))qt.call(e,r)&&to(o,r,e[r]);if(ro)for(var r of ro(e))Gt.call(e,r)&&to(o,r,e[r]);return o},Nt=(o,e)=>Ht(o,Xt(e));function Vt(o,e,r,i,u=!1){const l=M({},e,r);return Object.assign(b=>{const y=Po(0);return u?x(oo,{customTheme:l,children:x(ao,{avoidFirstRender:y,children:x(K,{children:x(i,V({},b))})})}):x(oo,{customTheme:l,children:x(ao,{avoidFirstRender:y,children:x(J,Nt(V({className:"variant__holder"},H(e)),{children:x(K,{children:x(i,V({},b))})}))})})},{displayName:o})}const ao=({avoidFirstRender:o,children:e})=>(o.current++,o.current<=1?null:x(So,{children:e}));function Yt(o,e){const r=typeof o=="string"?o:"",i=typeof o=="string"?e:o;F.emit("newStyles",{path:r,styles:i})}var Ut=Object.defineProperty,Jt=Object.defineProperties,Kt=Object.getOwnPropertyDescriptors,no=Object.getOwnPropertySymbols,Qt=Object.prototype.hasOwnProperty,Zt=Object.prototype.propertyIsEnumerable,io=(o,e,r)=>e in o?Ut(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r,B=(o,e)=>{for(var r in e||(e={}))Qt.call(e,r)&&io(o,r,e[r]);if(no)for(var r of no(e))Zt.call(e,r)&&io(o,r,e[r]);return o},W=(o,e)=>Jt(o,Kt(e));const ea=W(B({variant:"colors.tables.primary",backgroundColor:"components.primaryTable.body.backgroundColor",border:"1px solid",borderColor:"components.primaryTable.borderColor",borderCollapse:"separate",borderSpacing:0,tableLayout:"fixed",thead:W(B({},h("tables.primary.thead")),{zIndex:1,position:"sticky",insetBlockStart:0,"tr:not(.filtersRow):not(.responsiveTable__filters__row)":{"th, td":W(B({variant:"buttons.primary",py:c({0:3,4:4}),px:c({0:3,4:4}),width:"breakWidth",borderRadius:0,borderStyle:"solid",borderWidth:"1px",display:"table-cell",verticalAlign:"center",wordBreak:"break-word",'&[role="presentation"]':{display:"none"}},n("components.primaryTable.header")),{"& *":{color:"inherit"},"&:last-of-type:not(td)":{maxWidth:"100%",width:"100%"},".headButton__label":{textAlign:"left"},".headButton__resizer":{width:"20px",cursor:"ew-resize",zIndex:1e3,position:"absolute",right:"-10px",height:"100%"},"&:last-of-type .headButton__resizer":{right:"0px"},"&.additionalColumn":{minWidth:"50px",maxWidth:"50px",width:"50px",p:0,textAlign:"center",verticalAlign:"center"},".headButton__container":{width:"100%",display:"flex",alignItems:"center",justifyContent:"space-between",gap:3,svg:{flexShrink:0}},"&>div":{color:"components.primaryTable.header.color",svg:{color:"components.primaryTable.body.color"}},"&:not(:last-of-type)":{"&>div":{borderRightWidth:"1px"}}}),"th.requiredFilterColumn":{borderLeft:"4px solid !important",borderLeftColor:"palette.error.main !important"}},"tr.filtersRow, tr.responsiveTable__filters__row":{backgroundColor:"components.primaryTable.body.backgroundColor","th.noFilter":{background:"transparent"},"td.requiredFilter__Border":{borderLeftStyle:"solid !important",borderLeftWidth:"4px !important",borderLeftColor:"palette.error.main"},td:{"input:not([disabled]), select:not([disabled])":{border:"1px solid white"},background:"transparent",border:"1px solid",borderColor:"components.primaryTable.body.borderColor",p:0},transition:"height 0.3s","&.hidden":{height:"0",overflow:"hidden",p:t(0),border:"none","& *":{height:"0",overflow:"hidden",fontSize:0,lineHeight:0,p:t(0),border:"none"}}}}),tbody:{tr:W(B(W(B({borderBottomWidth:"1px",borderBottomStyle:"solid"},n("components.primaryTable.body",{states:{disabled:!1,readonly:!1,active:!1,hover:!1,checked:!1,focus:!1,selected:!1}})),{"&:nth-of-type(2n)":{backgroundColor:"components.primaryTable.body.evenRowsBackgroundColor"},"&.non-selectable":{cursor:"not-allowed"},"&.hidden":{display:"none"},"&.locked":{background:"palette.gray.900",td:{borderColor:"palette.gray.850"}}}),ke()),{"&.draggingRow":{outline:"3px dotted",outlineColor:"components.primaryTable.header.borderColor",outlineOffset:"-3px","*":{outline:"none !important"}},borderColor:"components.primaryTable.body.borderColor",".rowStatesList":{display:"flex",gap:t(3),alignItems:"center",svg:{width:"smallIcon",height:"smallIcon",cursor:"pointer"}},td:{verticalAlign:"top",wordBreak:"break-word",border:"1px solid",borderColor:"components.primaryTable.body.borderColor","&.stickyColumn":{position:"sticky",left:0,backgroundColor:"components.primaryTable.body.backgroundColor"},".moreInformationButton":{width:"30px",height:"30px",padding:"3px",border:"none",background:"transparent"}}}),td:{p:t(3)},".responsiveTable__additionalInfoContainer":{display:"grid",gridTemplateColumns:c({0:"repeat(2, 1fr)",5:"repeat(4, 1fr)"}),columnGap:3,rowGap:2},".responsiveTable__additionalInfoContainer .responsiveTable__additionalInfoItem.separator":{gridColumnStart:"1",gridColumnEnd:"5",borderBottom:"1px solid",borderBottomColor:"palette.gray.700",height:"auto"}},".editionMode":{border:"3px solid",borderColor:"components.primaryTable.header.borderColor",borderWidth:"1.5px",borderStyle:"dotted"},".stateCell":{width:"50px",maxWidth:"50px",minWidth:"50px",textAlign:"center",verticalAlign:"middle"}},Mt()),{".no__registers":{py:6,minWidth:"200px"},".requiredFilter__Column":{fontWeight:"bold"},".bold":{fontWeight:"bold"},".light":{color:"#6a6a6a"},".additionalInfo__cell, .stateCell":{verticalAlign:"middle"}}),oa={width:"100%",border:"1px solid",borderColor:"primary",borderCollapse:"collapse",thead:{tr:{th:{bg:"primary",color:"white",textAlign:"center",fontWeight:"bold",p:t(4)}}},tbody:{tr:{"td,th":{borderColor:"muted",p:t(4)},"&:not(tr:last-of-type)":{"td,th":{borderBottom:"1px solid"}},"td:not(td:last-child),th:not(th:last-child)":{borderRight:"1px solid"},th:{textAlign:"left",whiteSpace:"nowrap",minWidth:"min-content",width:0}}}},ra={display:"flex",flexDirection:"column",gap:t(2),".responsiveTable__accordionElement__toggler":{variant:"buttons.outline",borderWidth:"1px",display:"flex",gap:t(3),alignItems:"stretch",width:"100%",px:4,py:3,"&:hover h3":{color:"palette.primary.contrastText"},".accordionElement__toggler__checkbox":{flexShrink:0,m:t(2)},".accordionElement__toggler__button":{flexGrow:100,display:"flex",justifyContent:"space-between",py:2,pr:t(2),alignItems:"center",".accordionElement__toggler__label":{flexGrow:100,m:t(0),textAlign:"left",fontSize:16},".accordionElement__toggler__expandIcon":{flexShrink:0,svg:{width:"32px"}}}},".responsiveTable__accordionElement__content":{"& > div":{backgroundColor:"palette.background.paper",transition:"padding-bottom 300ms, padding-top 300ms",px:5},"&.rah-static--height-zero":{"& > div":{py:0}},"&.rah-static--height-auto, &.rah-animating--down":{"& > div":{py:5}},".priority_container":{display:"flex",alignItems:"center"},".priority":{display:"flex"}}},ta={border:"2px solid",borderColor:"printView.list.table.borderColor","td, th":{p:3,textAlign:"left"}},aa={maxHeight:"100%",overflow:"auto",position:"relative",table:{width:"100%"},"&.isLoading":{overflow:"hidden"},".responsiveTable__isLoading":{position:"absolute",top:0,left:0,right:0,bottom:0,background:f(window.currentPalette.background.paper).setAlpha(.7).toRgbString(),zIndex:1,display:"flex",alignItems:"center",justifyContent:"center"},".cell__download__document":{display:"flex",gap:3,alignItems:"center",justifyContent:"start","&, *":{color:"palette.primary.main"},svg:{flexShrink:0}}};var na=Object.defineProperty,lo=Object.getOwnPropertySymbols,ia=Object.prototype.hasOwnProperty,la=Object.prototype.propertyIsEnumerable,co=(o,e,r)=>e in o?na(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r,so=(o,e)=>{for(var r in e||(e={}))ia.call(e,r)&&co(o,r,e[r]);if(lo)for(var r of lo(e))la.call(e,r)&&co(o,r,e[r]);return o};const ca={variant:"layout.common.tables.primary",borderColor:"components.secondaryTable.borderColor","& thead":{"tr:not(.filtersRow):not(.responsiveTable__filters__row)":{"& th, & td":()=>so({},n("components.secondaryTable.header"))}},"& tbody":{tr:so({"&:nth-of-type(2n)":{backgroundColor:"components.secondaryTable.body.evenRowsBackgroundColor"},td:{borderColor:"components.secondaryTable.body.borderColor"},'&[aria-selected="true"]':{backgroundColor:"components.secondaryTable.body.selectedRows.backgroundColor","& td":{borderColor:"components.secondaryTable.body.selectedRows.borderColor"},color:"components.secondaryTable.body.selectedRows.color"},borderBottomWidth:"1px",borderBottomStyle:"solid"},n("components.secondaryTable.body",{states:{disabled:!1,readonly:!1,active:!1,hover:!1,checked:!1,focus:!1,selected:!1}}))}},da={accordion:ra,information:oa,primary:ea,print:ta,responsive:aa,secondary:ca},sa={display:"flex",flexDirection:"column",gap:t(2),".captcha__imageContainer":{border:"1px solid",borderColor:"palette.border.field",p:t(4)},".captcha__inputContainer":{display:"flex",gap:t(2),justifyContent:"stretch",input:{flexGrow:1,width:"100%"},".captcha__buttons":{width:"24px",flexDirection:"column",display:"flex",gap:t(2),flexShrink:0,button:{width:"24px",height:"24px",p:"5px",variant:"buttons.icon-outline",svg:{color:"palette.text.primary",height:"16px",width:"16px"}}}}},pa={captcha:sa};var ua=Object.defineProperty,po=Object.getOwnPropertySymbols,ba=Object.prototype.hasOwnProperty,fa=Object.prototype.propertyIsEnumerable,uo=(o,e,r)=>e in o?ua(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r,ma=(o,e)=>{for(var r in e||(e={}))ba.call(e,r)&&uo(o,r,e[r]);if(po)for(var r of po(e))fa.call(e,r)&&uo(o,r,e[r]);return o};const ga={position:"relative",'[role="tree"]:focus':{outline:"none",".focus":j},ul:{listStyle:"none",p:0},".tree__searchLabelBox":{alignItems:"center",borderRadius:"2px",display:"flex",float:"right",gap:t(3),justifyContent:"center",position:"sticky",right:"4px",top:"4px",transform:"translateX(0)",width:"100%",zIndex:"stickyElements",".tree__loading":{position:"fixed",top:0,right:"4px",height:"iconMd",width:"iconMd",background:"palette.background.paper"},button:{cursor:"pointer"}},".tree__searchLabel":ma({alignItems:"center",display:"flex",gap:t(3),justifyContent:"center",position:"fixed",p:"2px 5px",right:0,top:0},p({backgroundColor:"palette.background.paper"},"selected")),'[role="treeitem"]':{'&[aria-expanded="false"] ul':{display:"none"},'&[aria-selected="true"] > .tree__nodeItemLabel':p({backgroundColor:"palette.background.paper"},"selected"),background:"transparent"},".tree__nodeItemLabel":{display:"flex",flexWrap:"nowrap",gap:3,alignItems:"center",wordBreak:"break-all",".button__content":{textAlign:"left"},"& > *:not(.tree__nodeItemLabelRenderer)":{flexShrink:0,textAlign:"left"},"&:hover":p({backgroundColor:"palette.background.paper"},"hover")},".spacer":{borderLeft:"1px solid",borderLeftColor:"palette.border.section",width:"20px",alignSelf:"stretch"}},ya={primary:ga},ha={forms:pa,modals:Wt,tables:da,trees:ya},va={"@keyframes growHorizontal":{from:{transform:"scaleX(0)"},to:{transform:"scaleY(100%)"}},".hamburguerMenu":{display:"none"},".hamburguerMenu-enter,\n.hamburguerMenu-appear":{display:"block",transform:"scale(0.7)",opacity:0},".hamburguerMenu-enter-active,\n.hamburguerMenu-appear-active":{transform:"translateX(0)",transition:"opacity 150ms, transform 150ms",transformOrigin:"right top",opacity:1},".hamburguerMenu-enter-done,\n.hamburguerMenu-appear-done":{display:"block"},".hamburguerMenu-exit":{display:"block",transform:"scale(1)",opacity:1},".hamburguerMenu-exit-active":{transform:"scale(0.7) translateX(0)",transition:"opacity 150ms, transform 150ms",display:"block",opacity:0,transformOrigin:"right top"},".hamburguerMenu-exit-done":{display:"none"},".modal-enter,\n.modal-appear":{opacity:0,transform:"scale(0.8)"},".modal-enter-active,\n.modal-appear-active":{opacity:1,transform:"translateX(0)",transition:"opacity 150ms, transform 150ms",transitionDelay:"0"},".modal-exit":{opacity:0},".modal-exit-done":{opacity:0,display:"none"},".modal-exit-active":{opacity:0,transform:"scale(100)",transition:"opacity 150ms, transform 150ms",transitionDelay:"0"},".overlayAnimation-enter .overlayAnimation:not(.not-released),\n.overlayAnimation-appear .overlayAnimation:not(.not-released)":{opacity:0},".overlayAnimation-enter-active .overlayAnimation:not(.not-released),\n.overlayAnimation-appear-active .overlayAnimation:not(.not-released)":{opacity:1,transition:"opacity 150ms"},".overlayAnimation-exit":{opacity:1},".overlayAnimation-exit-active":{opacity:0,transition:"opacity 150ms"},".fromRight-enter,\n.fromRight-appear":{transform:"translateX(550px)"},".fromRight-enter-active,\n.fromRight-appear-active":{transition:"transform 150ms",transform:"translateX(0)"},".fromRight-exit":{transform:"translateX(0)"},".fromRight-exit-active":{transition:"transform 150ms",transform:"translateX(550px)"},".notification-enter,\n.notification-appear":{opacity:0,transform:"scale(0.8)"},".notification-enter-active,\n.notification-appear-active":{opacity:1,transform:"translateX(0)",transition:"opacity 150ms, transform 150ms",transitionDelay:"0"},".notification-exit":{opacity:1},".notification-exit-active":{opacity:0,transform:"scale(0.8)",transition:"opacity 150ms, transform 150ms",transitionDelay:"0"}};var xa=Object.defineProperty,bo=Object.getOwnPropertySymbols,wa=Object.prototype.hasOwnProperty,ka=Object.prototype.propertyIsEnumerable,fo=(o,e,r)=>e in o?xa(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r,Y=(o,e)=>{for(var r in e||(e={}))wa.call(e,r)&&fo(o,r,e[r]);if(bo)for(var r of bo(e))ka.call(e,r)&&fo(o,r,e[r]);return o};const mo=Y({"*":{fontFamily:"body",fontWeight:"body",code:{fontFamily:"monospace"},"&:focus":j},body:{minHeight:"100vh"},h1:{fontSize:c({0:26,3:32})},h2:{fontSize:c({0:22,3:28})},h3:{fontSize:c({0:19,3:25})},h4:{fontSize:c({0:18,3:22})},h5:{fontSize:c({0:18,3:22})},h6:{fontSize:c({0:17,3:17})},"h1,h2,h3,h4,h5,h6":{letterSpacing:"heading",lineHeight:"heading",variant:"text.title"},"*:not(h1, h2, h3, h4, h5, h6, code)":{fontFamily:"body",fontSize:16,fontWeight:"body",letterSpacing:"body",lineHeight:"body"},a:{textDecoration:"underline"},"textarea,a":{transition:"color 200ms ease-out",":focus":Y({},j),":focus-visible":Y({},j)},"*:focus":j,ul:{listStyle:"none",listStyleType:"none",margin:0,padding:0},abbr:{"&.required":{textDecoration:"none",border:"none",mx:1,alignSelf:"baseline",fontWeight:"bold",color:"danger"}},table:{borderCollapse:"separate",borderSpacing:0},"& label":{display:"flex","& > span":{mb:t(1),fontWeight:"bold"},"&.required":{position:"relative","&::before":{color:"danger",position:"absolute",content:'"*"',top:0,left:"-10px"},"*:invalid":{borderColor:"danger"}}},".bold":{fontWeight:"bold"}},va),Ca={common:ha,root:mo},Oa={default:{color:"palette.text.primary",fontFamily:"body",fontWeight:"body",fontSize:16,m:t(0),width:"100%"},title:{letterSpacing:"heading",wordBreak:"normal",color:"title",fontFamily:"heading",lineHeight:"heading",fontWeight:"heading"}},$a={alerts:br,breakpoints:["0px","250px","500px","700px","1000px","1260px","1580px"],buttons:vr,colors:dr(),fonts:{body:"Arial",heading:"inherit",monospace:"Menlo, monospace"},fontSizes:Array(60).fill(1).map((o,e)=>e),forms:_t(),layout:Ca,lineHeights:{body:1.5,heading:1.125},letterSpacings:{body:"0.01em",heading:"-0.015em"},radii:{alerts:0,buttons:0,default:0},shadows:{modals:"",tabs:""},space:[0,2,4,8,12,16,24,32,40,48,64,80,96,112,128],sizes:{applicationMenu:"350px",floatingNotifications:"min(550px, calc(100vw - 30px))",root:"992px",mainImage:"64px",twoColumns:"calc(992px + 350px)",twoColumnsCentered:"calc(992px + 350px + 16px)",iconXs:"12px",iconSm:"16px",iconMd:"22px",iconLg:"32px",iconXl:"48px"},text:Oa,zIndices:{stickyElements:600,menu:1e3,maximizedTables:1100,modal:1200,tooltip:1400,notifications:1600,contextMenu:1800},styles:{root:mo},useRootStyles:!0},_a=o=>o;let ja={};new class extends Q{};function go(o){return _a(O($a,{layout:ja},o??{}))}var Sa=Object.defineProperty,yo=Object.getOwnPropertySymbols,Pa=Object.prototype.hasOwnProperty,Ta=Object.prototype.propertyIsEnumerable,ho=(o,e,r)=>e in o?Sa(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r,vo=(o,e)=>{for(var r in e||(e={}))Pa.call(e,r)&&ho(o,r,e[r]);if(yo)for(var r of yo(e))Ta.call(e,r)&&ho(o,r,e[r]);return o};const xo={},F=new class extends Q{};function wo(o){xo[o.path]=o.styles}F.on("newStyles",wo);function ko(o){const[e,r]=To(go(o));return Bo(()=>(r(i=>{F.off("newStyles",wo);let u=vo({},i);return Object.entries(xo).forEach(([l,b])=>{const y=M({},l,b);u=O(u,y)}),u}),F.on("newStyles",i=>{const u=M({},i.path,i.styles);r(l=>O(vo({},l),u))}))),e}var Ia=Object.defineProperty,Ra=Object.defineProperties,Ba=Object.getOwnPropertyDescriptors,Co=Object.getOwnPropertySymbols,Wa=Object.prototype.hasOwnProperty,Da=Object.prototype.propertyIsEnumerable,Oo=(o,e,r)=>e in o?Ia(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r,Ea=(o,e)=>{for(var r in e||(e={}))Wa.call(e,r)&&Oo(o,r,e[r]);if(Co)for(var r of Co(e))Da.call(e,r)&&Oo(o,r,e[r]);return o},Aa=(o,e)=>Ra(o,Ba(e));let $o=-1;function Fa(o){clearTimeout($o),$o=setTimeout(()=>{console.info({theme:o})},100)}const _o=Io({}),za=({children:o,customTheme:e})=>{const r=ko(e);return Fa(r),x(_o.Provider,{value:r,children:x(U,{theme:r,children:x(J,Aa(Ea({},H("layout.root")),{children:o}))})})};export{za as ThemeProvider,_o as ThemeProviderContext,ie as applyStates,E as applyStatesGetColor,I as buildColorsObject,j as focusOutline,p as getColorState,pe as getColorStates,er as getColorsAndStatesByDefinition,n as getColorsAndStatesByPath,ge as getColorsByDefinition,h as getColorsByPath,ue as getOneColorState,R as getPalette,H as getVariant,Yt as injectStyles,Vt as makeStyledComponent,be as parsePalette,c as responsive,C as smallButton,t as spacing,ko as useMainTheme};