@mrktg-common/internal-ui 0.0.0-stage → 1.2.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/README.md +107 -2
- package/dist/Alert.d.ts +18 -0
- package/dist/Alert.js +12 -0
- package/dist/Badge.d.ts +28 -0
- package/dist/Badge.js +23 -0
- package/dist/Banner.d.ts +16 -0
- package/dist/Banner.js +6 -0
- package/dist/BrandName.d.ts +9 -0
- package/dist/BrandName.js +10 -0
- package/dist/Breadcrumbs.d.ts +20 -0
- package/dist/Breadcrumbs.js +9 -0
- package/dist/Button.d.ts +25 -0
- package/dist/Button.js +25 -0
- package/dist/Card.d.ts +22 -0
- package/dist/Card.js +10 -0
- package/dist/CenteredCard.d.ts +12 -0
- package/dist/CenteredCard.js +6 -0
- package/dist/ChangeBlock.d.ts +16 -0
- package/dist/ChangeBlock.js +8 -0
- package/dist/CopyField.d.ts +16 -0
- package/dist/CopyField.js +20 -0
- package/dist/Dropzone.d.ts +31 -0
- package/dist/Dropzone.js +66 -0
- package/dist/EmptyState.d.ts +13 -0
- package/dist/EmptyState.js +5 -0
- package/dist/EnvTag.d.ts +18 -0
- package/dist/EnvTag.js +11 -0
- package/dist/Field.d.ts +52 -0
- package/dist/Field.js +47 -0
- package/dist/FileRow.d.ts +29 -0
- package/dist/FileRow.js +9 -0
- package/dist/Header.d.ts +46 -0
- package/dist/Header.js +11 -0
- package/dist/Menu.d.ts +36 -0
- package/dist/Menu.js +47 -0
- package/dist/Modal.d.ts +26 -0
- package/dist/Modal.js +66 -0
- package/dist/MultiSelectMenu.d.ts +32 -0
- package/dist/MultiSelectMenu.js +17 -0
- package/dist/Popover.d.ts +26 -0
- package/dist/Popover.js +42 -0
- package/dist/Progress.d.ts +26 -0
- package/dist/Progress.js +39 -0
- package/dist/ResultReport.d.ts +30 -0
- package/dist/ResultReport.js +13 -0
- package/dist/Search.d.ts +12 -0
- package/dist/Search.js +21 -0
- package/dist/Segmented.d.ts +27 -0
- package/dist/Segmented.js +17 -0
- package/dist/SelectMenu.d.ts +52 -0
- package/dist/SelectMenu.js +154 -0
- package/dist/Skeleton.d.ts +12 -0
- package/dist/Skeleton.js +6 -0
- package/dist/Spinner.d.ts +12 -0
- package/dist/Spinner.js +10 -0
- package/dist/Steps.d.ts +21 -0
- package/dist/Steps.js +11 -0
- package/dist/Switch.d.ts +11 -0
- package/dist/Switch.js +14 -0
- package/dist/Table.d.ts +59 -0
- package/dist/Table.js +39 -0
- package/dist/Tabs.d.ts +20 -0
- package/dist/Tabs.js +25 -0
- package/dist/Toast.d.ts +38 -0
- package/dist/Toast.js +79 -0
- package/dist/Tooltip.d.ts +18 -0
- package/dist/Tooltip.js +58 -0
- package/dist/UserMenu.d.ts +27 -0
- package/dist/UserMenu.js +28 -0
- package/dist/components.css +526 -0
- package/dist/cx.d.ts +2 -0
- package/dist/cx.js +4 -0
- package/dist/files.d.ts +4 -0
- package/dist/files.js +28 -0
- package/dist/index.d.ts +74 -0
- package/dist/index.js +39 -0
- package/dist/portal.d.ts +8 -0
- package/dist/portal.js +12 -0
- package/dist/theme.d.ts +25 -0
- package/dist/theme.js +68 -0
- package/dist/themeScript.d.ts +9 -0
- package/dist/themeScript.js +13 -0
- package/dist/tokens.css +118 -0
- package/package.json +66 -4
- package/tokens/tokens.json +589 -0
|
@@ -0,0 +1,526 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Internal ui 1.2.0 — 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
|
+
.select-btn { display: inline-flex; align-items: center; gap: var(--space-2); justify-content: space-between; text-align: left; cursor: pointer; }
|
|
169
|
+
.select-btn > .chev { color: var(--text-muted); margin-left: auto; }
|
|
170
|
+
.counter { font-size: var(--text-sm); color: var(--text-muted); font-variant-numeric: tabular-nums; }
|
|
171
|
+
|
|
172
|
+
/* ---------- Switch ---------- */
|
|
173
|
+
.switch { display: inline-flex; align-items: center; gap: var(--space-2); height: var(--control-height-md); padding: 0 var(--space-2);
|
|
174
|
+
font-size: var(--text-base); font-weight: 500; color: var(--text); cursor: pointer; white-space: nowrap; user-select: none; }
|
|
175
|
+
.switch input { appearance: none; -webkit-appearance: none; position: relative; width: 28px; height: 16px; margin: 0; border-radius: var(--radius-full);
|
|
176
|
+
background: var(--text-faint); cursor: pointer; flex-shrink: 0; transition: background var(--duration-fast); }
|
|
177
|
+
.switch input::after { content: ''; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: var(--text-inverse);
|
|
178
|
+
box-shadow: var(--shadow-sm); transition: left var(--duration-fast); }
|
|
179
|
+
.switch input:checked { background: var(--accent); }
|
|
180
|
+
.switch input:checked::after { left: 14px; }
|
|
181
|
+
.switch input:focus-visible, .switch input.is-focus { outline: none; box-shadow: var(--focus-ring); }
|
|
182
|
+
.switch:has(input[aria-disabled='true']), .switch:has(input:disabled), .switch.is-disabled { opacity: 0.55; cursor: not-allowed; }
|
|
183
|
+
.switch input[aria-disabled='true'], .switch input:disabled { cursor: not-allowed; }
|
|
184
|
+
|
|
185
|
+
/* ---------- Segmented ---------- */
|
|
186
|
+
.seg { display: inline-flex; align-self: flex-start; gap: 2px; padding: 2px; border-radius: var(--radius-md); background: var(--bg-subtle); }
|
|
187
|
+
.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;
|
|
188
|
+
color: var(--text-muted); font: 500 var(--text-base) / 1 var(--font-ui); cursor: pointer; }
|
|
189
|
+
.seg button:hover:not([aria-pressed='true']):not([aria-disabled='true']), .seg button.is-hover { color: var(--text); }
|
|
190
|
+
.seg button[aria-pressed='true'], .seg button[aria-checked='true'] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
|
|
191
|
+
.seg button:focus-visible, .seg button.is-focus { outline: none; box-shadow: var(--focus-ring); }
|
|
192
|
+
.seg button:disabled, .seg button[aria-disabled='true'] { opacity: 0.55; cursor: not-allowed; }
|
|
193
|
+
.seg-sm button { height: 26px; padding: 0 var(--space-2); font-size: var(--text-sm); }
|
|
194
|
+
.seg-icon button { width: 30px; padding: 0; justify-content: center; }
|
|
195
|
+
.seg-sm.seg-icon button { width: 26px; }
|
|
196
|
+
|
|
197
|
+
/* ---------- Popover and menu ---------- */
|
|
198
|
+
.anchor { position: relative; display: inline-flex; }
|
|
199
|
+
.pop { position: absolute; top: calc(100% + 4px); left: 0; z-index: var(--z-dropdown); min-width: 240px; padding: var(--space-1);
|
|
200
|
+
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); }
|
|
201
|
+
.pop-right { left: auto; right: 0; }
|
|
202
|
+
.pop-static { position: static; }
|
|
203
|
+
.pop-scroll { max-height: 320px; overflow-y: auto; }
|
|
204
|
+
.menu-item { display: flex; align-items: center; gap: var(--space-2); width: 100%; min-height: 32px; padding: 0 var(--space-2); border: 0;
|
|
205
|
+
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; }
|
|
206
|
+
.menu-item > .ic { color: var(--text-muted); }
|
|
207
|
+
.menu-item:hover, .menu-item.is-hover, .menu-item:focus-visible, .menu-item.is-focus { outline: none; background: var(--bg-subtle); }
|
|
208
|
+
.menu-item:focus-visible, .menu-item.is-focus { box-shadow: inset 0 0 0 2px var(--accent); }
|
|
209
|
+
.menu-item.is-danger, .menu-item.is-danger > .ic { color: var(--danger-text); }
|
|
210
|
+
.menu-item:disabled, .menu-item[aria-disabled='true'] { color: var(--text-muted); opacity: 0.55; cursor: not-allowed; background: none; }
|
|
211
|
+
/* Selected option: check on the right, as on the agreed Publish window. */
|
|
212
|
+
.menu-item > .check { margin-left: auto; color: var(--accent-text); }
|
|
213
|
+
.menu-item[aria-selected='true'] { font-weight: 500; }
|
|
214
|
+
.menu-item .count, .menu-item .trail { margin-left: auto; font-size: var(--text-sm); color: var(--text-muted); font-variant-numeric: tabular-nums; }
|
|
215
|
+
.menu-item .count + .check, .menu-item .trail + .check { margin-left: 0; }
|
|
216
|
+
.menu-sep { height: 1px; margin: var(--space-1) 0; background: var(--border); }
|
|
217
|
+
.menu-label { padding: var(--space-2) var(--space-2) var(--space-1); font-size: var(--text-sm); color: var(--text-muted); }
|
|
218
|
+
/* State of a whole group, one line under its label. */
|
|
219
|
+
.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); }
|
|
220
|
+
.menu-note > .ic { margin-top: 1px; }
|
|
221
|
+
.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); }
|
|
222
|
+
.menu-search { padding: 4px 4px 6px; }
|
|
223
|
+
.menu-empty { display: flex; flex-direction: column; gap: 4px; padding: var(--space-3) var(--space-2); text-align: center; }
|
|
224
|
+
.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); }
|
|
225
|
+
|
|
226
|
+
/* ---------- Badge ---------- */
|
|
227
|
+
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: var(--radius-full);
|
|
228
|
+
font-size: var(--text-xs); font-weight: 500; line-height: 1.4; white-space: nowrap; vertical-align: middle; }
|
|
229
|
+
.badge > .ic { flex-shrink: 0; }
|
|
230
|
+
.b-neutral { background: var(--bg-subtle); color: var(--text-muted); }
|
|
231
|
+
.b-outline { background: transparent; color: var(--text-muted); box-shadow: inset 0 0 0 1px var(--border-strong); }
|
|
232
|
+
.b-accent { background: var(--accent-soft); color: var(--accent-text); }
|
|
233
|
+
.b-success { background: var(--success-soft); color: var(--success-text); }
|
|
234
|
+
.b-warning { background: var(--warning-soft); color: var(--warning-text); }
|
|
235
|
+
.b-danger { background: var(--danger-soft); color: var(--danger-text); }
|
|
236
|
+
.b-solid { background: var(--accent); color: var(--accent-contrast); }
|
|
237
|
+
.dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
|
|
238
|
+
.dot-hollow { background: transparent; box-shadow: inset 0 0 0 1.5px currentColor; }
|
|
239
|
+
.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; }
|
|
240
|
+
|
|
241
|
+
/* Brand: favicon + name; the lettered tile is the fallback when the favicon doesn't load. */
|
|
242
|
+
.brand { display: inline-flex; align-items: center; gap: var(--space-2); min-width: 0; color: var(--text); }
|
|
243
|
+
.brand > .name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
244
|
+
.fav { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border-radius: var(--radius-sm); object-fit: contain;
|
|
245
|
+
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; }
|
|
246
|
+
.fav-lg { width: 20px; height: 20px; }
|
|
247
|
+
|
|
248
|
+
/* People and ownership */
|
|
249
|
+
.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; }
|
|
250
|
+
.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);
|
|
251
|
+
border-radius: var(--radius-md); background: var(--bg-subtle); color: var(--text-muted); font-size: var(--text-base); }
|
|
252
|
+
.readonly .ic { color: var(--text-muted); }
|
|
253
|
+
.app .readonly a { color: var(--text); font-weight: 500; }
|
|
254
|
+
.owner-note { display: flex; align-items: center; gap: var(--space-2); font-size: var(--text-sm); color: var(--text-muted); }
|
|
255
|
+
|
|
256
|
+
/* Source of a landing or version: an icon, not a status pill. */
|
|
257
|
+
.src { display: inline-flex; align-items: center; gap: 4px; color: var(--text-muted); font-size: var(--text-sm); white-space: nowrap; min-width: 0; }
|
|
258
|
+
.src .ic { width: 13px; height: 13px; }
|
|
259
|
+
.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; }
|
|
260
|
+
.src-mark .ic { width: 14px; height: 14px; }
|
|
261
|
+
|
|
262
|
+
/* ---------- Alert ---------- */
|
|
263
|
+
.alert { display: flex; gap: var(--space-3); padding: var(--space-3) var(--space-4); border: 1px solid transparent; border-radius: var(--radius-md);
|
|
264
|
+
font-size: var(--text-base); line-height: var(--leading-normal); }
|
|
265
|
+
.alert > .ic { margin-top: 2px; }
|
|
266
|
+
.alert-body { flex: 1; min-width: 0; }
|
|
267
|
+
.alert-title { font-weight: 600; margin-bottom: 2px; }
|
|
268
|
+
.alert-body ul, .alert-body ol { margin: var(--space-1) 0 0; padding-left: var(--space-5); }
|
|
269
|
+
.alert-actions { display: flex; gap: var(--space-2); margin-top: var(--space-2); }
|
|
270
|
+
.alert-info { background: var(--accent-soft); border-color: var(--accent-border); color: var(--accent-text); }
|
|
271
|
+
.alert-success { background: var(--success-soft); border-color: var(--success-border); color: var(--success-text); }
|
|
272
|
+
.alert-warning { background: var(--warning-soft); border-color: var(--warning-border); color: var(--warning-text); }
|
|
273
|
+
.alert-danger { background: var(--danger-soft); border-color: var(--danger-border); color: var(--danger-text); }
|
|
274
|
+
.alert .code { background: color-mix(in srgb, currentColor 10%, transparent); color: inherit; }
|
|
275
|
+
|
|
276
|
+
/* ---------- Banner: state of the whole page, under the header (pages) or the toolbar (editor) ---------- */
|
|
277
|
+
.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);
|
|
278
|
+
font-size: var(--text-base); line-height: var(--leading-normal); border-bottom: 1px solid var(--border); }
|
|
279
|
+
.banner-tight { --banner-inset: var(--space-4); }
|
|
280
|
+
.banner > .ic { flex-shrink: 0; }
|
|
281
|
+
.banner-text { flex: 1; min-width: 0; }
|
|
282
|
+
.banner-actions { display: flex; align-items: center; gap: var(--space-2); flex-shrink: 0; }
|
|
283
|
+
.banner-neutral { background: var(--bg-subtle); color: var(--text); }
|
|
284
|
+
.banner-accent { background: var(--accent-soft); color: var(--accent-text); border-bottom-color: var(--accent-border); }
|
|
285
|
+
.banner-warning { background: var(--warning-soft); color: var(--warning-text); border-bottom-color: var(--warning-border); }
|
|
286
|
+
.banner-danger { background: var(--danger-soft); color: var(--danger-text); border-bottom-color: var(--danger-border); }
|
|
287
|
+
|
|
288
|
+
/* ---------- Toast ---------- */
|
|
289
|
+
.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); }
|
|
290
|
+
.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);
|
|
291
|
+
background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); color: var(--text);
|
|
292
|
+
font-size: var(--text-base); line-height: var(--leading-normal); }
|
|
293
|
+
.toast > .ic { margin-top: 2px; }
|
|
294
|
+
.toast-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; overflow-wrap: anywhere; }
|
|
295
|
+
.toast-title { font-weight: 600; }
|
|
296
|
+
.toast-desc { font-size: var(--text-sm); color: var(--text-muted); }
|
|
297
|
+
.toast-act { display: flex; gap: var(--space-2); margin-top: var(--space-1); }
|
|
298
|
+
.t-neutral { color: var(--text-muted); }
|
|
299
|
+
.t-info { color: var(--accent); }
|
|
300
|
+
.t-success { color: var(--success); }
|
|
301
|
+
.t-warning { color: var(--warning); }
|
|
302
|
+
.t-danger { color: var(--danger); }
|
|
303
|
+
|
|
304
|
+
/* ---------- Tooltip ---------- */
|
|
305
|
+
.tip { position: absolute; z-index: var(--z-dropdown); width: max-content; max-width: 320px; padding: 6px var(--space-2); border-radius: var(--radius-sm);
|
|
306
|
+
background: var(--text); color: var(--surface); font: 400 var(--text-sm) / 1.4 var(--font-ui); white-space: normal; overflow-wrap: anywhere;
|
|
307
|
+
box-shadow: var(--shadow-md); pointer-events: none; }
|
|
308
|
+
.tip-static { position: static; display: inline-block; }
|
|
309
|
+
|
|
310
|
+
/* ---------- Skeleton, spinner ---------- */
|
|
311
|
+
.sk { display: block; height: 10px; border-radius: var(--radius-sm); background: var(--bg-subtle); animation: pulse 1.4s ease-in-out infinite; }
|
|
312
|
+
.sk-pill { height: 18px; border-radius: var(--radius-full); }
|
|
313
|
+
.sk-on-subtle { background: var(--border); }
|
|
314
|
+
/* bg-subtle is darker than surface in dark: the shapes take border there to stay visible. */
|
|
315
|
+
[data-theme='dark'] .sk { background: var(--border); }
|
|
316
|
+
[data-theme='dark'] .sk-on-subtle { background: var(--border-strong); }
|
|
317
|
+
.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; }
|
|
318
|
+
.spinner-sm { width: 16px; height: 16px; }
|
|
319
|
+
.spinner-md { width: 24px; height: 24px; }
|
|
320
|
+
.spinner-lg { width: 40px; height: 40px; border-width: 3px; }
|
|
321
|
+
.spinner-inverse { border-color: color-mix(in srgb, var(--accent-contrast) 35%, transparent); border-top-color: var(--accent-contrast); }
|
|
322
|
+
.spin16 { width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin 0.8s linear infinite; }
|
|
323
|
+
.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); }
|
|
324
|
+
@media (prefers-reduced-motion: reduce) { .sk, .spinner, .spin16, .mini-spin { animation-duration: 2.4s; } }
|
|
325
|
+
|
|
326
|
+
/* ---------- Empty state ---------- */
|
|
327
|
+
.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); }
|
|
328
|
+
.empty > .ic-xl { margin-bottom: var(--space-2); color: var(--text-faint); }
|
|
329
|
+
.empty-title { font-size: var(--text-lg); font-weight: 600; color: var(--text); }
|
|
330
|
+
.empty-text { margin: 0; max-width: 420px; font-size: var(--text-md); }
|
|
331
|
+
.empty-action { margin-top: var(--space-3); display: flex; gap: var(--space-2); }
|
|
332
|
+
|
|
333
|
+
/* ---------- Centered card: sign-in, no access, fatal errors ---------- */
|
|
334
|
+
.screen { flex: 1; display: flex; align-items: center; justify-content: center; padding: var(--space-5); background: var(--bg); }
|
|
335
|
+
.cc { display: flex; flex-direction: column; gap: var(--space-4); width: 100%; max-width: 440px; padding: var(--space-8); background: var(--surface);
|
|
336
|
+
border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }
|
|
337
|
+
.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); }
|
|
338
|
+
.cc-icon-danger { background: var(--danger-soft); color: var(--danger-text); }
|
|
339
|
+
.cc-title { font-size: var(--text-2xl); font-weight: 700; text-align: center; letter-spacing: -0.01em; }
|
|
340
|
+
.cc-sub { margin-top: calc(-1 * var(--space-2)); text-align: center; font-size: var(--text-md); color: var(--text-muted); }
|
|
341
|
+
|
|
342
|
+
/* ---------- Card ---------- */
|
|
343
|
+
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); min-width: 0; }
|
|
344
|
+
.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); }
|
|
345
|
+
.card-title { font-size: var(--text-md); font-weight: 600; }
|
|
346
|
+
.card-body { padding: var(--space-4); }
|
|
347
|
+
.kv { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: var(--space-2) var(--space-3); margin: 0; font-size: var(--text-base); }
|
|
348
|
+
.kv dt { color: var(--text-muted); }
|
|
349
|
+
.kv dd { margin: 0; min-width: 0; }
|
|
350
|
+
|
|
351
|
+
/* ---------- Tabs ---------- */
|
|
352
|
+
.tabs { display: flex; gap: var(--space-5); border-bottom: 1px solid var(--border); }
|
|
353
|
+
.tab { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 2px; border: 0; background: none;
|
|
354
|
+
font: 500 var(--text-md) / 1 var(--font-ui); color: var(--text-muted); cursor: pointer; }
|
|
355
|
+
.tab:hover, .tab.is-hover { color: var(--text); }
|
|
356
|
+
.tab:focus-visible, .tab.is-focus { outline: none; border-radius: var(--radius-sm); box-shadow: var(--focus-ring); }
|
|
357
|
+
.tab.is-on, .tab[aria-selected='true'] { color: var(--text); }
|
|
358
|
+
.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); }
|
|
359
|
+
.tab[aria-disabled='true'] { opacity: 0.55; cursor: not-allowed; }
|
|
360
|
+
|
|
361
|
+
/* ---------- Copy field ---------- */
|
|
362
|
+
.copy { display: inline-flex; align-items: center; max-width: 100%; height: var(--control-height-md); border: 1px solid var(--border-strong);
|
|
363
|
+
border-radius: var(--radius-md); background: var(--surface); overflow: hidden; min-width: 0; }
|
|
364
|
+
.copy-sm { height: var(--control-height-sm); border-radius: var(--radius-sm); }
|
|
365
|
+
.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);
|
|
366
|
+
white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
367
|
+
.copy-url.is-off { color: var(--text-muted); text-decoration: line-through; text-decoration-color: var(--text-faint); }
|
|
368
|
+
.copy-act { display: inline-flex; align-items: center; justify-content: center; gap: 4px; height: 100%; min-width: 34px; padding: 0 var(--space-2);
|
|
369
|
+
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; }
|
|
370
|
+
.app a.copy-act { color: var(--text-muted); text-decoration: none; }
|
|
371
|
+
.copy-act:hover, .copy-act.is-hover, .app a.copy-act:hover { background: var(--bg-subtle); color: var(--text); text-decoration: none; }
|
|
372
|
+
.copy-act:focus-visible, .copy-act.is-focus { outline: none; box-shadow: inset 0 0 0 2px var(--accent); }
|
|
373
|
+
/* Copied: neutral with a check; green is kept for “live on production”. */
|
|
374
|
+
.copy-act.is-done, .app a.copy-act.is-done { color: var(--text); background: var(--bg-subtle); }
|
|
375
|
+
.copy-act:disabled, .copy-act[aria-disabled='true'] { opacity: 0.55; cursor: not-allowed; background: transparent; }
|
|
376
|
+
|
|
377
|
+
/* ---------- Modal ---------- */
|
|
378
|
+
/* Overlays and the toast stack are absolute inside an artboard; the app adds .is-fixed (portal to <body>). */
|
|
379
|
+
.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); }
|
|
380
|
+
.overlay.is-fixed, .toasts.is-fixed { position: fixed; }
|
|
381
|
+
.modal { display: flex; flex-direction: column; width: 100%; max-width: var(--modal-width); max-height: 90%; background: var(--surface);
|
|
382
|
+
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); }
|
|
383
|
+
.overlay.is-fixed .modal { max-height: 90vh; }
|
|
384
|
+
.modal-sm { --modal-width: 440px; }
|
|
385
|
+
.modal-md { --modal-width: 560px; }
|
|
386
|
+
.modal-lg { --modal-width: 800px; }
|
|
387
|
+
.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); }
|
|
388
|
+
.modal-heading { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
|
|
389
|
+
.modal-title { margin: 0; font-size: var(--text-lg); font-weight: 600; }
|
|
390
|
+
.modal-sub { font-size: var(--text-sm); color: var(--text-muted); }
|
|
391
|
+
.modal-body { flex: 1; display: flex; flex-direction: column; gap: var(--space-4); padding: var(--space-5); overflow-y: auto; }
|
|
392
|
+
.modal-body.flush { padding: 0; gap: 0; }
|
|
393
|
+
.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); }
|
|
394
|
+
/* Start slot: a note or a third action, pushed to the left. */
|
|
395
|
+
.modal-foot > .start, .modal-foot .left { margin-right: auto; }
|
|
396
|
+
.modal-foot > span.start, .modal-foot span.left { font-size: var(--text-sm); color: var(--text-muted); }
|
|
397
|
+
|
|
398
|
+
/* “What changes” block and the facts under it */
|
|
399
|
+
.change { display: grid; grid-template-columns: minmax(0, 1fr) 24px minmax(0, 1fr); align-items: center; gap: var(--space-3);
|
|
400
|
+
padding: var(--space-3) var(--space-4); border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--bg); }
|
|
401
|
+
.change > .ic { color: var(--text-muted); }
|
|
402
|
+
.change-side { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
|
|
403
|
+
.change-label { font-size: var(--text-sm); font-weight: 500; color: var(--text-muted); }
|
|
404
|
+
.change-v { font-size: var(--text-xl); font-weight: 700; letter-spacing: -0.01em; }
|
|
405
|
+
.change-v-sm { font-size: var(--text-md); font-weight: 600; letter-spacing: 0; }
|
|
406
|
+
.change-v.is-target { color: var(--accent-text); }
|
|
407
|
+
.change-off { font-size: var(--text-md); font-weight: 600; line-height: 27px; color: var(--danger-text); }
|
|
408
|
+
.change-meta { font-size: var(--text-sm); color: var(--text-muted); }
|
|
409
|
+
.facts { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: var(--space-2) var(--space-3); align-items: center; margin: 0; }
|
|
410
|
+
.facts dt { color: var(--text-muted); }
|
|
411
|
+
.facts dd { margin: 0; min-width: 0; }
|
|
412
|
+
|
|
413
|
+
/* ---------- Table ---------- */
|
|
414
|
+
.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; }
|
|
415
|
+
.tbl-scroll { overflow: auto; min-height: 0; }
|
|
416
|
+
.tbl { width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed; font-size: var(--text-base); color: var(--text); }
|
|
417
|
+
.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;
|
|
418
|
+
color: var(--text-muted); background: var(--surface); border-bottom: 1px solid var(--border); white-space: nowrap; }
|
|
419
|
+
.tbl th .row { gap: 4px; }
|
|
420
|
+
.tbl th[aria-sort='ascending'], .tbl th[aria-sort='descending'], .tbl th.is-sorted { color: var(--text); }
|
|
421
|
+
.th-sort { display: inline-flex; align-items: center; gap: 4px; height: 100%; padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; }
|
|
422
|
+
.th-sort:hover, .th-sort.is-hover { color: var(--text); }
|
|
423
|
+
.th-sort:focus-visible, .th-sort.is-focus { outline: none; border-radius: var(--radius-sm); box-shadow: var(--focus-ring); }
|
|
424
|
+
.th-sort > .ic { width: 12px; height: 12px; }
|
|
425
|
+
.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; }
|
|
426
|
+
.tbl th:first-child, .tbl td:first-child { padding-left: var(--space-4); }
|
|
427
|
+
.tbl .end { text-align: right; }
|
|
428
|
+
.tbl tbody tr:last-child td { border-bottom: 0; }
|
|
429
|
+
.tbl tbody tr.is-link { cursor: pointer; }
|
|
430
|
+
.tbl tbody tr.is-link:hover td, .tbl tr.is-hover td { background: var(--surface-hover); }
|
|
431
|
+
.tbl tr.is-archived td { background: var(--bg-subtle); }
|
|
432
|
+
.tbl tr.is-archived .cell-main { color: var(--text-muted); }
|
|
433
|
+
/* Live version row: green tint on production only; on Test and Dev it is neutral. */
|
|
434
|
+
.tbl tr.is-current td { background: color-mix(in srgb, var(--success-soft) 60%, var(--surface)); }
|
|
435
|
+
.tbl tr.is-current.is-nonprod td { background: var(--bg); }
|
|
436
|
+
/* Group heading inside a table: Upcoming, Past 30 days. */
|
|
437
|
+
.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); }
|
|
438
|
+
.tbl tbody tr.grp:hover td { background: var(--bg); }
|
|
439
|
+
.cell-main { font-weight: 500; color: var(--text); }
|
|
440
|
+
.app a.cell-main { color: var(--text); }
|
|
441
|
+
.cell-sub { font-size: var(--text-sm); color: var(--text-muted); }
|
|
442
|
+
.row-actions { display: flex; justify-content: flex-end; gap: 2px; }
|
|
443
|
+
.tbl-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: var(--space-2) var(--space-4);
|
|
444
|
+
border-top: 1px solid var(--border); font-size: var(--text-base); color: var(--text-muted); }
|
|
445
|
+
.pager { display: flex; align-items: center; gap: 2px; }
|
|
446
|
+
.pager .btn { min-width: var(--control-height-sm); padding: 0 var(--space-2); }
|
|
447
|
+
.pager .btn-icon { padding: 0; }
|
|
448
|
+
|
|
449
|
+
/* ---------- 1.1: Dropzone ---------- */
|
|
450
|
+
.drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-2); padding: var(--space-8) var(--space-5);
|
|
451
|
+
border: 1px dashed var(--border-strong); border-radius: var(--radius-lg); background: var(--surface); text-align: center; color: var(--text-muted); cursor: pointer; }
|
|
452
|
+
.drop > .ic-lg { color: var(--text-muted); }
|
|
453
|
+
.drop-title { font-size: var(--text-md); font-weight: 500; color: var(--text); }
|
|
454
|
+
.drop-hint { font-size: var(--text-sm); color: var(--text-muted); }
|
|
455
|
+
.drop-actions { display: flex; gap: var(--space-2); margin-top: 6px; }
|
|
456
|
+
.drop:hover, .drop.is-hover { border-color: var(--accent); }
|
|
457
|
+
.drop:focus-within, .drop.is-focus { border-color: var(--accent); box-shadow: var(--focus-ring); }
|
|
458
|
+
.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); }
|
|
459
|
+
.drop.is-over .drop-title, .drop.is-over .drop-hint, .drop.is-over > .ic-lg { color: var(--accent-text); }
|
|
460
|
+
.drop.is-error { border-color: var(--danger); }
|
|
461
|
+
.drop[aria-disabled='true'] { opacity: 0.55; cursor: not-allowed; border-color: var(--border-strong); box-shadow: none; }
|
|
462
|
+
.drop-sm { flex-direction: row; gap: var(--space-3); padding: var(--space-3) var(--space-4); text-align: left; }
|
|
463
|
+
.drop-sm.is-over { padding: calc(var(--space-3) - 1px) calc(var(--space-4) - 1px); }
|
|
464
|
+
|
|
465
|
+
/* ---------- 1.1: File row ---------- */
|
|
466
|
+
.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; }
|
|
467
|
+
.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; }
|
|
468
|
+
.file-body { flex: 1; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
|
|
469
|
+
.file-name { font-weight: 500; color: var(--text); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
470
|
+
.file-meta { font-size: var(--text-sm); color: var(--text-muted); font-variant-numeric: tabular-nums; }
|
|
471
|
+
.file-actions { display: flex; align-items: center; gap: 2px; flex-shrink: 0; }
|
|
472
|
+
.file.is-error { border-color: var(--danger); }
|
|
473
|
+
.file.is-error .file-ic { background: var(--danger-soft); color: var(--danger-text); }
|
|
474
|
+
|
|
475
|
+
/* ---------- 1.1: Progress ---------- */
|
|
476
|
+
.progress { height: 4px; border-radius: var(--radius-full); background: var(--bg-subtle); overflow: hidden; }
|
|
477
|
+
[data-theme='dark'] .progress { background: var(--border); }
|
|
478
|
+
.progress > span { display: block; height: 100%; border-radius: inherit; background: var(--accent); transition: width var(--duration-base); }
|
|
479
|
+
.progress-ind > span { width: 35%; animation: pulse 1.2s ease-in-out infinite; }
|
|
480
|
+
/* Countdown before a result closes by itself: neutral, it is a timer, not a status. */
|
|
481
|
+
.progress-countdown > span { width: 100%; background: var(--text-faint); animation: countdown linear forwards; animation-duration: var(--countdown, 5s); }
|
|
482
|
+
@keyframes countdown { from { width: 100%; } to { width: 0; } }
|
|
483
|
+
.progress-label { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-3); font-size: var(--text-sm); color: var(--text-muted); }
|
|
484
|
+
.progress-label .num { color: var(--text); font-weight: 500; }
|
|
485
|
+
@media (prefers-reduced-motion: reduce) { .progress-ind > span { animation-duration: 2.4s; } }
|
|
486
|
+
|
|
487
|
+
/* ---------- 1.1: Result report ---------- */
|
|
488
|
+
.report { border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); overflow: hidden; }
|
|
489
|
+
.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);
|
|
490
|
+
border-bottom: 1px solid var(--border); font-size: var(--text-base); font-weight: 600; }
|
|
491
|
+
.report-head .sp { flex: 1; }
|
|
492
|
+
.report-head .hint { font-weight: 400; }
|
|
493
|
+
.report-row { display: flex; align-items: flex-start; gap: var(--space-3); padding: var(--space-2) var(--space-4); font-size: var(--text-base); }
|
|
494
|
+
.report-row + .report-row { border-top: 1px solid var(--border); }
|
|
495
|
+
.report-row > .ic { margin-top: 2px; }
|
|
496
|
+
.report-row > .report-text { flex: 1; min-width: 0; }
|
|
497
|
+
/* A passed check is neutral: green is kept for “live on production”. */
|
|
498
|
+
.c-ok { color: var(--text-muted); }
|
|
499
|
+
.c-info { color: var(--accent); }
|
|
500
|
+
.c-warn { color: var(--warning); }
|
|
501
|
+
.c-err { color: var(--danger); }
|
|
502
|
+
.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);
|
|
503
|
+
font-family: var(--font-mono); font-size: var(--text-sm); color: var(--text); display: flex; flex-direction: column; gap: 2px; }
|
|
504
|
+
.paths li { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
505
|
+
.paths .loc { color: var(--text-muted); }
|
|
506
|
+
.paths mark { background: var(--warning-soft); color: var(--warning-text); border-radius: 2px; padding: 0 2px; }
|
|
507
|
+
|
|
508
|
+
/* ---------- 1.1: Steps ---------- */
|
|
509
|
+
.steps { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
|
|
510
|
+
.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; }
|
|
511
|
+
.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; }
|
|
512
|
+
.step-title { font-size: var(--text-md); font-weight: 500; line-height: 24px; }
|
|
513
|
+
.step-meta { font-size: var(--text-sm); color: var(--text-muted); }
|
|
514
|
+
.step-time { font-size: var(--text-sm); color: var(--text-muted); line-height: 24px; font-variant-numeric: tabular-nums; }
|
|
515
|
+
/* Done is neutral: the green comes with the result, and only for production. */
|
|
516
|
+
.step.is-done .step-ic { background: var(--bg-subtle); color: var(--text); }
|
|
517
|
+
[data-theme='dark'] .step.is-done .step-ic { background: var(--border); }
|
|
518
|
+
.step.is-run .step-ic { background: var(--accent-soft); color: var(--accent-text); }
|
|
519
|
+
.step.is-wait .step-ic { box-shadow: inset 0 0 0 1.5px var(--text-faint); }
|
|
520
|
+
.step.is-wait .step-title { color: var(--text-muted); }
|
|
521
|
+
.step.is-fail .step-ic { background: var(--danger-soft); color: var(--danger-text); }
|
|
522
|
+
.step.is-fail .step-title { color: var(--danger-text); }
|
|
523
|
+
.step-err { margin-top: 2px; font-size: var(--text-sm); color: var(--danger-text); }
|
|
524
|
+
/* Numbered instructions (How translations work): the number on accent-soft. */
|
|
525
|
+
.step.is-num .step-ic { background: var(--accent-soft); color: var(--accent-text); }
|
|
526
|
+
|
package/dist/cx.d.ts
ADDED
package/dist/cx.js
ADDED
package/dist/files.d.ts
ADDED
|
@@ -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
|
+
}
|