@mrktg-common/internal-ui 0.0.0-stage → 1.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (85) hide show
  1. package/README.md +114 -2
  2. package/dist/Alert.d.ts +18 -0
  3. package/dist/Alert.js +12 -0
  4. package/dist/Badge.d.ts +28 -0
  5. package/dist/Badge.js +23 -0
  6. package/dist/Banner.d.ts +16 -0
  7. package/dist/Banner.js +6 -0
  8. package/dist/BrandName.d.ts +9 -0
  9. package/dist/BrandName.js +10 -0
  10. package/dist/Breadcrumbs.d.ts +20 -0
  11. package/dist/Breadcrumbs.js +9 -0
  12. package/dist/Button.d.ts +25 -0
  13. package/dist/Button.js +25 -0
  14. package/dist/Card.d.ts +22 -0
  15. package/dist/Card.js +10 -0
  16. package/dist/CenteredCard.d.ts +12 -0
  17. package/dist/CenteredCard.js +6 -0
  18. package/dist/ChangeBlock.d.ts +16 -0
  19. package/dist/ChangeBlock.js +8 -0
  20. package/dist/CopyField.d.ts +16 -0
  21. package/dist/CopyField.js +20 -0
  22. package/dist/Dropzone.d.ts +31 -0
  23. package/dist/Dropzone.js +66 -0
  24. package/dist/EmptyState.d.ts +13 -0
  25. package/dist/EmptyState.js +5 -0
  26. package/dist/EnvTag.d.ts +18 -0
  27. package/dist/EnvTag.js +11 -0
  28. package/dist/Field.d.ts +52 -0
  29. package/dist/Field.js +47 -0
  30. package/dist/FileRow.d.ts +29 -0
  31. package/dist/FileRow.js +9 -0
  32. package/dist/Header.d.ts +46 -0
  33. package/dist/Header.js +11 -0
  34. package/dist/Menu.d.ts +36 -0
  35. package/dist/Menu.js +47 -0
  36. package/dist/Modal.d.ts +26 -0
  37. package/dist/Modal.js +66 -0
  38. package/dist/MultiSelectMenu.d.ts +32 -0
  39. package/dist/MultiSelectMenu.js +17 -0
  40. package/dist/Popover.d.ts +26 -0
  41. package/dist/Popover.js +42 -0
  42. package/dist/Progress.d.ts +26 -0
  43. package/dist/Progress.js +39 -0
  44. package/dist/ResultReport.d.ts +30 -0
  45. package/dist/ResultReport.js +13 -0
  46. package/dist/Search.d.ts +12 -0
  47. package/dist/Search.js +32 -0
  48. package/dist/Segmented.d.ts +27 -0
  49. package/dist/Segmented.js +17 -0
  50. package/dist/SelectMenu.d.ts +52 -0
  51. package/dist/SelectMenu.js +154 -0
  52. package/dist/Skeleton.d.ts +12 -0
  53. package/dist/Skeleton.js +6 -0
  54. package/dist/Spinner.d.ts +12 -0
  55. package/dist/Spinner.js +10 -0
  56. package/dist/Steps.d.ts +21 -0
  57. package/dist/Steps.js +11 -0
  58. package/dist/Switch.d.ts +11 -0
  59. package/dist/Switch.js +14 -0
  60. package/dist/Table.d.ts +59 -0
  61. package/dist/Table.js +39 -0
  62. package/dist/Tabs.d.ts +20 -0
  63. package/dist/Tabs.js +25 -0
  64. package/dist/Toast.d.ts +38 -0
  65. package/dist/Toast.js +79 -0
  66. package/dist/Tooltip.d.ts +18 -0
  67. package/dist/Tooltip.js +58 -0
  68. package/dist/UserMenu.d.ts +27 -0
  69. package/dist/UserMenu.js +28 -0
  70. package/dist/components.css +527 -0
  71. package/dist/cx.d.ts +2 -0
  72. package/dist/cx.js +4 -0
  73. package/dist/files.d.ts +4 -0
  74. package/dist/files.js +28 -0
  75. package/dist/index.d.ts +74 -0
  76. package/dist/index.js +39 -0
  77. package/dist/portal.d.ts +8 -0
  78. package/dist/portal.js +12 -0
  79. package/dist/theme.d.ts +25 -0
  80. package/dist/theme.js +68 -0
  81. package/dist/themeScript.d.ts +9 -0
  82. package/dist/themeScript.js +13 -0
  83. package/dist/tokens.css +118 -0
  84. package/package.json +67 -4
  85. package/tokens/tokens.json +589 -0
@@ -0,0 +1,527 @@
1
+ /*
2
+ * Internal ui 1.2.1 — shared component classes of Landings Admin and LP Constructor.
3
+ * Loads after tokens.css. Every value is a token; no hex here.
4
+ * Classes are global on purpose: the same file styles the design canvases and the code package.
5
+ * .is-hover / .is-focus / .is-open are static stand-ins for :hover, :focus-visible and an open popup on canvases.
6
+ */
7
+
8
+ /* ---------- base ---------- */
9
+ :root, [data-theme='light'] { color-scheme: light; }
10
+ [data-theme='dark'] { color-scheme: dark; }
11
+ .app { position: relative; display: flex; flex-direction: column; min-width: 0; background: var(--bg); color: var(--text);
12
+ font-family: var(--font-ui); font-size: var(--text-base); line-height: var(--leading-normal); -webkit-font-smoothing: antialiased; }
13
+ .app *, .app *::before, .app *::after { box-sizing: border-box; }
14
+ .app a { color: var(--accent-text); text-decoration: none; }
15
+ .app a:hover { text-decoration: underline; }
16
+ .app a:focus-visible { outline: none; border-radius: var(--radius-sm); box-shadow: var(--focus-ring); }
17
+ .app h1, .app h2, .app h3, .app p { margin: 0; }
18
+ .app button { font-family: inherit; }
19
+ .mono { font-family: var(--font-mono); }
20
+ .muted { color: var(--text-muted); }
21
+ .strong { font-weight: 600; color: var(--text); }
22
+ .nowrap { white-space: nowrap; }
23
+ .num { font-variant-numeric: tabular-nums; }
24
+ .trunc { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
25
+ .row { display: flex; align-items: center; gap: var(--space-2); min-width: 0; }
26
+ .col { display: flex; flex-direction: column; min-width: 0; }
27
+ .sp { flex: 1; }
28
+ .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
29
+ .ic { width: 16px; height: 16px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
30
+ .ic-xs { width: 12px; height: 12px; }
31
+ .ic-sm { width: 14px; height: 14px; }
32
+ .ic-lg { width: 28px; height: 28px; stroke-width: 1.75; }
33
+ .ic-xl { width: 40px; height: 40px; stroke-width: 1.5; }
34
+ .code { padding: 1px 4px; border-radius: 3px; background: var(--bg-subtle); font-family: var(--font-mono); font-size: var(--text-sm); color: var(--text); }
35
+ @keyframes spin { to { transform: rotate(360deg); } }
36
+ @keyframes pulse { 50% { opacity: 0.45; } }
37
+
38
+ /* ---------- Header ---------- */
39
+ .hdr { position: relative; display: flex; align-items: center; justify-content: space-between; gap: var(--space-4);
40
+ height: var(--header-height); padding: 0 var(--space-5); background: var(--surface); border-bottom: 1px solid var(--border); flex-shrink: 0; }
41
+ .hdr-dev { box-shadow: inset 0 3px 0 var(--warning); }
42
+ .hdr-left, .hdr-right { display: flex; align-items: center; gap: var(--space-3); min-width: 0; }
43
+ .hdr-left { flex: 1; }
44
+ .logo { display: inline-flex; align-items: center; gap: var(--space-2); border-radius: var(--radius-md); font-size: var(--text-md); font-weight: 600; white-space: nowrap; }
45
+ .app a.logo { color: var(--text); }
46
+ .app a.logo:hover, .app a.logo.is-hover { color: var(--accent-text); text-decoration: none; }
47
+ .app a.logo:focus-visible, .app a.logo.is-focus { outline: none; box-shadow: var(--focus-ring); }
48
+ .logo-mark { display: flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: var(--radius-md); background: var(--accent); color: var(--accent-contrast); }
49
+ .nav { display: flex; align-items: center; gap: 2px; margin-left: var(--space-3); }
50
+ .nav a { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 var(--space-3); border-radius: var(--radius-md); font-size: var(--text-md); font-weight: 500; white-space: nowrap; }
51
+ .app .nav a { color: var(--text-muted); text-decoration: none; }
52
+ .app .nav a:hover, .app .nav a.is-hover { color: var(--text); background: var(--bg-subtle); text-decoration: none; }
53
+ .app .nav a[aria-current='page'] { color: var(--accent-text); background: var(--accent-soft); }
54
+ .app .nav a:focus-visible, .app .nav a.is-focus { outline: none; box-shadow: var(--focus-ring); }
55
+ .user-btn { display: inline-flex; align-items: center; gap: var(--space-2); height: 40px; padding: 0 var(--space-2) 0 var(--space-1);
56
+ border: 0; border-radius: var(--radius-md); background: transparent; color: var(--text); font: inherit; cursor: pointer; }
57
+ .user-btn:hover, .user-btn.is-hover, .user-btn.is-open { background: var(--bg-subtle); }
58
+ .user-btn:focus-visible, .user-btn.is-focus { outline: none; box-shadow: var(--focus-ring); }
59
+ .user-name { font-size: var(--text-base); font-weight: 500; white-space: nowrap; }
60
+ .avatar { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; overflow: hidden;
61
+ background: var(--accent-soft); color: var(--accent-text); font-size: var(--text-base); font-weight: 600; flex-shrink: 0; }
62
+ .avatar img { width: 100%; height: 100%; object-fit: cover; }
63
+ .avatar-sm { width: 24px; height: 24px; font-size: var(--text-xs); }
64
+ .user-card { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-2); }
65
+ .role-box { display: flex; flex-direction: column; gap: 4px; padding: var(--space-2); }
66
+ .role-box .hint { line-height: 1.4; }
67
+ .theme-row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: var(--space-1) var(--space-2) var(--space-2); }
68
+
69
+ /* ---------- Env tag: contour + environment pill, and the short chip ---------- */
70
+ .env { display: inline-flex; align-items: center; gap: var(--space-2); height: 26px; padding: 0 var(--space-1) 0 var(--space-2);
71
+ border: 1px solid var(--border-strong); border-radius: var(--radius-md); font-size: var(--text-sm); color: var(--text-muted); white-space: nowrap; }
72
+ .env-contour { font-weight: 600; color: var(--text); }
73
+ .env-host { color: var(--text-muted); }
74
+ .env-tag { display: inline-flex; align-items: center; gap: 4px; height: 18px; padding: 0 6px; border-radius: var(--radius-sm);
75
+ font-size: var(--text-xs); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
76
+ .env-prod .env-tag { background: var(--bg-subtle); color: var(--text); }
77
+ .env-dev { border-color: var(--warning); background: var(--warning-soft); color: var(--warning-text); }
78
+ .env-dev .env-contour, .env-dev .env-host { color: var(--warning-text); }
79
+ .env-dev .env-tag { background: var(--warning-text); color: var(--surface); }
80
+ .env-chip { display: inline-flex; align-items: center; height: 18px; padding: 0 6px; border-radius: var(--radius-sm); font-size: var(--text-xs); font-weight: 600;
81
+ letter-spacing: 0.04em; text-transform: uppercase; flex-shrink: 0; }
82
+ .tag-prod { background: var(--bg-subtle); color: var(--text); }
83
+ .tag-test { background: var(--warning-soft); color: var(--warning-text); }
84
+
85
+ /* ---------- 1.2: Breadcrumbs ---------- */
86
+ .crumbs { display: flex; align-items: center; gap: var(--space-1); min-width: 0; font-size: var(--text-base); color: var(--text-muted); }
87
+ .crumbs > .ic { width: 14px; height: 14px; color: var(--text-faint); }
88
+ .crumbs a { border-radius: var(--radius-sm); white-space: nowrap; }
89
+ .app .crumbs a { color: var(--text-muted); }
90
+ .app .crumbs a:hover, .app .crumbs a.is-hover { color: var(--text); text-decoration: none; }
91
+ .app .crumbs a:focus-visible, .app .crumbs a.is-focus { outline: none; box-shadow: var(--focus-ring); }
92
+ .crumbs .here { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); font-weight: 500; }
93
+ /* In the header: the document title is the current item. */
94
+ .crumbs-lg { gap: var(--space-2); font-size: var(--text-md); }
95
+ .crumbs-lg a { font-weight: 500; }
96
+ .crumbs-lg .here { max-width: 360px; font-weight: 600; }
97
+
98
+ /* ---------- Page layout ---------- */
99
+ .page { flex: 1; display: flex; flex-direction: column; min-width: 0; }
100
+ .page-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); padding: var(--space-5) var(--space-8) 0; }
101
+ .page-title { font-size: var(--text-2xl); font-weight: 700; letter-spacing: -0.01em; line-height: var(--leading-tight); }
102
+ .page-count { font-size: var(--text-md); font-weight: 500; color: var(--text-muted); }
103
+ .toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-2); padding: var(--space-4) var(--space-8); }
104
+ .content { padding: 0 var(--space-8) var(--space-8); min-width: 0; }
105
+
106
+ /* ---------- Button ---------- */
107
+ .btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); height: var(--control-height-md);
108
+ padding: 0 var(--space-4); border: 1px solid transparent; border-radius: var(--radius-md); font: 500 var(--text-md) / 1 var(--font-ui);
109
+ cursor: pointer; white-space: nowrap; text-decoration: none; transition: background var(--duration-fast), border-color var(--duration-fast), color var(--duration-fast); }
110
+ .app a.btn, .app a.btn:hover { text-decoration: none; }
111
+ .btn:focus-visible, .btn.is-focus { outline: none; box-shadow: var(--focus-ring); }
112
+ .btn:disabled, .btn[aria-disabled='true'] { opacity: 0.55; cursor: not-allowed; }
113
+ .btn-sm { height: var(--control-height-sm); padding: 0 var(--space-3); border-radius: var(--radius-sm); font-size: var(--text-base); }
114
+ .btn-icon { padding: 0; width: var(--control-height-md); }
115
+ .btn-sm.btn-icon { width: var(--control-height-sm); }
116
+ .btn-block { width: 100%; }
117
+ .btn-primary { background: var(--accent); color: var(--accent-contrast); }
118
+ .app a.btn-primary { color: var(--accent-contrast); }
119
+ .btn-primary:hover:not(:disabled):not([aria-disabled='true']), .btn-primary.is-hover { background: var(--accent-hover); }
120
+ .btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
121
+ .app a.btn-secondary { color: var(--text); }
122
+ .btn-secondary:hover:not(:disabled):not([aria-disabled='true']), .btn-secondary.is-hover { background: var(--surface-hover); }
123
+ .btn-secondary.is-active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-text); }
124
+ .btn-ghost { background: transparent; color: var(--text-muted); }
125
+ .app a.btn-ghost { color: var(--text-muted); }
126
+ .btn-ghost:hover:not(:disabled):not([aria-disabled='true']), .btn-ghost.is-hover { background: var(--bg-subtle); color: var(--text); }
127
+ .btn-ghost[aria-pressed='true'], .btn-ghost.is-on { background: var(--accent-soft); color: var(--accent-text); }
128
+ .btn-danger { background: var(--surface); color: var(--danger-text); border-color: var(--border-strong); }
129
+ .btn-danger:hover:not(:disabled):not([aria-disabled='true']), .btn-danger.is-hover { background: var(--danger-soft); border-color: var(--danger); }
130
+ .btn-ghost.danger-hover:hover:not(:disabled), .btn-ghost.danger-hover.is-hover { background: var(--danger-soft); color: var(--danger-text); }
131
+ .btn .count-pill, .count-pill { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px;
132
+ border-radius: var(--radius-full); background: var(--accent); color: var(--accent-contrast); font-size: var(--text-xs); font-weight: 600; }
133
+ .btn .spinner { border-color: color-mix(in srgb, currentColor 35%, transparent); border-top-color: currentColor; }
134
+
135
+ /* ---------- Field ---------- */
136
+ .field { display: flex; flex-direction: column; gap: var(--space-1); min-width: 0; }
137
+ .label { font-size: var(--text-base); font-weight: 500; color: var(--text); }
138
+ .label .opt { font-weight: 400; color: var(--text-muted); }
139
+ .label-row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); }
140
+ .required { color: var(--danger-text); margin-left: 2px; }
141
+ .hint { font-size: var(--text-sm); line-height: var(--leading-normal); color: var(--text-muted); }
142
+ .err { display: flex; align-items: center; gap: var(--space-1); font-size: var(--text-sm); color: var(--danger-text); }
143
+ .err > .ic, .ok > .ic { align-self: flex-start; margin-top: 2px; }
144
+ /* Positive check under a field: neutral, green is kept for “live on production”. */
145
+ .ok { display: flex; align-items: center; gap: var(--space-1); font-size: var(--text-sm); color: var(--text-muted); }
146
+ .control { width: 100%; min-height: var(--control-height-md); padding: 0 var(--space-3); border: 1px solid var(--border-strong);
147
+ border-radius: var(--radius-md); background: var(--surface); color: var(--text); font: 400 var(--text-md) / 1.4 var(--font-ui);
148
+ transition: border-color var(--duration-fast), box-shadow var(--duration-fast); }
149
+ .control::placeholder { color: var(--text-faint); }
150
+ .control:focus, .control:focus-visible, .control.is-focus { outline: none; border-color: var(--accent); box-shadow: var(--focus-ring); }
151
+ .control:disabled, .control[aria-disabled='true'] { background: var(--bg-subtle); color: var(--text-muted); cursor: not-allowed; }
152
+ .control:disabled::placeholder, .control[aria-disabled='true']::placeholder { color: var(--text-muted); }
153
+ .control-sm { min-height: var(--control-height-sm); padding: 0 var(--space-2); border-radius: var(--radius-sm); font-size: var(--text-base); }
154
+ .control.mono { font-family: var(--font-mono); font-size: var(--text-base); }
155
+ .textarea { padding: var(--space-2) var(--space-3); min-height: 72px; resize: vertical; }
156
+ .invalid { border-color: var(--danger); background: var(--danger-soft); }
157
+ .invalid::placeholder { color: var(--text-muted); }
158
+ .invalid:focus, .invalid.is-focus { border-color: var(--danger); box-shadow: var(--focus-ring-danger); }
159
+ .checkbox { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); cursor: pointer; flex-shrink: 0; }
160
+ .checkbox:focus-visible, .checkbox.is-focus { outline: none; box-shadow: var(--focus-ring); border-radius: 3px; }
161
+ .check-row { display: inline-flex; align-items: flex-start; gap: var(--space-2); font-size: var(--text-base); color: var(--text); cursor: pointer; }
162
+ .check-row > .checkbox { margin-top: 2px; }
163
+ .with-icon { position: relative; display: flex; align-items: center; min-width: 0; }
164
+ .with-icon > .ic { position: absolute; left: var(--space-3); color: var(--text-muted); pointer-events: none; }
165
+ .with-icon > .control { padding-left: calc(var(--space-3) + 16px + var(--space-2)); }
166
+ .with-icon > .control:has(+ .clear) { padding-right: calc(var(--control-height-sm) + 6px); }
167
+ .with-icon > .clear { position: absolute; right: 3px; }
168
+ .with-icon > .control::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
169
+ .select-btn { display: inline-flex; align-items: center; gap: var(--space-2); justify-content: space-between; text-align: left; cursor: pointer; }
170
+ .select-btn > .chev { color: var(--text-muted); margin-left: auto; }
171
+ .counter { font-size: var(--text-sm); color: var(--text-muted); font-variant-numeric: tabular-nums; }
172
+
173
+ /* ---------- Switch ---------- */
174
+ .switch { display: inline-flex; align-items: center; gap: var(--space-2); height: var(--control-height-md); padding: 0 var(--space-2);
175
+ font-size: var(--text-base); font-weight: 500; color: var(--text); cursor: pointer; white-space: nowrap; user-select: none; }
176
+ .switch input { appearance: none; -webkit-appearance: none; position: relative; width: 28px; height: 16px; margin: 0; border-radius: var(--radius-full);
177
+ background: var(--text-faint); cursor: pointer; flex-shrink: 0; transition: background var(--duration-fast); }
178
+ .switch input::after { content: ''; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: var(--text-inverse);
179
+ box-shadow: var(--shadow-sm); transition: left var(--duration-fast); }
180
+ .switch input:checked { background: var(--accent); }
181
+ .switch input:checked::after { left: 14px; }
182
+ .switch input:focus-visible, .switch input.is-focus { outline: none; box-shadow: var(--focus-ring); }
183
+ .switch:has(input[aria-disabled='true']), .switch:has(input:disabled), .switch.is-disabled { opacity: 0.55; cursor: not-allowed; }
184
+ .switch input[aria-disabled='true'], .switch input:disabled { cursor: not-allowed; }
185
+
186
+ /* ---------- Segmented ---------- */
187
+ .seg { display: inline-flex; align-self: flex-start; gap: 2px; padding: 2px; border-radius: var(--radius-md); background: var(--bg-subtle); }
188
+ .seg button { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 var(--space-3); border: 0; border-radius: var(--radius-sm); background: transparent;
189
+ color: var(--text-muted); font: 500 var(--text-base) / 1 var(--font-ui); cursor: pointer; }
190
+ .seg button:hover:not([aria-pressed='true']):not([aria-disabled='true']), .seg button.is-hover { color: var(--text); }
191
+ .seg button[aria-pressed='true'], .seg button[aria-checked='true'] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
192
+ .seg button:focus-visible, .seg button.is-focus { outline: none; box-shadow: var(--focus-ring); }
193
+ .seg button:disabled, .seg button[aria-disabled='true'] { opacity: 0.55; cursor: not-allowed; }
194
+ .seg-sm button { height: 26px; padding: 0 var(--space-2); font-size: var(--text-sm); }
195
+ .seg-icon button { width: 30px; padding: 0; justify-content: center; }
196
+ .seg-sm.seg-icon button { width: 26px; }
197
+
198
+ /* ---------- Popover and menu ---------- */
199
+ .anchor { position: relative; display: inline-flex; }
200
+ .pop { position: absolute; top: calc(100% + 4px); left: 0; z-index: var(--z-dropdown); min-width: 240px; padding: var(--space-1);
201
+ background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); color: var(--text); font-size: var(--text-base); }
202
+ .pop-right { left: auto; right: 0; }
203
+ .pop-static { position: static; }
204
+ .pop-scroll { max-height: 320px; overflow-y: auto; }
205
+ .menu-item { display: flex; align-items: center; gap: var(--space-2); width: 100%; min-height: 32px; padding: 0 var(--space-2); border: 0;
206
+ border-radius: var(--radius-sm); background: none; font: inherit; font-size: var(--text-base); line-height: 1.4; color: var(--text); text-align: left; cursor: pointer; }
207
+ .menu-item > .ic { color: var(--text-muted); }
208
+ .menu-item:hover, .menu-item.is-hover, .menu-item:focus-visible, .menu-item.is-focus { outline: none; background: var(--bg-subtle); }
209
+ .menu-item:focus-visible, .menu-item.is-focus { box-shadow: inset 0 0 0 2px var(--accent); }
210
+ .menu-item.is-danger, .menu-item.is-danger > .ic { color: var(--danger-text); }
211
+ .menu-item:disabled, .menu-item[aria-disabled='true'] { color: var(--text-muted); opacity: 0.55; cursor: not-allowed; background: none; }
212
+ /* Selected option: check on the right, as on the agreed Publish window. */
213
+ .menu-item > .check { margin-left: auto; color: var(--accent-text); }
214
+ .menu-item[aria-selected='true'] { font-weight: 500; }
215
+ .menu-item .count, .menu-item .trail { margin-left: auto; font-size: var(--text-sm); color: var(--text-muted); font-variant-numeric: tabular-nums; }
216
+ .menu-item .count + .check, .menu-item .trail + .check { margin-left: 0; }
217
+ .menu-sep { height: 1px; margin: var(--space-1) 0; background: var(--border); }
218
+ .menu-label { padding: var(--space-2) var(--space-2) var(--space-1); font-size: var(--text-sm); color: var(--text-muted); }
219
+ /* State of a whole group, one line under its label. */
220
+ .menu-note { display: flex; align-items: flex-start; gap: var(--space-2); padding: 0 var(--space-2) 6px; font-size: var(--text-sm); color: var(--warning-text); }
221
+ .menu-note > .ic { margin-top: 1px; }
222
+ .menu-hint { padding: 0 var(--space-2) var(--space-2) calc(var(--space-2) + 16px + var(--space-2)); margin-top: -4px; font-size: var(--text-sm); color: var(--text-muted); }
223
+ .menu-search { padding: 4px 4px 6px; }
224
+ .menu-empty { display: flex; flex-direction: column; gap: 4px; padding: var(--space-3) var(--space-2); text-align: center; }
225
+ .menu-foot { display: flex; justify-content: space-between; align-items: center; gap: var(--space-2); padding: var(--space-2) var(--space-1) var(--space-1); border-top: 1px solid var(--border); margin-top: var(--space-1); }
226
+
227
+ /* ---------- Badge ---------- */
228
+ .badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: var(--radius-full);
229
+ font-size: var(--text-xs); font-weight: 500; line-height: 1.4; white-space: nowrap; vertical-align: middle; }
230
+ .badge > .ic { flex-shrink: 0; }
231
+ .b-neutral { background: var(--bg-subtle); color: var(--text-muted); }
232
+ .b-outline { background: transparent; color: var(--text-muted); box-shadow: inset 0 0 0 1px var(--border-strong); }
233
+ .b-accent { background: var(--accent-soft); color: var(--accent-text); }
234
+ .b-success { background: var(--success-soft); color: var(--success-text); }
235
+ .b-warning { background: var(--warning-soft); color: var(--warning-text); }
236
+ .b-danger { background: var(--danger-soft); color: var(--danger-text); }
237
+ .b-solid { background: var(--accent); color: var(--accent-contrast); }
238
+ .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
239
+ .dot-hollow { background: transparent; box-shadow: inset 0 0 0 1.5px currentColor; }
240
+ .mini-spin { width: 10px; height: 10px; border: 1.5px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin 0.8s linear infinite; flex-shrink: 0; }
241
+
242
+ /* Brand: favicon + name; the lettered tile is the fallback when the favicon doesn't load. */
243
+ .brand { display: inline-flex; align-items: center; gap: var(--space-2); min-width: 0; color: var(--text); }
244
+ .brand > .name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
245
+ .fav { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border-radius: var(--radius-sm); object-fit: contain;
246
+ background: var(--bg-subtle); box-shadow: inset 0 0 0 1px var(--border-strong); color: var(--text); font-size: var(--text-xs); font-weight: 700; line-height: 1; flex-shrink: 0; }
247
+ .fav-lg { width: 20px; height: 20px; }
248
+
249
+ /* People and ownership */
250
+ .you { padding: 0 6px; border-radius: var(--radius-full); background: var(--accent-soft); color: var(--accent-text); font-size: var(--text-xs); font-weight: 600; line-height: 18px; flex-shrink: 0; }
251
+ .readonly { display: inline-flex; align-items: center; gap: var(--space-2); min-height: var(--control-height-md); max-width: 520px; padding: 0 var(--space-3);
252
+ border-radius: var(--radius-md); background: var(--bg-subtle); color: var(--text-muted); font-size: var(--text-base); }
253
+ .readonly .ic { color: var(--text-muted); }
254
+ .app .readonly a { color: var(--text); font-weight: 500; }
255
+ .owner-note { display: flex; align-items: center; gap: var(--space-2); font-size: var(--text-sm); color: var(--text-muted); }
256
+
257
+ /* Source of a landing or version: an icon, not a status pill. */
258
+ .src { display: inline-flex; align-items: center; gap: 4px; color: var(--text-muted); font-size: var(--text-sm); white-space: nowrap; min-width: 0; }
259
+ .src .ic { width: 13px; height: 13px; }
260
+ .src-mark { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: var(--radius-sm); color: var(--text-muted); flex-shrink: 0; }
261
+ .src-mark .ic { width: 14px; height: 14px; }
262
+
263
+ /* ---------- Alert ---------- */
264
+ .alert { display: flex; gap: var(--space-3); padding: var(--space-3) var(--space-4); border: 1px solid transparent; border-radius: var(--radius-md);
265
+ font-size: var(--text-base); line-height: var(--leading-normal); }
266
+ .alert > .ic { margin-top: 2px; }
267
+ .alert-body { flex: 1; min-width: 0; }
268
+ .alert-title { font-weight: 600; margin-bottom: 2px; }
269
+ .alert-body ul, .alert-body ol { margin: var(--space-1) 0 0; padding-left: var(--space-5); }
270
+ .alert-actions { display: flex; gap: var(--space-2); margin-top: var(--space-2); }
271
+ .alert-info { background: var(--accent-soft); border-color: var(--accent-border); color: var(--accent-text); }
272
+ .alert-success { background: var(--success-soft); border-color: var(--success-border); color: var(--success-text); }
273
+ .alert-warning { background: var(--warning-soft); border-color: var(--warning-border); color: var(--warning-text); }
274
+ .alert-danger { background: var(--danger-soft); border-color: var(--danger-border); color: var(--danger-text); }
275
+ .alert .code { background: color-mix(in srgb, currentColor 10%, transparent); color: inherit; }
276
+
277
+ /* ---------- Banner: state of the whole page, under the header (pages) or the toolbar (editor) ---------- */
278
+ .banner { --banner-inset: var(--space-8); display: flex; align-items: center; gap: var(--space-3); min-height: 44px; padding: var(--space-2) var(--banner-inset);
279
+ font-size: var(--text-base); line-height: var(--leading-normal); border-bottom: 1px solid var(--border); }
280
+ .banner-tight { --banner-inset: var(--space-4); }
281
+ .banner > .ic { flex-shrink: 0; }
282
+ .banner-text { flex: 1; min-width: 0; }
283
+ .banner-actions { display: flex; align-items: center; gap: var(--space-2); flex-shrink: 0; }
284
+ .banner-neutral { background: var(--bg-subtle); color: var(--text); }
285
+ .banner-accent { background: var(--accent-soft); color: var(--accent-text); border-bottom-color: var(--accent-border); }
286
+ .banner-warning { background: var(--warning-soft); color: var(--warning-text); border-bottom-color: var(--warning-border); }
287
+ .banner-danger { background: var(--danger-soft); color: var(--danger-text); border-bottom-color: var(--danger-border); }
288
+
289
+ /* ---------- Toast ---------- */
290
+ .toasts { position: absolute; right: var(--space-6); bottom: var(--space-6); display: flex; flex-direction: column; gap: var(--space-2); z-index: var(--z-toast); }
291
+ .toast { display: flex; align-items: flex-start; gap: var(--space-3); width: 380px; max-width: 100%; padding: var(--space-3) var(--space-3) var(--space-3) var(--space-4);
292
+ background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); color: var(--text);
293
+ font-size: var(--text-base); line-height: var(--leading-normal); }
294
+ .toast > .ic { margin-top: 2px; }
295
+ .toast-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; overflow-wrap: anywhere; }
296
+ .toast-title { font-weight: 600; }
297
+ .toast-desc { font-size: var(--text-sm); color: var(--text-muted); }
298
+ .toast-act { display: flex; gap: var(--space-2); margin-top: var(--space-1); }
299
+ .t-neutral { color: var(--text-muted); }
300
+ .t-info { color: var(--accent); }
301
+ .t-success { color: var(--success); }
302
+ .t-warning { color: var(--warning); }
303
+ .t-danger { color: var(--danger); }
304
+
305
+ /* ---------- Tooltip ---------- */
306
+ .tip { position: absolute; z-index: var(--z-dropdown); width: max-content; max-width: 320px; padding: 6px var(--space-2); border-radius: var(--radius-sm);
307
+ background: var(--text); color: var(--surface); font: 400 var(--text-sm) / 1.4 var(--font-ui); white-space: normal; overflow-wrap: anywhere;
308
+ box-shadow: var(--shadow-md); pointer-events: none; }
309
+ .tip-static { position: static; display: inline-block; }
310
+
311
+ /* ---------- Skeleton, spinner ---------- */
312
+ .sk { display: block; height: 10px; border-radius: var(--radius-sm); background: var(--bg-subtle); animation: pulse 1.4s ease-in-out infinite; }
313
+ .sk-pill { height: 18px; border-radius: var(--radius-full); }
314
+ .sk-on-subtle { background: var(--border); }
315
+ /* bg-subtle is darker than surface in dark: the shapes take border there to stay visible. */
316
+ [data-theme='dark'] .sk { background: var(--border); }
317
+ [data-theme='dark'] .sk-on-subtle { background: var(--border-strong); }
318
+ .spinner { display: inline-block; border: 2px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; flex-shrink: 0; }
319
+ .spinner-sm { width: 16px; height: 16px; }
320
+ .spinner-md { width: 24px; height: 24px; }
321
+ .spinner-lg { width: 40px; height: 40px; border-width: 3px; }
322
+ .spinner-inverse { border-color: color-mix(in srgb, var(--accent-contrast) 35%, transparent); border-top-color: var(--accent-contrast); }
323
+ .spin16 { width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin 0.8s linear infinite; }
324
+ .loading { display: flex; flex-direction: column; align-items: center; gap: var(--space-3); padding: var(--space-10) var(--space-5); color: var(--text-muted); font-size: var(--text-md); }
325
+ @media (prefers-reduced-motion: reduce) { .sk, .spinner, .spin16, .mini-spin { animation-duration: 2.4s; } }
326
+
327
+ /* ---------- Empty state ---------- */
328
+ .empty { display: flex; flex-direction: column; align-items: center; gap: var(--space-2); padding: var(--space-10) var(--space-5); text-align: center; color: var(--text-muted); }
329
+ .empty > .ic-xl { margin-bottom: var(--space-2); color: var(--text-faint); }
330
+ .empty-title { font-size: var(--text-lg); font-weight: 600; color: var(--text); }
331
+ .empty-text { margin: 0; max-width: 420px; font-size: var(--text-md); }
332
+ .empty-action { margin-top: var(--space-3); display: flex; gap: var(--space-2); }
333
+
334
+ /* ---------- Centered card: sign-in, no access, fatal errors ---------- */
335
+ .screen { flex: 1; display: flex; align-items: center; justify-content: center; padding: var(--space-5); background: var(--bg); }
336
+ .cc { display: flex; flex-direction: column; gap: var(--space-4); width: 100%; max-width: 440px; padding: var(--space-8); background: var(--surface);
337
+ border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }
338
+ .cc-icon { display: flex; align-items: center; justify-content: center; width: 56px; height: 56px; margin: 0 auto; border-radius: var(--radius-full); background: var(--accent-soft); color: var(--accent-text); }
339
+ .cc-icon-danger { background: var(--danger-soft); color: var(--danger-text); }
340
+ .cc-title { font-size: var(--text-2xl); font-weight: 700; text-align: center; letter-spacing: -0.01em; }
341
+ .cc-sub { margin-top: calc(-1 * var(--space-2)); text-align: center; font-size: var(--text-md); color: var(--text-muted); }
342
+
343
+ /* ---------- Card ---------- */
344
+ .card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); min-width: 0; }
345
+ .card-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); min-height: 44px; padding: var(--space-2) var(--space-4); border-bottom: 1px solid var(--border); }
346
+ .card-title { font-size: var(--text-md); font-weight: 600; }
347
+ .card-body { padding: var(--space-4); }
348
+ .kv { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: var(--space-2) var(--space-3); margin: 0; font-size: var(--text-base); }
349
+ .kv dt { color: var(--text-muted); }
350
+ .kv dd { margin: 0; min-width: 0; }
351
+
352
+ /* ---------- Tabs ---------- */
353
+ .tabs { display: flex; gap: var(--space-5); border-bottom: 1px solid var(--border); }
354
+ .tab { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 2px; border: 0; background: none;
355
+ font: 500 var(--text-md) / 1 var(--font-ui); color: var(--text-muted); cursor: pointer; }
356
+ .tab:hover, .tab.is-hover { color: var(--text); }
357
+ .tab:focus-visible, .tab.is-focus { outline: none; border-radius: var(--radius-sm); box-shadow: var(--focus-ring); }
358
+ .tab.is-on, .tab[aria-selected='true'] { color: var(--text); }
359
+ .tab.is-on::after, .tab[aria-selected='true']::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; border-radius: 2px; background: var(--accent); }
360
+ .tab[aria-disabled='true'] { opacity: 0.55; cursor: not-allowed; }
361
+
362
+ /* ---------- Copy field ---------- */
363
+ .copy { display: inline-flex; align-items: center; max-width: 100%; height: var(--control-height-md); border: 1px solid var(--border-strong);
364
+ border-radius: var(--radius-md); background: var(--surface); overflow: hidden; min-width: 0; }
365
+ .copy-sm { height: var(--control-height-sm); border-radius: var(--radius-sm); }
366
+ .copy-url { flex: 1; min-width: 0; padding: 0 var(--space-3); font-family: var(--font-mono); font-size: var(--text-base); color: var(--text);
367
+ white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
368
+ .copy-url.is-off { color: var(--text-muted); text-decoration: line-through; text-decoration-color: var(--text-faint); }
369
+ .copy-act { display: inline-flex; align-items: center; justify-content: center; gap: 4px; height: 100%; min-width: 34px; padding: 0 var(--space-2);
370
+ border: 0; border-left: 1px solid var(--border-strong); background: transparent; color: var(--text-muted); font: 500 var(--text-sm) / 1 var(--font-ui); cursor: pointer; text-decoration: none; }
371
+ .app a.copy-act { color: var(--text-muted); text-decoration: none; }
372
+ .copy-act:hover, .copy-act.is-hover, .app a.copy-act:hover { background: var(--bg-subtle); color: var(--text); text-decoration: none; }
373
+ .copy-act:focus-visible, .copy-act.is-focus { outline: none; box-shadow: inset 0 0 0 2px var(--accent); }
374
+ /* Copied: neutral with a check; green is kept for “live on production”. */
375
+ .copy-act.is-done, .app a.copy-act.is-done { color: var(--text); background: var(--bg-subtle); }
376
+ .copy-act:disabled, .copy-act[aria-disabled='true'] { opacity: 0.55; cursor: not-allowed; background: transparent; }
377
+
378
+ /* ---------- Modal ---------- */
379
+ /* Overlays and the toast stack are absolute inside an artboard; the app adds .is-fixed (portal to <body>). */
380
+ .overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: var(--space-4); background: var(--overlay); z-index: var(--z-modal); }
381
+ .overlay.is-fixed, .toasts.is-fixed { position: fixed; }
382
+ .modal { display: flex; flex-direction: column; width: 100%; max-width: var(--modal-width); max-height: 90%; background: var(--surface);
383
+ border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); color: var(--text); font-family: var(--font-ui); font-size: var(--text-base); line-height: var(--leading-normal); }
384
+ .overlay.is-fixed .modal { max-height: 90vh; }
385
+ .modal-sm { --modal-width: 440px; }
386
+ .modal-md { --modal-width: 560px; }
387
+ .modal-lg { --modal-width: 800px; }
388
+ .modal-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: var(--space-4) var(--space-5); border-bottom: 1px solid var(--border); }
389
+ .modal-heading { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
390
+ .modal-title { margin: 0; font-size: var(--text-lg); font-weight: 600; }
391
+ .modal-sub { font-size: var(--text-sm); color: var(--text-muted); }
392
+ .modal-body { flex: 1; display: flex; flex-direction: column; gap: var(--space-4); padding: var(--space-5); overflow-y: auto; }
393
+ .modal-body.flush { padding: 0; gap: 0; }
394
+ .modal-foot { display: flex; align-items: center; justify-content: flex-end; gap: var(--space-2); padding: var(--space-4) var(--space-5); border-top: 1px solid var(--border); }
395
+ /* Start slot: a note or a third action, pushed to the left. */
396
+ .modal-foot > .start, .modal-foot .left { margin-right: auto; }
397
+ .modal-foot > span.start, .modal-foot span.left { font-size: var(--text-sm); color: var(--text-muted); }
398
+
399
+ /* “What changes” block and the facts under it */
400
+ .change { display: grid; grid-template-columns: minmax(0, 1fr) 24px minmax(0, 1fr); align-items: center; gap: var(--space-3);
401
+ padding: var(--space-3) var(--space-4); border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--bg); }
402
+ .change > .ic { color: var(--text-muted); }
403
+ .change-side { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
404
+ .change-label { font-size: var(--text-sm); font-weight: 500; color: var(--text-muted); }
405
+ .change-v { font-size: var(--text-xl); font-weight: 700; letter-spacing: -0.01em; }
406
+ .change-v-sm { font-size: var(--text-md); font-weight: 600; letter-spacing: 0; }
407
+ .change-v.is-target { color: var(--accent-text); }
408
+ .change-off { font-size: var(--text-md); font-weight: 600; line-height: 27px; color: var(--danger-text); }
409
+ .change-meta { font-size: var(--text-sm); color: var(--text-muted); }
410
+ .facts { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: var(--space-2) var(--space-3); align-items: center; margin: 0; }
411
+ .facts dt { color: var(--text-muted); }
412
+ .facts dd { margin: 0; min-width: 0; }
413
+
414
+ /* ---------- Table ---------- */
415
+ .tbl-box { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; min-width: 0; }
416
+ .tbl-scroll { overflow: auto; min-height: 0; }
417
+ .tbl { width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed; font-size: var(--text-base); color: var(--text); }
418
+ .tbl th { position: sticky; top: 0; z-index: 1; height: var(--table-head-height); padding: 0 var(--space-3); text-align: left; font-size: var(--text-sm); font-weight: 600;
419
+ color: var(--text-muted); background: var(--surface); border-bottom: 1px solid var(--border); white-space: nowrap; }
420
+ .tbl th .row { gap: 4px; }
421
+ .tbl th[aria-sort='ascending'], .tbl th[aria-sort='descending'], .tbl th.is-sorted { color: var(--text); }
422
+ .th-sort { display: inline-flex; align-items: center; gap: 4px; height: 100%; padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; }
423
+ .th-sort:hover, .th-sort.is-hover { color: var(--text); }
424
+ .th-sort:focus-visible, .th-sort.is-focus { outline: none; border-radius: var(--radius-sm); box-shadow: var(--focus-ring); }
425
+ .th-sort > .ic { width: 12px; height: 12px; }
426
+ .tbl td { height: var(--table-row-height); padding: var(--space-2) var(--space-3); border-bottom: 1px solid var(--border); vertical-align: middle; overflow: hidden; }
427
+ .tbl th:first-child, .tbl td:first-child { padding-left: var(--space-4); }
428
+ .tbl .end { text-align: right; }
429
+ .tbl tbody tr:last-child td { border-bottom: 0; }
430
+ .tbl tbody tr.is-link { cursor: pointer; }
431
+ .tbl tbody tr.is-link:hover td, .tbl tr.is-hover td { background: var(--surface-hover); }
432
+ .tbl tr.is-archived td { background: var(--bg-subtle); }
433
+ .tbl tr.is-archived .cell-main { color: var(--text-muted); }
434
+ /* Live version row: green tint on production only; on Test and Dev it is neutral. */
435
+ .tbl tr.is-current td { background: color-mix(in srgb, var(--success-soft) 60%, var(--surface)); }
436
+ .tbl tr.is-current.is-nonprod td { background: var(--bg); }
437
+ /* Group heading inside a table: Upcoming, Past 30 days. */
438
+ .tbl tr.grp td { height: 32px; padding-top: 0; padding-bottom: 0; background: var(--bg); font-size: var(--text-sm); font-weight: 600; color: var(--text-muted); }
439
+ .tbl tbody tr.grp:hover td { background: var(--bg); }
440
+ .cell-main { font-weight: 500; color: var(--text); }
441
+ .app a.cell-main { color: var(--text); }
442
+ .cell-sub { font-size: var(--text-sm); color: var(--text-muted); }
443
+ .row-actions { display: flex; justify-content: flex-end; gap: 2px; }
444
+ .tbl-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: var(--space-2) var(--space-4);
445
+ border-top: 1px solid var(--border); font-size: var(--text-base); color: var(--text-muted); }
446
+ .pager { display: flex; align-items: center; gap: 2px; }
447
+ .pager .btn { min-width: var(--control-height-sm); padding: 0 var(--space-2); }
448
+ .pager .btn-icon { padding: 0; }
449
+
450
+ /* ---------- 1.1: Dropzone ---------- */
451
+ .drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-2); padding: var(--space-8) var(--space-5);
452
+ border: 1px dashed var(--border-strong); border-radius: var(--radius-lg); background: var(--surface); text-align: center; color: var(--text-muted); cursor: pointer; }
453
+ .drop > .ic-lg { color: var(--text-muted); }
454
+ .drop-title { font-size: var(--text-md); font-weight: 500; color: var(--text); }
455
+ .drop-hint { font-size: var(--text-sm); color: var(--text-muted); }
456
+ .drop-actions { display: flex; gap: var(--space-2); margin-top: 6px; }
457
+ .drop:hover, .drop.is-hover { border-color: var(--accent); }
458
+ .drop:focus-within, .drop.is-focus { border-color: var(--accent); box-shadow: var(--focus-ring); }
459
+ .drop.is-over { border: 2px dashed var(--accent); padding: calc(var(--space-8) - 1px) calc(var(--space-5) - 1px); background: var(--accent-soft); color: var(--accent-text); }
460
+ .drop.is-over .drop-title, .drop.is-over .drop-hint, .drop.is-over > .ic-lg { color: var(--accent-text); }
461
+ .drop.is-error { border-color: var(--danger); }
462
+ .drop[aria-disabled='true'] { opacity: 0.55; cursor: not-allowed; border-color: var(--border-strong); box-shadow: none; }
463
+ .drop-sm { flex-direction: row; gap: var(--space-3); padding: var(--space-3) var(--space-4); text-align: left; }
464
+ .drop-sm.is-over { padding: calc(var(--space-3) - 1px) calc(var(--space-4) - 1px); }
465
+
466
+ /* ---------- 1.1: File row ---------- */
467
+ .file { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3); border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); min-width: 0; }
468
+ .file-ic { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: var(--radius-md); background: var(--bg-subtle); color: var(--text-muted); flex-shrink: 0; }
469
+ .file-body { flex: 1; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
470
+ .file-name { font-weight: 500; color: var(--text); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
471
+ .file-meta { font-size: var(--text-sm); color: var(--text-muted); font-variant-numeric: tabular-nums; }
472
+ .file-actions { display: flex; align-items: center; gap: 2px; flex-shrink: 0; }
473
+ .file.is-error { border-color: var(--danger); }
474
+ .file.is-error .file-ic { background: var(--danger-soft); color: var(--danger-text); }
475
+
476
+ /* ---------- 1.1: Progress ---------- */
477
+ .progress { height: 4px; border-radius: var(--radius-full); background: var(--bg-subtle); overflow: hidden; }
478
+ [data-theme='dark'] .progress { background: var(--border); }
479
+ .progress > span { display: block; height: 100%; border-radius: inherit; background: var(--accent); transition: width var(--duration-base); }
480
+ .progress-ind > span { width: 35%; animation: pulse 1.2s ease-in-out infinite; }
481
+ /* Countdown before a result closes by itself: neutral, it is a timer, not a status. */
482
+ .progress-countdown > span { width: 100%; background: var(--text-faint); animation: countdown linear forwards; animation-duration: var(--countdown, 5s); }
483
+ @keyframes countdown { from { width: 100%; } to { width: 0; } }
484
+ .progress-label { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-3); font-size: var(--text-sm); color: var(--text-muted); }
485
+ .progress-label .num { color: var(--text); font-weight: 500; }
486
+ @media (prefers-reduced-motion: reduce) { .progress-ind > span { animation-duration: 2.4s; } }
487
+
488
+ /* ---------- 1.1: Result report ---------- */
489
+ .report { border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); overflow: hidden; }
490
+ .report-head { display: flex; align-items: center; gap: var(--space-2); min-height: 40px; padding: var(--space-2) var(--space-4); background: var(--bg-subtle);
491
+ border-bottom: 1px solid var(--border); font-size: var(--text-base); font-weight: 600; }
492
+ .report-head .sp { flex: 1; }
493
+ .report-head .hint { font-weight: 400; }
494
+ .report-row { display: flex; align-items: flex-start; gap: var(--space-3); padding: var(--space-2) var(--space-4); font-size: var(--text-base); }
495
+ .report-row + .report-row { border-top: 1px solid var(--border); }
496
+ .report-row > .ic { margin-top: 2px; }
497
+ .report-row > .report-text { flex: 1; min-width: 0; }
498
+ /* A passed check is neutral: green is kept for “live on production”. */
499
+ .c-ok { color: var(--text-muted); }
500
+ .c-info { color: var(--accent); }
501
+ .c-warn { color: var(--warning); }
502
+ .c-err { color: var(--danger); }
503
+ .paths { margin: var(--space-2) 0 0; padding: var(--space-2) var(--space-3); list-style: none; border-radius: var(--radius-sm); background: var(--bg-subtle);
504
+ font-family: var(--font-mono); font-size: var(--text-sm); color: var(--text); display: flex; flex-direction: column; gap: 2px; }
505
+ .paths li { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
506
+ .paths .loc { color: var(--text-muted); }
507
+ .paths mark { background: var(--warning-soft); color: var(--warning-text); border-radius: 2px; padding: 0 2px; }
508
+
509
+ /* ---------- 1.1: Steps ---------- */
510
+ .steps { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
511
+ .step { position: relative; display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: var(--space-3); align-items: start; padding: var(--space-2) 0; }
512
+ .step-ic { display: flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; font-size: var(--text-sm); font-weight: 700; }
513
+ .step-title { font-size: var(--text-md); font-weight: 500; line-height: 24px; }
514
+ .step-meta { font-size: var(--text-sm); color: var(--text-muted); }
515
+ .step-time { font-size: var(--text-sm); color: var(--text-muted); line-height: 24px; font-variant-numeric: tabular-nums; }
516
+ /* Done is neutral: the green comes with the result, and only for production. */
517
+ .step.is-done .step-ic { background: var(--bg-subtle); color: var(--text); }
518
+ [data-theme='dark'] .step.is-done .step-ic { background: var(--border); }
519
+ .step.is-run .step-ic { background: var(--accent-soft); color: var(--accent-text); }
520
+ .step.is-wait .step-ic { box-shadow: inset 0 0 0 1.5px var(--text-faint); }
521
+ .step.is-wait .step-title { color: var(--text-muted); }
522
+ .step.is-fail .step-ic { background: var(--danger-soft); color: var(--danger-text); }
523
+ .step.is-fail .step-title { color: var(--danger-text); }
524
+ .step-err { margin-top: 2px; font-size: var(--text-sm); color: var(--danger-text); }
525
+ /* Numbered instructions (How translations work): the number on accent-soft. */
526
+ .step.is-num .step-ic { background: var(--accent-soft); color: var(--accent-text); }
527
+
package/dist/cx.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ /** Склеивает классы, пропуская пустые. */
2
+ export declare function cx(...classes: Array<string | false | null | undefined>): string;
package/dist/cx.js ADDED
@@ -0,0 +1,4 @@
1
+ /** Склеивает классы, пропуская пустые. */
2
+ export function cx(...classes) {
3
+ return classes.filter(Boolean).join(' ');
4
+ }
@@ -0,0 +1,4 @@
1
+ /** «38.2 MB», «812 KB»: размер файла для подписей и ошибок. */
2
+ export declare function formatBytes(bytes: number): string;
3
+ /** Подходит ли файл под accept: расширения (.zip) и MIME (image/*, text/csv). Пустой список — любой. */
4
+ export declare function matchesAccept(file: Pick<File, 'name' | 'type'>, accept: readonly string[]): boolean;
package/dist/files.js ADDED
@@ -0,0 +1,28 @@
1
+ /** «38.2 MB», «812 KB»: размер файла для подписей и ошибок. */
2
+ export function formatBytes(bytes) {
3
+ if (bytes < 1024)
4
+ return `${bytes} B`;
5
+ const units = ['KB', 'MB', 'GB'];
6
+ let value = bytes / 1024;
7
+ let unit = 0;
8
+ while (value >= 1024 && unit < units.length - 1) {
9
+ value /= 1024;
10
+ unit += 1;
11
+ }
12
+ return `${value >= 100 ? Math.round(value) : Number(value.toFixed(1))} ${units[unit]}`;
13
+ }
14
+ /** Подходит ли файл под accept: расширения (.zip) и MIME (image/*, text/csv). Пустой список — любой. */
15
+ export function matchesAccept(file, accept) {
16
+ if (accept.length === 0)
17
+ return true;
18
+ const name = file.name.toLowerCase();
19
+ const type = file.type.toLowerCase();
20
+ return accept.some((rule) => {
21
+ const item = rule.trim().toLowerCase();
22
+ if (item.startsWith('.'))
23
+ return name.endsWith(item);
24
+ if (item.endsWith('/*'))
25
+ return type.startsWith(item.slice(0, -1));
26
+ return type === item;
27
+ });
28
+ }