aprog 2.3.32 → 2.3.40

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/index.js CHANGED
@@ -1,7 +1,5 @@
1
1
  export {
2
- div, span, button, a, img, meta, label, input, select, option, options, form, hr, textarea,
3
- table, caption, thead, tbody, tr, th, td, pre,
4
- attachCustomTitle, _get, _getAll, GUID, isEmpty, apState, date, pause, apFetch, parseCustomMarkup,
2
+ options, attachCustomTitle, _get, _getAll, GUID, isEmpty, apState, date, pause, apFetch, parseCustomMarkup,
5
3
  chars, isNull, isFloat, isNumeric, isObject, elementToObject, copyText, scrollToTop, scrollToBottom,
6
4
  firstKey, isArray, checkArrays, isNumber, isString, isPromise, ucfirst, deepEqual, nodeListToObject
7
5
  } from './src/general.js';
@@ -21,16 +19,24 @@ export {
21
19
  toSnakeCaseStringPrototype, repeatHTMLElementPrototype,
22
20
  replaceChildrenHTMLElementPrototype
23
21
  } from './src/html.js';
24
- export { prism } from "./src/prism.js";
25
- export { uniquePage } from "./src/pages.js";
26
- export { state, wrap, toast, abort, useTableDrag, callback, json } from "./src/helper.js";
27
- export { loadTranslations, translate } from "./src/translator.js";
28
- export { svg } from "./src/svg.js";
29
- export { Modal, modal, closeAllModals, closeThisModal } from "./src/modal.js";
30
- export { default as AbortError } from './src/classes/AbortError.js';
31
- export { default as SmartWrapper } from './src/classes/SmartWrapper.js';
32
- export { default as StateWrapper } from './src/classes/StateWrapper.js';
33
- export { default as Toast } from './src/classes/Toast.js';
34
- export { ButtonConstructor } from './src/constructs/ButtonConstructor.js';
35
- export { InputConstructor } from './src/constructs/InputConstructor.js';
36
- export { SelectConstructor } from './src/constructs/SelectConstructor.js';
22
+ export {prism} from "./src/prism.js";
23
+ export {uniquePage} from "./src/pages.js";
24
+ export {state, wrap, toast, abort, useTableDrag, callback, json} from "./src/helper.js";
25
+ export {initAprog} from './src/config.js';
26
+ export {loadTranslations, translate} from "./src/translator.js";
27
+ export {svg} from "./src/svg.js";
28
+ export {Modal, modal, closeAllModals, closeThisModal} from "./src/modal.js";
29
+ export {default as AbortError} from './src/classes/AbortError.js';
30
+ export {default as SmartWrapper} from './src/classes/SmartWrapper.js';
31
+ export {default as StateWrapper} from './src/classes/StateWrapper.js';
32
+ export {default as Toast} from './src/classes/Toast.js';
33
+ export {ButtonConstructor} from './src/constructs/ButtonConstructor.js';
34
+ export {InputConstructor} from './src/constructs/InputConstructor.js';
35
+ export {SelectConstructor} from './src/constructs/SelectConstructor.js';
36
+ export {
37
+ div, span, a, button, img, input, select, option,
38
+ label, ul, li, hr, section, header, footer, textarea,
39
+ form, table, thead, tbody, tr, th, td, caption,
40
+ head, meta, body, pre, h1, h2, h3, h4, h5,
41
+ style, script, element
42
+ } from "./src/elements.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aprog",
3
- "version": "2.3.32",
3
+ "version": "2.3.40",
4
4
  "description": "Допоміжна JavaScript-бібліотека для проєктів",
5
5
  "main": "index.js",
6
6
  "exports": {
package/src/config.js ADDED
@@ -0,0 +1,9 @@
1
+ const config = {
2
+ langLoader: null,
3
+ };
4
+
5
+ export const initAprog = (options = {}) => {
6
+ Object.assign(config, options);
7
+ };
8
+
9
+ export const getAprogConfig = () => config;
@@ -0,0 +1,215 @@
1
+ const appendValue = (element, value) => {
2
+ if (value === null || value === undefined || value === false) {
3
+ return;
4
+ }
5
+
6
+ if (Array.isArray(value)) {
7
+ value.forEach(item => appendValue(element, item));
8
+ return;
9
+ }
10
+
11
+ if (value instanceof Node) {
12
+ element.append(value);
13
+ return;
14
+ }
15
+
16
+ element.insertAdjacentHTML("beforeend", String(value));
17
+ };
18
+
19
+ const setStyle = (element, styles) => {
20
+ if (typeof styles === "string") {
21
+ element.style.cssText = styles;
22
+ return;
23
+ }
24
+
25
+ Object.assign(element.style, styles);
26
+ };
27
+
28
+ const setDataset = (element, dataset) => {
29
+ Object.entries(dataset).forEach(([key, value]) => {
30
+ element.dataset[key] = String(value);
31
+ });
32
+ };
33
+
34
+ const setAttributes = (element, attributes = {}) => {
35
+ Object.entries(attributes).forEach(([name, value]) => {
36
+ if (value === null || value === undefined || value === false) {
37
+ return;
38
+ }
39
+
40
+ // content
41
+ if (name === "value" && !["INPUT", "TEXTAREA", "SELECT", "OPTION"].includes(element.tagName)) {
42
+ appendValue(element, value);
43
+ return;
44
+ }
45
+
46
+ // children
47
+ if (name === "children") {
48
+ appendValue(element, value);
49
+ return;
50
+ }
51
+
52
+ // text
53
+ if (name === "text" || name === "textContent") {
54
+ element.textContent = String(value);
55
+ return;
56
+ }
57
+
58
+ // html
59
+ if (name === "html" || name === "innerHTML") {
60
+ element.innerHTML = String(value);
61
+ return;
62
+ }
63
+
64
+ // class
65
+ if (name === "class" || name === "className") {
66
+ if (Array.isArray(value)) {
67
+ element.className = value.filter(Boolean).join(" ");
68
+ } else {
69
+ element.className = String(value);
70
+ }
71
+
72
+ return;
73
+ }
74
+
75
+ // style
76
+ if (name === "style") {
77
+ setStyle(element, value);
78
+ return;
79
+ }
80
+
81
+ // dataset
82
+ if (name === "dataset") {
83
+ setDataset(element, value);
84
+ return;
85
+ }
86
+
87
+ // events
88
+ if (name.startsWith("on") && typeof value === "function") {
89
+ element.addEventListener(name.slice(2).toLowerCase(), value);
90
+
91
+ return;
92
+ }
93
+
94
+ // focus
95
+ if (name === "focus" && value) {
96
+ queueMicrotask(() => element.focus());
97
+ return;
98
+ }
99
+
100
+ // DOM properties
101
+ if (name in element) {
102
+ try {
103
+ element[name] = value;
104
+ return;
105
+ } catch (_) {
106
+ // fallback → setAttribute
107
+ }
108
+ }
109
+
110
+ // dataSomething → data-something
111
+ if (name.startsWith("data") && name.length > 4) {
112
+ const attribute = name
113
+ .replace(/([A-Z])/g, "-$1")
114
+ .toLowerCase();
115
+
116
+ element.setAttribute(attribute, String(value));
117
+ return;
118
+ }
119
+
120
+ // ariaSomething → aria-something
121
+ if (name.startsWith("aria") && name.length > 4) {
122
+ const attribute = name
123
+ .replace(/([A-Z])/g, "-$1")
124
+ .toLowerCase();
125
+
126
+ element.setAttribute(attribute, String(value));
127
+ return;
128
+ }
129
+
130
+ // boolean attribute
131
+ if (value === true) {
132
+ element.setAttribute(name, "");
133
+ return;
134
+ }
135
+
136
+ // everything else
137
+ element.setAttribute(name, String(value));
138
+ });
139
+
140
+ return element;
141
+ };
142
+
143
+ export const element = (tag = "div", attributes = {}) => {
144
+ return setAttributes(document.createElement(tag), attributes);
145
+ };
146
+
147
+ export const div = (attributes = {}) => element("div", attributes);
148
+
149
+ export const span = (attributes = {}) => element("span", attributes);
150
+
151
+ export const a = (attributes = {}) => element("a", attributes);
152
+
153
+ export const button = (attributes = {}) => element("button", attributes);
154
+
155
+ export const input = (attributes = {}) => element("input", attributes);
156
+
157
+ export const label = (attributes = {}) => element("label", attributes);
158
+
159
+ export const form = (attributes = {}) => element("form", attributes);
160
+
161
+ export const textarea = (attributes = {}) => element("textarea", attributes);
162
+
163
+ export const pre = (attributes = {}) => element("pre", attributes);
164
+
165
+ export const select = (attributes = {}) => element("select", attributes);
166
+
167
+ export const option = (attributes = {}) => element("option", attributes);
168
+
169
+ export const img = (attributes = {}) => element("img", attributes);
170
+
171
+ export const table = (attributes = {}) => element("table", attributes);
172
+
173
+ export const caption = (attributes = {}) => element("caption", attributes);
174
+
175
+ export const thead = (attributes = {}) => element("thead", attributes);
176
+
177
+ export const tbody = (attributes = {}) => element("tbody", attributes);
178
+
179
+ export const tr = (attributes = {}) => element("tr", attributes);
180
+
181
+ export const th = (attributes = {}) => element("th", attributes);
182
+
183
+ export const td = (attributes = {}) => element("td", attributes);
184
+
185
+ export const h1 = (attributes = {}) => element("h1", attributes);
186
+
187
+ export const h2 = (attributes = {}) => element("h2", attributes);
188
+
189
+ export const h3 = (attributes = {}) => element("h3", attributes);
190
+
191
+ export const h4 = (attributes = {}) => element("h4", attributes);
192
+
193
+ export const h5 = (attributes = {}) => element("h5", attributes);
194
+
195
+ export const section = (attributes = {}) => element("section", attributes);
196
+
197
+ export const header = (attributes = {}) => element("header", attributes);
198
+
199
+ export const footer = (attributes = {}) => element("footer", attributes);
200
+
201
+ export const ul = (attributes = {}) => element("ul", attributes);
202
+
203
+ export const li = (attributes = {}) => element("li", attributes);
204
+
205
+ export const hr = (attributes = {}) => element("hr", attributes);
206
+
207
+ export const head = (attributes = {}) => element("head", attributes);
208
+
209
+ export const body = (attributes = {}) => element("body", attributes);
210
+
211
+ export const meta = (attributes = {}) => element("meta", attributes);
212
+
213
+ export const style = (attributes = {}) => element("style", attributes);
214
+
215
+ export const script = (attributes = {}) => element("script", attributes);
package/src/general.js CHANGED
@@ -1351,6 +1351,230 @@ export const img = (attributes = {}) => {
1351
1351
  return img;
1352
1352
  };
1353
1353
 
1354
+ export const h1 = (attributes = {}) => {
1355
+ let h1 = document.createElement("h1");
1356
+ if (attributes) {
1357
+ Object.entries(attributes).forEach(([name, attrValue]) => {
1358
+ if ((name.startsWith('on') || name.startsWith("mouse")) && typeof attrValue === 'function') {
1359
+ const eventType = name.startsWith("mouse") ? name.toLowerCase() : name.slice(2).toLowerCase();
1360
+ h1.addEventListener(eventType, attrValue);
1361
+ } else {
1362
+ switch (name) {
1363
+ case "class":
1364
+ case "className":
1365
+ h1.className = String(attrValue);
1366
+ break;
1367
+ case "value":
1368
+ if (isArray(attrValue)) {
1369
+ attrValue.forEach((element) => {
1370
+ isHtmlElement(element) ? h1.append(element) : h1.innerHTML = String(element);
1371
+ });
1372
+ } else {
1373
+ if (isHtmlElement(attrValue)) {
1374
+ h1.appendChild(attrValue);
1375
+ } else {
1376
+ h1.innerHTML = String(attrValue);
1377
+ h1.title = String(attrValue);
1378
+ }
1379
+ }
1380
+ break;
1381
+ case "style":
1382
+ Object.entries(attrValue).forEach(([styleName, styleValue]) => {
1383
+ switch (styleName) {
1384
+ case "zIndex":
1385
+ h1.style[styleName] = `99999${styleValue}`;
1386
+ break;
1387
+ default:
1388
+ h1.style[styleName] = styleValue;
1389
+ break;
1390
+ }
1391
+ });
1392
+ break;
1393
+ default:
1394
+ if (name.startsWith("data")) {
1395
+ const kebabName = name
1396
+ .replace(/^data/, "data")
1397
+ .replace(/([A-Z])/g, "-$1")
1398
+ .toLowerCase();
1399
+ h1.setAttribute(kebabName, String(attrValue));
1400
+ } else {
1401
+ h1.setAttribute(name, String(attrValue));
1402
+ }
1403
+ }
1404
+ }
1405
+ });
1406
+ }
1407
+ return h1;
1408
+ };
1409
+
1410
+ export const h2 = (attributes = {}) => {
1411
+ let h2 = document.createElement("h2");
1412
+ if (attributes) {
1413
+ Object.entries(attributes).forEach(([name, attrValue]) => {
1414
+ if ((name.startsWith('on') || name.startsWith("mouse")) && typeof attrValue === 'function') {
1415
+ const eventType = name.startsWith("mouse") ? name.toLowerCase() : name.slice(2).toLowerCase();
1416
+ h2.addEventListener(eventType, attrValue);
1417
+ } else {
1418
+ switch (name) {
1419
+ case "class":
1420
+ case "className":
1421
+ h2.className = String(attrValue);
1422
+ break;
1423
+ case "value":
1424
+ if (isArray(attrValue)) {
1425
+ attrValue.forEach((element) => {
1426
+ isHtmlElement(element) ? h2.append(element) : h2.innerHTML = String(element);
1427
+ });
1428
+ } else {
1429
+ if (isHtmlElement(attrValue)) {
1430
+ h2.appendChild(attrValue);
1431
+ } else {
1432
+ h2.innerHTML = String(attrValue);
1433
+ h2.title = String(attrValue);
1434
+ }
1435
+ }
1436
+ break;
1437
+ case "style":
1438
+ Object.entries(attrValue).forEach(([styleName, styleValue]) => {
1439
+ switch (styleName) {
1440
+ case "zIndex":
1441
+ h2.style[styleName] = `99999${styleValue}`;
1442
+ break;
1443
+ default:
1444
+ h2.style[styleName] = styleValue;
1445
+ break;
1446
+ }
1447
+ });
1448
+ break;
1449
+ default:
1450
+ if (name.startsWith("data")) {
1451
+ const kebabName = name
1452
+ .replace(/^data/, "data")
1453
+ .replace(/([A-Z])/g, "-$1")
1454
+ .toLowerCase();
1455
+ h2.setAttribute(kebabName, String(attrValue));
1456
+ } else {
1457
+ h2.setAttribute(name, String(attrValue));
1458
+ }
1459
+ }
1460
+ }
1461
+ });
1462
+ }
1463
+ return h2;
1464
+ };
1465
+
1466
+ export const h3 = (attributes = {}) => {
1467
+ let h3 = document.createElement("h3");
1468
+ if (attributes) {
1469
+ Object.entries(attributes).forEach(([name, attrValue]) => {
1470
+ if ((name.startsWith('on') || name.startsWith("mouse")) && typeof attrValue === 'function') {
1471
+ const eventType = name.startsWith("mouse") ? name.toLowerCase() : name.slice(2).toLowerCase();
1472
+ h3.addEventListener(eventType, attrValue);
1473
+ } else {
1474
+ switch (name) {
1475
+ case "class":
1476
+ case "className":
1477
+ h3.className = String(attrValue);
1478
+ break;
1479
+ case "value":
1480
+ if (isArray(attrValue)) {
1481
+ attrValue.forEach((element) => {
1482
+ isHtmlElement(element) ? h3.append(element) : h3.innerHTML = String(element);
1483
+ });
1484
+ } else {
1485
+ if (isHtmlElement(attrValue)) {
1486
+ h3.appendChild(attrValue);
1487
+ } else {
1488
+ h3.innerHTML = String(attrValue);
1489
+ h3.title = String(attrValue);
1490
+ }
1491
+ }
1492
+ break;
1493
+ case "style":
1494
+ Object.entries(attrValue).forEach(([styleName, styleValue]) => {
1495
+ switch (styleName) {
1496
+ case "zIndex":
1497
+ h3.style[styleName] = `99999${styleValue}`;
1498
+ break;
1499
+ default:
1500
+ h3.style[styleName] = styleValue;
1501
+ break;
1502
+ }
1503
+ });
1504
+ break;
1505
+ default:
1506
+ if (name.startsWith("data")) {
1507
+ const kebabName = name
1508
+ .replace(/^data/, "data")
1509
+ .replace(/([A-Z])/g, "-$1")
1510
+ .toLowerCase();
1511
+ h3.setAttribute(kebabName, String(attrValue));
1512
+ } else {
1513
+ h3.setAttribute(name, String(attrValue));
1514
+ }
1515
+ }
1516
+ }
1517
+ });
1518
+ }
1519
+ return h3;
1520
+ };
1521
+
1522
+ export const element = (tag = "div", attributes = {}) => {
1523
+ let el = document.createElement(tag);
1524
+ if (attributes) {
1525
+ Object.entries(attributes).forEach(([name, attrValue]) => {
1526
+ if ((name.startsWith('on') || name.startsWith("mouse")) && typeof attrValue === 'function') {
1527
+ const eventType = name.startsWith("mouse") ? name.toLowerCase() : name.slice(2).toLowerCase();
1528
+ el.addEventListener(eventType, attrValue);
1529
+ } else {
1530
+ switch (name) {
1531
+ case "class":
1532
+ case "className":
1533
+ el.className = String(attrValue);
1534
+ break;
1535
+ case "value":
1536
+ if (isArray(attrValue)) {
1537
+ attrValue.forEach((element) => {
1538
+ isHtmlElement(element) ? el.append(element) : el.innerHTML = String(element);
1539
+ });
1540
+ } else {
1541
+ if (isHtmlElement(attrValue)) {
1542
+ el.appendChild(attrValue);
1543
+ } else {
1544
+ el.innerHTML = String(attrValue);
1545
+ el.title = String(attrValue);
1546
+ }
1547
+ }
1548
+ break;
1549
+ case "style":
1550
+ Object.entries(attrValue).forEach(([styleName, styleValue]) => {
1551
+ switch (styleName) {
1552
+ case "zIndex":
1553
+ el.style[styleName] = `99999${styleValue}`;
1554
+ break;
1555
+ default:
1556
+ el.style[styleName] = styleValue;
1557
+ break;
1558
+ }
1559
+ });
1560
+ break;
1561
+ default:
1562
+ if (name.startsWith("data")) {
1563
+ const kebabName = name
1564
+ .replace(/^data/, "data")
1565
+ .replace(/([A-Z])/g, "-$1")
1566
+ .toLowerCase();
1567
+ el.setAttribute(kebabName, String(attrValue));
1568
+ } else {
1569
+ el.setAttribute(name, String(attrValue));
1570
+ }
1571
+ }
1572
+ }
1573
+ });
1574
+ }
1575
+ return el;
1576
+ };
1577
+
1354
1578
  export const apState = (initialValue) => {
1355
1579
  let state = initialValue;
1356
1580
  const getState = () => state;
package/src/svg.js CHANGED
@@ -72,7 +72,7 @@ export const svg = ({
72
72
  fill="${fill}"
73
73
  stroke="${stroke}"
74
74
  stroke-width="${strokeWidth}"
75
- viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
75
+ viewBox="0 0 101 101" xmlns="http://www.w3.org/2000/svg">
76
76
  <g>
77
77
  <path d="M70.063,27.182c1.398,1.175,3.174,1.821,4.996,1.821c2.312,0,4.488-1.014,5.974-2.782 c2.76-3.289,2.329-8.211-0.96-10.973c-1.4-1.175-3.176-1.822-5-1.822c-2.311,0-4.487,1.014-5.971,2.782 C66.341,19.498,66.773,24.419,70.063,27.182z"></path>
78
78
  <path d="M88.445,36.096c-0.483,0-0.971,0.043-1.448,0.127c-4.485,0.791-7.493,5.086-6.702,9.573 c0.696,3.955,4.111,6.825,8.119,6.825c0.482,0,0.972-0.043,1.451-0.126c4.485-0.792,7.492-5.086,6.701-9.571 C95.868,38.968,92.452,36.096,88.445,36.096z"></path>
package/src/translator.js CHANGED
@@ -1,5 +1,6 @@
1
1
  // Об'єкт для зберігання завантажених перекладів
2
2
  import {isEmpty} from "./general.js";
3
+ import {getAprogConfig} from "./config.js";
3
4
 
4
5
  const translations = {};
5
6
  let translationsLoaded = false;
@@ -10,8 +11,20 @@ let translationsLoaded = false;
10
11
  */
11
12
  export const loadTranslations = async (language = "uk") => {
12
13
  try {
13
- const translationsModule = await import(`../../../resources/lang/${language}.json`);
14
- Object.assign(translations, translationsModule);
14
+ const { langLoader } = getAprogConfig();
15
+
16
+ if (!langLoader) {
17
+ throw new Error("langLoader is not configured");
18
+ }
19
+
20
+ const module = await langLoader(language);
21
+
22
+ Object.keys(translations).forEach(key => {
23
+ delete translations[key];
24
+ });
25
+
26
+ Object.assign(translations, module.default ?? module);
27
+
15
28
  translationsLoaded = true;
16
29
  } catch (error) {
17
30
  console.error(`Помилка завантаження перекладів для мови "${language}":`, error);
@@ -30,10 +43,15 @@ export const translate = (key, values = {}, def = "") => {
30
43
  console.warn(`Переклади ще не завантажені. Ключ: "${key}"`);
31
44
  return !isEmpty(def) ? def : key;
32
45
  }
33
- let translation = translations[key] || key;
34
- // Замінити підстановки {key} у перекладі
46
+
47
+ let translation = translations[key];
48
+ if (isEmpty(translation)) {
49
+ translation = !isEmpty(def) ? def : key;
50
+ }
51
+
35
52
  for (const [placeholder, value] of Object.entries(values)) {
36
- translation = translation.replace(`:${placeholder}`, value.toString());
53
+ translation = translation.replaceAll(`:${placeholder}`, value.toString());
37
54
  }
38
- return !isEmpty(def) ? def : translation;
55
+
56
+ return translation;
39
57
  };
package/src/css/root.css DELETED
@@ -1,86 +0,0 @@
1
- :root {
2
- --c-blue: #0088ff;
3
- --c-green: #008800;
4
- --c-red: #ff2800;
5
- --c-orange: #ff8800;
6
- --c-gold: #ffd700;
7
- --c-yellow: #ffff00;
8
- --c-gray: #999999;
9
- --c-x-light: #F0E1D2;
10
- --c-x-light-rgb: rgb(240,225,210);
11
- /*--c-black: #01090f;*/
12
- --c-black: #333333;
13
- --c-black-rgb: rgb(1,9,15);
14
- --c-dark: #021727;
15
- --c-dark-rgb: rgb(2,23,39);
16
- --c-prev-dark: #032640;
17
- --c-prev-dark-rgb: rgb(3,38,64);
18
- --c-default: #043458;
19
- --c-default-rgb: rgb(4,52,88);
20
- --c-prev-light: #054270;
21
- --c-prev-light-rgb: rgb(5,66,112);
22
- --c-light: #065189;
23
- --c-light-rgb: rgb(6,81,137);
24
- --c-super-light: #075fa1;
25
- --c-super-light-rgb: rgb(7,95,161);
26
- --c-bright: #086db9;
27
- --c-bright-rgb: rgb(8,109,185);
28
- --c-prev-bright: #097cd2;
29
- --c-prev-bright-rgb: rgb(9,124,210);
30
- --c-vivid: #0a8aea;
31
- --c-vivid-rgb: rgb(10,138,234);
32
- --c-sky: #1897f5;
33
- --c-sky-rgb: rgb(24,151,245);
34
- --c-soft-sky: #31a2f6;
35
- --c-soft-sky-rgb: rgb(49,162,246);
36
- --c-light-sky: #49adf7;
37
- --c-light-sky-rgb: rgb(73,173,247);
38
- --c-cloud: #61b8f8;
39
- --c-cloud-rgb: rgb(97,184,248);
40
- --c-bright-cloud: #7ac3f9;
41
- --c-bright-cloud-rgb: rgb(122,195,249);
42
- --c-soft-cloud: #92cefa;
43
- --c-soft-cloud-rgb: rgb(146,206,250);
44
- --c-lighter-cloud: #aad9fb;
45
- --c-lighter-cloud-rgb: rgb(170,217,251);
46
- --c-fade-cloud: #c3e4fc;
47
- --c-fade-cloud-rgb: rgb(195,228,252);
48
- --c-pale-blue: #dbeffd;
49
- --c-pale-blue-rgb: rgb(219,239,253);
50
- --c-near-white: #f3fafe;
51
- --c-near-white-rgb: rgb(243,250,254);
52
- --c-white: #ffffff;
53
- --c-white-rgb: rgb(255,255,255);
54
- --1px: 0.0625rem;
55
- --05px: 0.0313rem;
56
- --size-xxxs: 8px;
57
- --size-xxs: 10px;
58
- --size-xs: 12px;
59
- --size-sm: 14px;
60
- --size-md: 16px;
61
- --size-lg: 18px;
62
- --size-xl: 20px;
63
- --size-xxl: 24px;
64
- --size-xxxl: 32px;
65
- --padding-container: calc(100% - 4rem);
66
- --box-shadow: 0 3px 6px 0 rgba(1,9,15, 0.2), 0 3px 6px 0 rgba(1,9,15, 0.19);
67
- --box-shadow-invert: inset 0 3px 6px 0 rgba(1,9,15, 0.4);
68
- --box-shadow-round: 0 0 6px 0 rgba(1,9,15, 0.4), 0 0 6px 0 rgba(1,9,15, 0.39);
69
- --box-shadow-round-invert: inset 0 0 6px 0 rgba(1,9,15, 0.4);
70
- /*--btn-shadow: 0 3px 8px 0 rgba(4, 52, 88, 0.2), 0 3px 20px 0 rgba(4, 52, 88, 0.19);*/
71
- --btn-shadow: 0 3px 8px 0 rgba(1,9,15, 0.2), 0 3px 20px 0 rgba(1,9,15, 0.19);
72
- --maxIndex: 2147483647;
73
- --allTransition100Linear: all 100ms linear;
74
- --allTransition700: all 700ms ease-in-out;
75
- --border-radius: 0.5rem;
76
-
77
- /* Glass Style */
78
- --glass-bg: rgba(255,255,255,.5);
79
- --glass-super-bg: rgba(255,255,255,.7);
80
- --glass-blur: blur(2px);
81
- --glass-super-blur: blur(6px);
82
- --glass-border: var(--05px) solid var(--c-white);
83
- --glass-radius: 0.5rem;
84
- --glass-shadow: 0 3px 6px rgba(0,0,0,.5);
85
- --glass-shadow-invert: inset 0 3px 6px rgba(0,0,0,.5);
86
- }
@@ -1,129 +0,0 @@
1
- @import "root.css";
2
-
3
- .aprog-btn {
4
- height: 38px;
5
- padding: 0.3rem 0.7rem;
6
- align-items: center;
7
- justify-content: center;
8
- font-size: 1rem;
9
- color: var(--c-black);
10
- background-color: var(--glass-bg);
11
- backdrop-filter: var(--glass-blur);
12
- -webkit-backdrop-filter: var(--glass-blur);
13
- border: var(--glass-border);
14
- border-radius: var(--glass-radius);
15
- box-shadow: var(--glass-shadow);
16
- transition: var(--allTransition100Linear);
17
- cursor: pointer;
18
- }
19
-
20
- .aprog-input, .aprog-select {
21
- min-width: 150px;
22
- width: calc(100% - 30px);
23
- height: 38px;
24
- padding: 0 15px;
25
- font-size: var(--size-sm);
26
- font-weight: 600;
27
- color: var(--c-black);
28
- background-color: var(--glass-bg);
29
- backdrop-filter: var(--glass-blur);
30
- -webkit-backdrop-filter: var(--glass-blur);
31
- border-left: 1px solid var(--c-black);
32
- border-right: 1px solid var(--c-black);
33
- border-radius: var(--glass-radius);
34
- box-shadow: var(--glass-shadow-invert);
35
- outline: none;
36
- }
37
-
38
- .aprog-select {
39
-
40
- }
41
-
42
- .aprog-loader {
43
- /*position: absolute;*/
44
- /*top: 50%;*/
45
- /*left: 50%;*/
46
- /*transform: translate(-50%, -50%);*/
47
- /*width: 35px;*/
48
- /*height: 35px;*/
49
- animation: spin 1s linear infinite;
50
- }
51
-
52
- .aprog-modal {
53
- position: fixed;
54
- top: 50%;
55
- left: 50%;
56
- min-width: 600px;
57
- min-height: 300px;
58
- width: auto;
59
- height: auto;
60
- padding: 20px;
61
- display: flex;
62
- flex-direction: column;
63
- align-items: center;
64
- justify-content: center;
65
- gap: 10px;
66
- background-color: var(--c-white);
67
- border-radius: var(--border-radius);
68
- transform: translate(-50%, -50%);
69
- box-shadow: var(--box-shadow);
70
- z-index: 99999;
71
- }
72
- .aprog-background-modal {
73
- position: fixed;
74
- top: 0;
75
- left: 0;
76
- width: 100%;
77
- height: 100vh;
78
- background-color: rgba(255,255,255, 0.3);
79
- backdrop-filter: blur(4px);
80
- }
81
- .aprog-block-modal {
82
- width: calc(100% - 1rem);
83
- height: calc(100% - 1rem);
84
- padding: 0.5rem;
85
- display: flex;
86
- flex-direction: column;
87
- align-items: center;
88
- justify-content: center;
89
- overflow: hidden;
90
- gap: 20px;
91
- }
92
- .aprog-title-modal {
93
- width: 100%;
94
- display: flex;
95
- align-items: center;
96
- justify-content: center;
97
- font-size: 20px;
98
- font-weight: 600;
99
- text-align: center;
100
- }
101
- .aprog-block-btns-modal {
102
- display: flex;
103
- align-items: center;
104
- justify-content: center;
105
- gap: 20px;
106
- }
107
- .aprog-close {
108
- position: absolute;
109
- top: 10px;
110
- left: 10px;
111
- width: 20px;
112
- height: 20px;
113
- display: flex;
114
- align-items: center;
115
- justify-content: center;
116
- color: var(--c-white);
117
- stroke: var(--c-white);
118
- fill: var(--c-white);
119
- background-color: var(--c-red);
120
- border-radius: 50%;
121
- box-shadow: var(--box-shadow);
122
- transition: var(--allTransition700);
123
- cursor: pointer;
124
- }
125
-
126
- @keyframes spin {
127
- 0% { transform: rotate(0deg); }
128
- 100% { transform: rotate(360deg); }
129
- }