@soxa-ui/theme-base 0.5.0 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@soxa-ui/theme-base",
3
- "version": "0.5.0",
3
+ "version": "0.6.0",
4
4
  "description": "Общий слой тем Soxa UI: сброс частей библиотеки, знак направления письма и структура частей с числами в переменных — чистый CSS, без препроцессора, — и плагины раскладки для поведения темы",
5
5
  "keywords": [
6
6
  "soxa",
@@ -47,8 +47,8 @@
47
47
  "test": "vitest run"
48
48
  },
49
49
  "peerDependencies": {
50
- "@soxa-ui/core": "^0.5.0",
51
- "@soxa-ui/plugins": "^0.5.0"
50
+ "@soxa-ui/core": "^0.6.0",
51
+ "@soxa-ui/plugins": "^0.6.0"
52
52
  },
53
53
  "devDependencies": {
54
54
  "postcss": "^8.5.9",
@@ -39,10 +39,6 @@
39
39
  --so-drawer-gap: initial;
40
40
  }
41
41
 
42
- .so-drawer__backdrop[data-contained='true'] {
43
- position: absolute;
44
- }
45
-
46
42
  .so-drawer {
47
43
  --so-modal-spacing-factor: var(--so-drawer-spacing-factor);
48
44
  position: fixed;
package/src/modal.css CHANGED
@@ -1,56 +1,20 @@
1
- /* ─── Модальный слой ─────────────────────────────────────────
2
- * Общее у модального окна (Dialog) и выезжающей панели (Drawer). Анатомия у
3
- * них одна: корень — сама панель, подложка — её сосед, раньше в DOM, а внутри
4
- * панели — заголовок, тело, подвал и кнопки шапки, которые стоят в DOM
5
- * последними, а в ряд заголовка их переносят области сетки. Своё у
6
- * компонента — место и размер, колонки и строки сетки и состав кнопок шапки
7
- * (`components/dialog.css`, `components/drawer.css`).
8
- *
9
- * .so-dialog__backdrop, .so-drawer__backdrop подложка
10
- * .so-dialog, .so-drawer панель — сетка
11
- * .so-…__title заголовок, `h2`
12
- * .so-…__body тело — прокручивается оно
13
- * .so-…__footer подвал — ряд действий
14
- * .so-dialog__maximize, .so-…__close кнопки шапки — Button
15
- *
16
- * Подложка — на весь экран, под панелью. Она обязательная разметка, а не
17
- * украшение: фон под панелью скрыт от скринридера, но не от указателя, и к
18
- * странице его не пускает только она. Нажатие по ней плагины слоя считают
19
- * нажатием мимо панели. `z-index` подложке и панели пишет код, одним числом:
20
- * панель рисуется поверх просто порядком.
21
- *
22
- * Прокручивается тело, а не панель, поэтому шапка, подвал и кнопки остаются на
23
- * месте: панель — сетка, и строка тела сжимается до остатка высоты. Отступ —
24
- * внутри прокрутки: у края прокручиваемой области обрезалось бы кольцо фокуса
25
- * вложенного контрола. Прокрутка до конца не переходит на страницу под
26
- * панелью, а длинное слово переносится, а не заводит полосу по горизонтали.
27
- * Пустые заголовок и подвал места не занимают: тело тогда начинается или
28
- * кончается у края панели полным отступом.
29
- *
30
- * Кнопки шапки — квадрат высоты Button своего размера (`normal`: размера у них
31
- * нет), в конце строки заголовка, каждая по центру его первой строки:
32
- * заголовок переносится — кнопки остаются наверху. Строка заголовка —
33
- * переменная, и от неё считается место кнопок: разойдись они, кнопка съехала
34
- * бы с заголовка молча. Промежуток между кнопками держит первая из них, а
35
- * угол — последняя: её значок отстоит от края панели на тот же отступ, что
36
- * текст заголовка с другой стороны. Значок в квадрате отстоит от его края на
37
- * четверть высоты, поэтому до края панели — отступ без этой четверти.
38
- *
39
- * Таблица прямо в теле — её окно (`.so-table__viewport`) прямой ребёнок тела:
40
- * закреплённая шапка встаёт к краю тела, а не под отступ
41
- * (`--so-table-head-offset` — минус отступ сверху, таблица наследует его от
42
- * окна). Закреплённое браузер ставит под отступ контейнера, и в отступе над
43
- * шапкой проступали бы строки, которые уходят под неё. Только прямой ребёнок:
44
- * глубже у таблицы бывает свой контейнер прокрутки, и сдвиг тела унёс бы её
45
- * шапку за его край. Контекст нулевой специфичности — свой сдвиг таблицы
46
- * сильнее.
47
- *
48
- * Отступы, промежутки и строка заголовка — переменные корня документа;
49
- * умолчания — числа темы oren, тема задаёт свои на корне документа.
50
- *
51
- * Облик — вуаль подложки, поверхность, кромка, тень и скругление панели, кегль
52
- * и начертание заголовка, вид кнопок шапки, проявление, въезд и жест — рисует
53
- * тема. */
1
+ /* Dialog, AlertDialog and Drawer share the modal layout.
2
+ * The backdrop precedes the panel in the DOM and uses the same z-index. It
3
+ * covers the viewport or the positioned container and receives outside presses.
4
+ * The panel is a grid. Its title and footer collapse when empty, and its body
5
+ * scrolls independently. Body padding keeps nested focus rings inside the
6
+ * scrollport. The grid places header buttons after the title visually while
7
+ * DOM order keeps them last for tab navigation.
8
+ * Keep padding inside the scrollport so the edge stays clear of the controls.
9
+ * The body contains overscroll and wraps long words. A table directly in it
10
+ * pins its header to the body edge using the negative body padding. Keep
11
+ * the table selector at zero specificity so the table can override this.
12
+ * Header buttons are square and centered on the first title line. The same
13
+ * variable sets the title line height and the center of the button. The
14
+ * gap belongs to the first of the buttons, and the inset of the last keeps
15
+ * its icon aligned with the end padding opposite the title.
16
+ * The theme sets padding, gaps, title line height and backdrop appearance.
17
+ */
54
18
 
55
19
  :root {
56
20
  --so-modal-padding: initial;
@@ -60,13 +24,15 @@
60
24
  --so-modal-button-gap: initial;
61
25
  }
62
26
 
63
- .so-dialog__backdrop,
64
- .so-drawer__backdrop,
65
- .so-alert-dialog__backdrop {
27
+ .so-backdrop {
66
28
  position: fixed;
67
29
  inset: 0;
68
30
  }
69
31
 
32
+ .so-backdrop[data-contained='true'] {
33
+ position: absolute;
34
+ }
35
+
70
36
  .so-dialog,
71
37
  .so-drawer,
72
38
  .so-alert-dialog {
@@ -43,6 +43,12 @@
43
43
  "description": "Overlapping row of the avatars supplied by the application.",
44
44
  "scope": "Avatar.Group"
45
45
  },
46
+ {
47
+ "name": "so-backdrop",
48
+ "sources": ["packages/core/src/components/base/modal-layer/backdrop.class.ts"],
49
+ "description": "Decorative backdrop rendered beside a modal panel.",
50
+ "scope": "backdrop"
51
+ },
46
52
  {
47
53
  "name": "so-badge",
48
54
  "sources": ["packages/core/src/components/custom/badge/badge.class.ts"],
@@ -529,19 +535,6 @@
529
535
  "description": "AlertDialog action emission.",
530
536
  "scope": "AlertDialog"
531
537
  },
532
- {
533
- "name": "so-alert-dialog__backdrop",
534
- "sources": [
535
- "packages/ui/angular/src/components/alert-dialog/alert-dialog.component.html",
536
- "packages/ui/react/src/components/alert-dialog/AlertDialog.tsx",
537
- "packages/ui/solid/src/components/alert-dialog/AlertDialog.tsx",
538
- "packages/ui/svelte/src/components/alert-dialog/AlertDialog.svelte",
539
- "packages/ui/vue/src/components/alert-dialog/AlertDialog.vue",
540
- "packages/ui/webc/src/components/alert-dialog/alert-dialog.template.ts"
541
- ],
542
- "description": "AlertDialog backdrop emission.",
543
- "scope": "AlertDialog"
544
- },
545
538
  {
546
539
  "name": "so-alert-dialog__body",
547
540
  "sources": [
@@ -1435,19 +1428,6 @@
1435
1428
  "description": "trigger part of date picker. Availability follows the rendered component structure.",
1436
1429
  "scope": "so-date-picker"
1437
1430
  },
1438
- {
1439
- "name": "so-dialog__backdrop",
1440
- "sources": [
1441
- "packages/ui/angular/src/components/dialog/dialog.component.html",
1442
- "packages/ui/react/src/components/dialog/Dialog.tsx",
1443
- "packages/ui/solid/src/components/dialog/Dialog.tsx",
1444
- "packages/ui/svelte/src/components/dialog/Dialog.svelte",
1445
- "packages/ui/vue/src/components/dialog/Dialog.vue",
1446
- "packages/ui/webc/src/components/dialog/dialog.template.ts"
1447
- ],
1448
- "description": "backdrop part of dialog. Availability follows the rendered component structure.",
1449
- "scope": "so-dialog"
1450
- },
1451
1431
  {
1452
1432
  "name": "so-dialog__body",
1453
1433
  "sources": [
@@ -1519,19 +1499,6 @@
1519
1499
  "description": "item part of drag and drop. Availability follows the rendered component structure.",
1520
1500
  "scope": "so-drag-and-drop"
1521
1501
  },
1522
- {
1523
- "name": "so-drawer__backdrop",
1524
- "sources": [
1525
- "packages/ui/angular/src/components/drawer/drawer.component.html",
1526
- "packages/ui/react/src/components/drawer/Drawer.tsx",
1527
- "packages/ui/solid/src/components/drawer/Drawer.tsx",
1528
- "packages/ui/svelte/src/components/drawer/Drawer.svelte",
1529
- "packages/ui/vue/src/components/drawer/Drawer.vue",
1530
- "packages/ui/webc/src/components/drawer/drawer.template.ts"
1531
- ],
1532
- "description": "backdrop part of drawer. Availability follows the rendered component structure.",
1533
- "scope": "so-drawer"
1534
- },
1535
1502
  {
1536
1503
  "name": "so-drawer__body",
1537
1504
  "sources": [
@@ -3257,6 +3224,7 @@
3257
3224
  {
3258
3225
  "name": "--view-",
3259
3226
  "sources": [
3227
+ "packages/core/src/components/base/modal-layer/backdrop.class.ts",
3260
3228
  "packages/core/src/components/custom/accordion/accordion.class.ts",
3261
3229
  "packages/core/src/components/custom/alert/alert.class.ts",
3262
3230
  "packages/core/src/components/custom/badge/badge.class.ts",
@@ -3267,11 +3235,13 @@
3267
3235
  "packages/core/src/components/custom/radio-group/radio-group.class.ts",
3268
3236
  "packages/core/src/components/custom/tabs/tabs.class.ts",
3269
3237
  "packages/core/src/components/custom/tags/tags.class.ts",
3238
+ "packages/core/src/components/custom/toasts/item/item.class.ts",
3239
+ "packages/core/src/components/custom/toasts/toasts.class.ts",
3270
3240
  "packages/core/src/components/custom/toggle-group/toggle-group.class.ts"
3271
3241
  ],
3272
3242
  "pattern": "so-<block>--view-<value>",
3273
3243
  "description": "Theme-defined visual treatment; absent when unset.",
3274
- "scope": "Alert, Badge, Button, CheckBox, RadioGroup/items, Tabs, Accordion/items, Tags/items, ListBox/Select rows",
3244
+ "scope": "Alert, Badge, Button, CheckBox, RadioGroup/items, Tabs, Accordion/items, Tags/items, ListBox/Select rows, Toasts and items",
3275
3245
  "values": "<view>; values declared by the theme"
3276
3246
  }
3277
3247
  ],