@fluxwp/ui 0.0.0-stage → 0.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +57 -2
- package/package.json +59 -4
- package/src/Avatar.tsx +12 -0
- package/src/Check.tsx +66 -0
- package/src/DatePicker.tsx +620 -0
- package/src/Empty.tsx +16 -0
- package/src/Icon.tsx +76 -0
- package/src/MenuIcon.tsx +36 -0
- package/src/Modal.tsx +19 -0
- package/src/index.ts +10 -0
- package/src/menu-icons/flx-admin.svg +13 -0
- package/src/menu-icons/flx-ai.svg +15 -0
- package/src/menu-icons/flx-analytics.svg +14 -0
- package/src/menu-icons/flx-app.svg +17 -0
- package/src/menu-icons/flx-backup.svg +13 -0
- package/src/menu-icons/flx-certificates.svg +13 -0
- package/src/menu-icons/flx-chat.svg +13 -0
- package/src/menu-icons/flx-donate.svg +13 -0
- package/src/menu-icons/flx-forms.svg +13 -0
- package/src/menu-icons/flx-lang.svg +13 -0
- package/src/menu-icons/flx-mail.svg +13 -0
- package/src/menu-icons/flx-qr-menu.svg +21 -0
- package/src/menu-icons/flx-roles.svg +17 -0
- package/src/menu-icons/flx-seo.svg +13 -0
- package/src/menu-icons/flx-setup.svg +2 -0
- package/src/menu-icons/flx-social.svg +19 -0
- package/src/menu-icons/flx-speed.svg +12 -0
- package/src/menu-icons/flx-studio.svg +16 -0
- package/src/menu-icons/flx-tasks.svg +13 -0
- package/src/menu-icons/flx-tv-board.svg +14 -0
- package/src/menu-icons/flx-tv-remote.svg +18 -0
- package/src/overlay.ts +15 -0
- package/src/sanitize.ts +91 -0
- package/src/styles.css +396 -0
- package/types/Avatar.d.ts +6 -0
- package/types/Check.d.ts +30 -0
- package/types/DatePicker.d.ts +65 -0
- package/types/Empty.d.ts +7 -0
- package/types/Icon.d.ts +5 -0
- package/types/MenuIcon.d.ts +6 -0
- package/types/Modal.d.ts +7 -0
- package/types/index.d.ts +9 -0
- package/types/overlay.d.ts +6 -0
- package/types/sanitize.d.ts +6 -0
package/src/sanitize.ts
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
// Sunucudan gelen HTML'i (görev açıklaması vb.) güvenli alt kümeye indirger.
|
|
2
|
+
import { platform } from '@fluxwp/core';
|
|
3
|
+
|
|
4
|
+
const ALLOWED = new Set(['P', 'BR', 'B', 'STRONG', 'I', 'EM', 'U', 'S', 'STRIKE', 'DEL', 'UL', 'OL', 'LI', 'A', 'CODE', 'PRE', 'BLOCKQUOTE', 'H2', 'H3', 'H4', 'SPAN', 'IMG', 'DIV', 'HR']);
|
|
5
|
+
const DROP = new Set(['SCRIPT', 'STYLE', 'IFRAME', 'FRAME', 'FRAMESET', 'OBJECT', 'EMBED', 'APPLET', 'LINK', 'META', 'BASE', 'NOSCRIPT', 'TEMPLATE', 'SVG', 'MATH']);
|
|
6
|
+
const CONTROLS = /[\u0000-\u001F\u007F-\u009F]/;
|
|
7
|
+
|
|
8
|
+
function safeUrl(v: string): boolean {
|
|
9
|
+
if (CONTROLS.test(v) || v.includes('\\')) return false;
|
|
10
|
+
const u = v.replace(/[\u0000-\u0020]+/g, '').toLowerCase();
|
|
11
|
+
const m = /^([a-z][a-z0-9+.-]*):/.exec(u);
|
|
12
|
+
return !m || m[1] === 'http' || m[1] === 'https' || m[1] === 'mailto' || m[1] === 'tel';
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
function safeImageSrc(v: string): boolean {
|
|
16
|
+
if (CONTROLS.test(v) || v.includes('\\')) return false;
|
|
17
|
+
const u = v.replace(/[\u0000-\u0020]+/g, '');
|
|
18
|
+
if (/^data:/i.test(u)) return /^data:image\/(?:png|jpeg|gif|webp);base64,[a-z0-9+/]+=*$/i.test(u);
|
|
19
|
+
return safeUrl(u);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
function keepAttr(tag: string, name: string, value: string): boolean {
|
|
23
|
+
if (tag === 'A' && name === 'href') return safeUrl(value);
|
|
24
|
+
if (tag === 'IMG' && name === 'src') return safeImageSrc(value);
|
|
25
|
+
if (tag === 'IMG' && name === 'alt') return !CONTROLS.test(value);
|
|
26
|
+
if (tag === 'IMG' && name === 'data-file') return /^\d{1,12}$/.test(value);
|
|
27
|
+
if (tag === 'UL' && name === 'data-checklist') return value === '1';
|
|
28
|
+
if (tag === 'LI' && name === 'data-checked') return value === '0' || value === '1';
|
|
29
|
+
if (tag === 'SPAN' && name === 'class') {
|
|
30
|
+
const parts = value.split(/\s+/).filter(Boolean);
|
|
31
|
+
return parts.length > 0 && parts.every((p) => p === 'flxg-mention' || p === 'is-me');
|
|
32
|
+
}
|
|
33
|
+
return false;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
function stripComments(el: Element) {
|
|
37
|
+
for (const n of Array.from(el.childNodes)) {
|
|
38
|
+
if (n.nodeType === 8) n.remove();
|
|
39
|
+
else if (n.nodeType === 1) stripComments(n as Element);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
function walk(el: Element) {
|
|
44
|
+
for (const child of Array.from(el.children)) {
|
|
45
|
+
if (DROP.has(child.tagName)) {
|
|
46
|
+
child.remove();
|
|
47
|
+
continue;
|
|
48
|
+
}
|
|
49
|
+
walk(child);
|
|
50
|
+
if (!ALLOWED.has(child.tagName)) {
|
|
51
|
+
child.replaceWith(...Array.from(child.childNodes));
|
|
52
|
+
continue;
|
|
53
|
+
}
|
|
54
|
+
for (const attr of Array.from(child.attributes)) {
|
|
55
|
+
if (!keepAttr(child.tagName, attr.name, attr.value)) child.removeAttribute(attr.name);
|
|
56
|
+
}
|
|
57
|
+
if (child.tagName === 'A' && child.hasAttribute('href')) {
|
|
58
|
+
child.setAttribute('target', '_blank');
|
|
59
|
+
child.setAttribute('rel', 'noopener noreferrer');
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
function once(html: string): string {
|
|
65
|
+
const doc = new DOMParser().parseFromString(html, 'text/html');
|
|
66
|
+
stripComments(doc.body);
|
|
67
|
+
walk(doc.body);
|
|
68
|
+
return doc.body.innerHTML;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export function sanitizeHtml(html: string): string {
|
|
72
|
+
if (!html || typeof DOMParser === 'undefined') return '';
|
|
73
|
+
return once(once(html));
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/** A click on a sanitised link leaves the app (system browser or a new tab). */
|
|
77
|
+
export function openSanitizedLink(event: { target: EventTarget | null; preventDefault(): void }): void {
|
|
78
|
+
const node = event.target;
|
|
79
|
+
const el = node instanceof Element ? node : node instanceof Node ? node.parentElement : null;
|
|
80
|
+
if (!el) return;
|
|
81
|
+
const a = el.closest('a');
|
|
82
|
+
if (!a) return;
|
|
83
|
+
const href = a.getAttribute('href');
|
|
84
|
+
if (!href || !safeUrl(href)) return;
|
|
85
|
+
event.preventDefault();
|
|
86
|
+
try {
|
|
87
|
+
void platform().openExternal(href);
|
|
88
|
+
} catch {
|
|
89
|
+
/* host has no opener */
|
|
90
|
+
}
|
|
91
|
+
}
|
package/src/styles.css
ADDED
|
@@ -0,0 +1,396 @@
|
|
|
1
|
+
/* @fluxwp/ui: ortak stiller. Panelde düz, WP admin gömmesinde .flux-root önekiyle derlenir. */
|
|
2
|
+
/* Ortak tarih seçici: tek kaynak flx-brand (DatePicker.tsx aynı sınıfları basar). */
|
|
3
|
+
@import "../../../tools/brand/flx-brand/date/date.css";
|
|
4
|
+
@font-face{font-family:Figtree;font-style:normal;font-weight:300 900;font-display:swap;src:url("../../../plugins/flx-admin/assets/fonts/figtree-latin-ext-wght-normal.woff2") format("woff2");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
|
|
5
|
+
@font-face{font-family:Figtree;font-style:normal;font-weight:300 900;font-display:swap;src:url("../../../plugins/flx-admin/assets/fonts/figtree-latin-wght-normal.woff2") format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
|
|
6
|
+
@font-face{font-family:Nunito;font-style:normal;font-weight:600 900;font-display:swap;src:url("../../../themes/fluxwp/assets/fonts/nunito-latin-ext.woff2") format("woff2");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
|
|
7
|
+
@font-face{font-family:Nunito;font-style:normal;font-weight:600 900;font-display:swap;src:url("../../../themes/fluxwp/assets/fonts/nunito-latin.woff2") format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
|
|
8
|
+
@font-face{font-family:"Nunito Sans";font-style:normal;font-weight:400 700;font-display:swap;src:url("../../../themes/fluxwp/assets/fonts/nunitosans-latin-ext.woff2") format("woff2");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
|
|
9
|
+
@font-face{font-family:"Nunito Sans";font-style:normal;font-weight:400 700;font-display:swap;src:url("../../../themes/fluxwp/assets/fonts/nunitosans-latin.woff2") format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
|
|
10
|
+
*,*::before,*::after{box-sizing:border-box}
|
|
11
|
+
html,body,#root{height:100%;margin:0}
|
|
12
|
+
body{font-family:var(--flux-font-family);font-size:var(--flux-font-md);color:var(--flux-text);background:var(--flux-bg);-webkit-font-smoothing:antialiased}
|
|
13
|
+
button{font:inherit;color:inherit;cursor:pointer;border:0;background:none;padding:0}
|
|
14
|
+
button:disabled{cursor:default;opacity:.55}
|
|
15
|
+
input{font:inherit;color:inherit}
|
|
16
|
+
a{color:var(--flux-primary)}
|
|
17
|
+
h1{font-family:var(--flux-font-heading,var(--flux-font-family));font-size:var(--flux-font-xl);margin:0;font-weight:800;letter-spacing:-.02em}
|
|
18
|
+
h2{font-size:var(--flux-font-md);margin:0 0 var(--flux-space-3);font-weight:600;display:flex;align-items:center;gap:8px}
|
|
19
|
+
.muted{color:var(--flux-text-muted)}
|
|
20
|
+
.small{font-size:var(--flux-font-sm)}
|
|
21
|
+
.grow{flex:1;min-width:0;text-align:left}
|
|
22
|
+
.row{display:flex;align-items:center;gap:var(--flux-space-3)}
|
|
23
|
+
.stack{display:flex;flex-direction:column;gap:var(--flux-space-3)}
|
|
24
|
+
.spin{animation:spin 1s linear infinite}
|
|
25
|
+
.center{display:block;margin:16px auto}
|
|
26
|
+
@keyframes spin{to{transform:rotate(360deg)}}
|
|
27
|
+
.error{color:var(--flux-danger);font-size:var(--flux-font-sm);margin:var(--flux-space-3) 0 0}
|
|
28
|
+
.notice{background:var(--flux-surface2);border:1px solid var(--flux-border);border-radius:var(--flux-radius-md);padding:var(--flux-space-3);font-size:var(--flux-font-sm);color:var(--flux-text-muted)}
|
|
29
|
+
.text-warn{color:var(--flux-warning)}
|
|
30
|
+
kbd{font-family:var(--flux-font-mono);font-size:11px;padding:1px 6px;border-radius:5px;border:1px solid var(--flux-border);color:var(--flux-text-muted);background:var(--flux-surface)}
|
|
31
|
+
|
|
32
|
+
/* buttons */
|
|
33
|
+
.btn-primary,.btn-ghost{display:inline-flex;align-items:center;justify-content:center;gap:8px;height:40px;padding:0 14px;border-radius:var(--flux-radius-md);font-weight:600;transition:background .15s,opacity .15s}
|
|
34
|
+
.btn-primary{background:var(--flux-primary);color:var(--flux-primary-contrast);font-weight:700}
|
|
35
|
+
.btn-primary:hover:not(:disabled){filter:brightness(1.07)}
|
|
36
|
+
.btn-ghost{background:var(--flux-surface2);color:var(--flux-text)}
|
|
37
|
+
.btn-ghost:hover:not(:disabled){background:var(--flux-border)}
|
|
38
|
+
.btn-primary.small,.btn-ghost.small{height:32px;padding:0 12px;font-size:var(--flux-font-sm)}
|
|
39
|
+
.btn-ghost.danger{color:var(--flux-danger)}
|
|
40
|
+
.btn-link{color:var(--flux-primary);font-weight:550;font-size:var(--flux-font-sm);display:inline-flex;gap:6px;align-items:center}
|
|
41
|
+
.icon-btn{width:32px;height:32px;display:inline-grid;place-items:center;border-radius:var(--flux-radius-sm);color:var(--flux-text-muted)}
|
|
42
|
+
.icon-btn:hover,.icon-btn.active{background:var(--flux-sidebar-active);color:var(--flux-text)}
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
/* paylaşılan parçalar */
|
|
46
|
+
.field{display:flex;flex-direction:column;gap:6px;font-size:var(--flux-font-sm);font-weight:550}
|
|
47
|
+
.field input{height:42px;padding:0 12px;border-radius:var(--flux-radius-md);border:1px solid var(--flux-border);background:var(--flux-bg);font-weight:400;font-size:var(--flux-font-md);outline:none}
|
|
48
|
+
.field input:focus{border-color:var(--flux-primary);box-shadow:0 0 0 3px color-mix(in srgb,var(--flux-primary) 22%,transparent)}
|
|
49
|
+
.field small{font-weight:400}
|
|
50
|
+
.avatar{object-fit:cover;flex:none}
|
|
51
|
+
.avatar-fallback{display:inline-grid;place-items:center;background:color-mix(in srgb,var(--flux-primary) 16%,var(--flux-surface));color:var(--flux-primary);font-weight:650}
|
|
52
|
+
.menu-label{font-size:var(--flux-font-xs);color:var(--flux-text-muted);padding:6px 8px;text-transform:uppercase;letter-spacing:.04em}
|
|
53
|
+
.badge{min-width:20px;height:20px;padding:0 6px;border-radius:10px;background:var(--flux-primary);color:var(--flux-primary-contrast);font-size:11px;font-weight:650;display:inline-grid;place-items:center}
|
|
54
|
+
.panel{background:var(--flux-surface);border:1px solid var(--flux-border);border-radius:var(--flux-radius-lg);padding:18px;margin-bottom:14px}
|
|
55
|
+
.panel ul{list-style:none;margin:0;padding:0}
|
|
56
|
+
.panel li{display:flex;align-items:center;gap:12px;padding:10px 0;border-top:1px solid var(--flux-border)}
|
|
57
|
+
.panel li:first-child{border-top:0}
|
|
58
|
+
.pill{font-size:11px;padding:2px 8px;border-radius:10px;background:color-mix(in srgb,var(--flux-primary) 14%,transparent);color:var(--flux-primary);margin-left:6px;font-weight:600}
|
|
59
|
+
.setting{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:10px 0;border-top:1px solid var(--flux-border)}
|
|
60
|
+
.setting:first-of-type{border-top:0}
|
|
61
|
+
.seg{display:inline-flex;background:var(--flux-surface2);border-radius:var(--flux-radius-md);padding:3px}
|
|
62
|
+
.seg button{display:inline-flex;align-items:center;gap:6px;height:30px;padding:0 12px;border-radius:7px;font-size:var(--flux-font-sm);color:var(--flux-text-muted)}
|
|
63
|
+
.seg button.on{background:var(--flux-surface);color:var(--flux-text);box-shadow:0 1px 3px rgba(0,0,0,.12);font-weight:600}
|
|
64
|
+
.empty-state{display:flex;flex-direction:column;align-items:center;text-align:center;gap:10px;padding:64px 24px;background:var(--flux-surface);border:1px dashed var(--flux-border);border-radius:var(--flux-radius-xl)}
|
|
65
|
+
.empty-state h2{margin:6px 0 0}
|
|
66
|
+
.empty-state p{max-width:420px;margin:0 0 8px}
|
|
67
|
+
.overlay{position:fixed;inset:0;background:var(--flux-overlay);display:flex;justify-content:center;align-items:flex-start;padding-top:14vh;z-index:100100}
|
|
68
|
+
|
|
69
|
+
/* ---- ortak modül düzeni ---- */
|
|
70
|
+
.text-danger{color:var(--flux-danger)}
|
|
71
|
+
.ellipsis{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0;display:inline-flex;align-items:center;gap:4px}
|
|
72
|
+
.row.end{justify-content:flex-end}
|
|
73
|
+
.dot{width:8px;height:8px;border-radius:50%;display:inline-block;flex:none}
|
|
74
|
+
.pill.warn{background:color-mix(in srgb,var(--flux-warning) 16%,transparent);color:var(--flux-warning)}
|
|
75
|
+
.pill{display:inline-flex;align-items:center;gap:4px;white-space:nowrap}
|
|
76
|
+
.notice.warn{display:flex;gap:6px;align-items:center;color:var(--flux-warning);border-color:color-mix(in srgb,var(--flux-warning) 40%,transparent)}
|
|
77
|
+
.tone-accent .card-icon{background:color-mix(in srgb,var(--flux-primary) 14%,transparent);color:var(--flux-primary)}
|
|
78
|
+
.btn-primary.danger-bg{background:var(--flux-danger);color:#fff}
|
|
79
|
+
.loading{display:grid;place-items:center;padding:40px;color:var(--flux-text-muted)}
|
|
80
|
+
/* A short wait shows no spinner (no flash when a screen opens from the cache or the preload). */
|
|
81
|
+
.loading{animation:flux-loading-in .2s ease-out .25s both}
|
|
82
|
+
@keyframes flux-loading-in{from{opacity:0}to{opacity:1}}
|
|
83
|
+
.empty-mini{display:flex;flex-direction:column;align-items:center;gap:6px;text-align:center;padding:56px 24px;color:var(--flux-text-muted)}
|
|
84
|
+
.empty-mini strong{color:var(--flux-text)}
|
|
85
|
+
.field textarea{padding:10px 12px;border-radius:var(--flux-radius-md);border:1px solid var(--flux-border);background:var(--flux-bg);font:inherit;color:inherit;resize:vertical;outline:none}
|
|
86
|
+
.field textarea:focus{border-color:var(--flux-primary)}
|
|
87
|
+
.check{display:flex;align-items:center;gap:8px;padding:5px 0;font-size:var(--flux-font-md);cursor:pointer}
|
|
88
|
+
.check input{width:16px;height:16px;accent-color:var(--flux-primary)}
|
|
89
|
+
.sub-title{font-size:var(--flux-font-sm);font-weight:600;color:var(--flux-text-muted);text-transform:uppercase;letter-spacing:.04em;margin:20px 0 8px}
|
|
90
|
+
h2.big{font-size:var(--flux-font-xl);margin:0}
|
|
91
|
+
.overlay.center-y{align-items:center;padding-top:0}
|
|
92
|
+
.modal{width:min(460px,calc(100% - 32px));background:var(--flux-surface);border:1px solid var(--flux-border);border-radius:var(--flux-radius-xl);padding:22px;box-shadow:0 30px 80px -20px rgba(0,0,0,.45);max-height:90vh;overflow:auto}
|
|
93
|
+
.modal.wide{width:auto;max-width:min(900px,calc(100% - 32px));padding:10px}
|
|
94
|
+
.modal-title{font-size:var(--flux-font-lg);margin-bottom:14px}
|
|
95
|
+
.zoom-img{display:block;max-width:100%;max-height:84vh;border-radius:var(--flux-radius-md)}
|
|
96
|
+
.toast{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);background:var(--flux-text);color:var(--flux-bg);padding:10px 18px;border-radius:999px;font-size:var(--flux-font-sm);font-weight:550;box-shadow:0 10px 30px rgba(0,0,0,.25);z-index:100110}
|
|
97
|
+
.search-inline{display:flex;align-items:center;gap:6px;height:32px;padding:0 10px;border:1px solid var(--flux-border);border-radius:var(--flux-radius-md);background:var(--flux-bg);color:var(--flux-text-muted);min-width:180px}
|
|
98
|
+
.search-inline.full{width:100%}
|
|
99
|
+
.search-inline input{border:0;outline:0;background:none;flex:1;min-width:0;font-size:var(--flux-font-sm);color:var(--flux-text)}
|
|
100
|
+
.tabs{display:flex;gap:4px;background:var(--flux-surface2);padding:3px;border-radius:var(--flux-radius-md)}
|
|
101
|
+
.tabs button{flex:1;height:28px;border-radius:7px;font-size:var(--flux-font-xs);color:var(--flux-text-muted);font-weight:550}
|
|
102
|
+
.tabs button.on{background:var(--flux-surface);color:var(--flux-text);box-shadow:0 1px 3px rgba(0,0,0,.12)}
|
|
103
|
+
|
|
104
|
+
.split{display:flex;height:100%;min-height:0}
|
|
105
|
+
.split-list{width:360px;flex:none;display:flex;flex-direction:column;border-right:1px solid var(--flux-border);background:var(--flux-surface);min-height:0}
|
|
106
|
+
.split-list.wide{flex:1;width:auto;border-right:0;background:var(--flux-bg)}
|
|
107
|
+
.split-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:20px 18px 12px}
|
|
108
|
+
.split-head.column{flex-direction:column;align-items:stretch}
|
|
109
|
+
.split-head h1{font-size:var(--flux-font-lg)}
|
|
110
|
+
html.platform-desktop .split-head,html.platform-desktop .subnav,html.platform-desktop .convo-head,html.platform-desktop .drawer-head{padding-top:36px}
|
|
111
|
+
.rows{flex:1;overflow:auto;padding:0 8px 16px}
|
|
112
|
+
.row-item{width:100%;display:flex;align-items:center;gap:12px;padding:10px;border-radius:var(--flux-radius-md);text-align:left}
|
|
113
|
+
.row-item:hover{background:var(--flux-surface2)}
|
|
114
|
+
.row-item.sel{background:var(--flux-sidebar-active)}
|
|
115
|
+
.row-item .grow{display:flex;flex-direction:column;gap:3px}
|
|
116
|
+
.row-line{display:flex;align-items:center;justify-content:space-between;gap:8px;min-width:0}
|
|
117
|
+
.row-line strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
|
|
118
|
+
.row-line strong.normal{font-weight:500}
|
|
119
|
+
.amount{font-weight:650;white-space:nowrap}
|
|
120
|
+
.split-detail{flex:1;min-width:0;overflow:auto;background:var(--flux-bg)}
|
|
121
|
+
.split-detail.flush{overflow:hidden;display:flex}
|
|
122
|
+
.detail{max-width:720px;padding:28px 32px 40px}
|
|
123
|
+
.detail-head{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;margin-bottom:16px}
|
|
124
|
+
.detail-head p{margin:4px 0 0}
|
|
125
|
+
.facts{display:flex;flex-direction:column;gap:6px;margin:12px 0 16px;font-size:var(--flux-font-md)}
|
|
126
|
+
.facts div{display:flex;align-items:center;gap:8px}
|
|
127
|
+
.facts svg{color:var(--flux-text-muted);flex:none}
|
|
128
|
+
.lines{width:100%;border-collapse:collapse;background:var(--flux-surface);border:1px solid var(--flux-border);border-radius:var(--flux-radius-md);overflow:hidden}
|
|
129
|
+
.lines td{padding:10px 14px;border-top:1px solid var(--flux-border)}
|
|
130
|
+
.lines tr:first-child td{border-top:0}
|
|
131
|
+
.lines .num{text-align:right;font-weight:600}
|
|
132
|
+
.receipt{display:flex;flex-direction:column;gap:8px;align-items:flex-start}
|
|
133
|
+
.receipt-img{border:1px solid var(--flux-border);border-radius:var(--flux-radius-md);overflow:hidden;background:var(--flux-surface);cursor:zoom-in}
|
|
134
|
+
.receipt-img img{display:block;max-width:320px;max-height:380px}
|
|
135
|
+
.detail-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:28px;padding-top:18px;border-top:1px solid var(--flux-border)}
|
|
136
|
+
|
|
137
|
+
/* görevler */
|
|
138
|
+
.subnav{width:220px;flex:none;padding:20px 10px;border-right:1px solid var(--flux-border);background:var(--flux-surface);display:flex;flex-direction:column;gap:2px;overflow:auto}
|
|
139
|
+
.subnav h1{font-size:var(--flux-font-lg);padding:0 8px 12px}
|
|
140
|
+
.subnav .menu-label{margin-top:14px}
|
|
141
|
+
.subnav-item{display:flex;align-items:center;gap:10px;height:34px;padding:0 10px;border-radius:var(--flux-radius-md);font-size:var(--flux-font-md);text-align:left}
|
|
142
|
+
.subnav-item:hover{background:var(--flux-surface2)}
|
|
143
|
+
.subnav-item.active{background:var(--flux-sidebar-active);font-weight:600}
|
|
144
|
+
.quick-add{display:flex;align-items:center;gap:10px;margin:0 16px 8px;padding:0 12px;height:40px;border:1px dashed var(--flux-border);border-radius:var(--flux-radius-md);background:var(--flux-surface)}
|
|
145
|
+
.quick-add input{flex:1;border:0;outline:0;background:none;font-size:var(--flux-font-md)}
|
|
146
|
+
.task-row{display:flex;align-items:center;gap:10px;padding:8px 10px;margin:0 8px;border-radius:var(--flux-radius-md);border-bottom:1px solid var(--flux-border)}
|
|
147
|
+
.task-row:hover{background:var(--flux-surface)}
|
|
148
|
+
.task-row.sel{background:var(--flux-surface);box-shadow:inset 3px 0 0 var(--flux-primary)}
|
|
149
|
+
.task-row.done .task-title{text-decoration:line-through;color:var(--flux-text-muted)}
|
|
150
|
+
.task-check{color:var(--flux-text-muted);display:grid;place-items:center}
|
|
151
|
+
.task-row.done .task-check{color:var(--flux-success)}
|
|
152
|
+
.task-main{display:flex;flex-direction:column;gap:3px;text-align:left}
|
|
153
|
+
.task-title{display:inline-flex;align-items:center;gap:6px}
|
|
154
|
+
.task-meta{display:flex;align-items:center;gap:10px}
|
|
155
|
+
.task-meta span{display:inline-flex;align-items:center;gap:3px}
|
|
156
|
+
.due{white-space:nowrap;color:var(--flux-text-muted)}
|
|
157
|
+
.avatars{display:flex}
|
|
158
|
+
.avatars .avatar{margin-left:-6px;border:2px solid var(--flux-bg)}
|
|
159
|
+
.drawer{width:400px;flex:none;border-left:1px solid var(--flux-border);background:var(--flux-surface);display:flex;flex-direction:column;min-height:0}
|
|
160
|
+
.drawer-head{display:flex;align-items:center;gap:6px;padding:14px 14px 0}
|
|
161
|
+
.drawer-body{padding:12px 20px 28px;overflow:auto;display:flex;flex-direction:column;align-items:stretch}
|
|
162
|
+
.drawer-body > .btn-primary,.drawer-body > .btn-ghost{align-self:flex-start;margin-bottom:6px}
|
|
163
|
+
.prose{font-size:var(--flux-font-md);line-height:1.55;margin-top:10px}
|
|
164
|
+
.prose p{margin:0 0 8px}
|
|
165
|
+
.comment{display:flex;gap:10px;padding:8px 0}
|
|
166
|
+
.comment p{margin:3px 0 0;font-size:var(--flux-font-md)}
|
|
167
|
+
.composer{display:flex;align-items:center;gap:6px;margin-top:10px;border:1px solid var(--flux-border);border-radius:var(--flux-radius-md);padding:4px 4px 4px 12px;background:var(--flux-bg)}
|
|
168
|
+
.composer input,.composer textarea{flex:1;border:0;outline:0;background:none;font:inherit;color:inherit;resize:none}
|
|
169
|
+
|
|
170
|
+
/* whatsapp */
|
|
171
|
+
.convo{display:flex;flex-direction:column;flex:1;min-width:0}
|
|
172
|
+
.convo-head{display:flex;align-items:center;gap:12px;padding:14px 20px;border-bottom:1px solid var(--flux-border);background:var(--flux-surface)}
|
|
173
|
+
.toggle{display:inline-flex;align-items:center;gap:6px;height:30px;padding:0 12px;border-radius:999px;border:1px solid var(--flux-border);font-size:var(--flux-font-xs);font-weight:600;color:var(--flux-text-muted)}
|
|
174
|
+
.toggle.on{background:color-mix(in srgb,var(--flux-success) 14%,transparent);border-color:transparent;color:var(--flux-success)}
|
|
175
|
+
.messages{flex:1;overflow:auto;padding:20px 24px;display:flex;flex-direction:column;gap:6px;background:var(--flux-bg)}
|
|
176
|
+
.bubble{max-width:min(520px,75%);padding:8px 12px 6px;border-radius:14px;background:var(--flux-surface);border:1px solid var(--flux-border);align-self:flex-start;display:flex;flex-direction:column;gap:4px}
|
|
177
|
+
.bubble.out{align-self:flex-end;background:color-mix(in srgb,var(--flux-primary) 12%,var(--flux-surface));border-color:transparent}
|
|
178
|
+
.bubble.out.by-bot{background:color-mix(in srgb,var(--flux-accent) 14%,var(--flux-surface))}
|
|
179
|
+
.bubble p{margin:0;white-space:pre-wrap;line-height:1.45}
|
|
180
|
+
.bubble img{display:block;max-width:260px;border-radius:10px}
|
|
181
|
+
.bubble .by{font-size:11px;color:var(--flux-text-muted);display:inline-flex;gap:4px;align-items:center}
|
|
182
|
+
.bubble .meta{align-self:flex-end;font-size:11px;color:var(--flux-text-muted);display:inline-flex;gap:4px;align-items:center}
|
|
183
|
+
.bubble .read{color:var(--flux-primary)}
|
|
184
|
+
.bubble .file{display:inline-flex;gap:6px;align-items:center}
|
|
185
|
+
.composer.big{margin:0;border-radius:0;border:0;border-top:1px solid var(--flux-border);padding:10px 12px 10px 20px;background:var(--flux-surface)}
|
|
186
|
+
.composer.big textarea{min-height:24px;max-height:140px;padding:8px 0}
|
|
187
|
+
.composer.big .btn-primary{width:40px;padding:0}
|
|
188
|
+
|
|
189
|
+
@media (max-width:1100px){
|
|
190
|
+
.split.three.has-drawer .subnav{display:none}
|
|
191
|
+
.drawer{width:340px}
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
/* ---------- WhatsApp (Flux Chat) ---------- */
|
|
196
|
+
.wa{position:relative}
|
|
197
|
+
.wa .tabs.scroll{overflow-x:auto;scrollbar-width:none;flex-wrap:nowrap}
|
|
198
|
+
.wa .tabs.scroll button{white-space:nowrap}
|
|
199
|
+
.wa-chips{display:flex;gap:6px;flex-wrap:wrap}
|
|
200
|
+
.wa-chips button{display:inline-flex;align-items:center;gap:6px;height:26px;padding:0 10px;border-radius:999px;border:1px solid var(--flux-border);font-size:var(--flux-font-xs);color:var(--flux-text-muted)}
|
|
201
|
+
.wa-chips button.on{background:var(--flux-sidebar-active);color:var(--flux-text);border-color:transparent;font-weight:600}
|
|
202
|
+
.wa-chips i,.wa-dot{width:8px;height:8px;border-radius:50%;display:inline-block;flex:none}
|
|
203
|
+
.wa-banner{display:flex;align-items:center;gap:8px;margin:0 12px 8px;padding:8px 10px;border-radius:var(--flux-radius-sm);font-size:var(--flux-font-xs);font-weight:550}
|
|
204
|
+
.wa-banner.warn{background:color-mix(in srgb,var(--flux-warning) 14%,transparent);color:var(--flux-warning)}
|
|
205
|
+
.wa-banner.danger{background:color-mix(in srgb,var(--flux-danger) 12%,transparent);color:var(--flux-danger)}
|
|
206
|
+
.wa-row-item.fresh{animation:wa-fresh 2.4s ease-out}
|
|
207
|
+
@keyframes wa-fresh{from{background:color-mix(in srgb,var(--flux-accent) 22%,transparent)}to{background:transparent}}
|
|
208
|
+
.wa-preview{display:inline-flex;align-items:center;gap:4px;min-width:0}
|
|
209
|
+
.wa-preview svg{flex:none}
|
|
210
|
+
.wa-row-badges{display:inline-flex;align-items:center;gap:5px;flex:none}
|
|
211
|
+
.wa-typing,.accent{color:var(--flux-accent)!important;font-weight:550}
|
|
212
|
+
.read{color:var(--flux-primary)}
|
|
213
|
+
.wa-convo{position:relative;min-height:0}
|
|
214
|
+
.wa-convo .convo-head{gap:8px}
|
|
215
|
+
.wa-back{display:none;font-size:26px;line-height:1}
|
|
216
|
+
.wa-assign{height:30px;border-radius:999px;border:1px solid var(--flux-border);background:var(--flux-surface);color:var(--flux-text-muted);font:inherit;font-size:var(--flux-font-xs);padding:0 8px;max-width:150px}
|
|
217
|
+
.toggle.warn{background:color-mix(in srgb,var(--flux-warning) 14%,transparent);border-color:transparent;color:var(--flux-warning)}
|
|
218
|
+
.wa-messages{padding:16px 6% 20px;overflow-anchor:none}
|
|
219
|
+
.wa-inner{display:flex;flex-direction:column;gap:2px}
|
|
220
|
+
.wa-item{display:flex;flex-direction:column}
|
|
221
|
+
.wa-day{display:flex;justify-content:center;margin:14px 0 8px;position:sticky;top:0;z-index:2}
|
|
222
|
+
.wa-day span,.wa-system span{background:var(--flux-surface);border:1px solid var(--flux-border);border-radius:8px;padding:3px 10px;font-size:var(--flux-font-xs);color:var(--flux-text-muted)}
|
|
223
|
+
.wa-system{display:flex;justify-content:center;margin:6px 0;text-align:center}
|
|
224
|
+
.wa-row{display:flex;flex-direction:column;align-items:flex-start;position:relative;max-width:min(560px,78%)}
|
|
225
|
+
.wa-row.out,.wa-row.note{align-self:flex-end;align-items:flex-end}
|
|
226
|
+
.wa-bubble{position:relative;padding:6px 10px 5px;border-radius:12px;background:var(--flux-surface);border:1px solid var(--flux-border);display:flex;flex-direction:column;gap:4px;min-width:84px;margin-top:2px}
|
|
227
|
+
.wa-bubble.first{margin-top:8px}
|
|
228
|
+
.wa-bubble.in.first{border-top-left-radius:4px}
|
|
229
|
+
.wa-bubble.out.first,.wa-bubble.note.first{border-top-right-radius:4px}
|
|
230
|
+
.wa-bubble.out{background:color-mix(in srgb,var(--flux-primary) 13%,var(--flux-surface));border-color:transparent}
|
|
231
|
+
.wa-bubble.out.by-bot{background:color-mix(in srgb,var(--flux-accent) 15%,var(--flux-surface))}
|
|
232
|
+
.wa-bubble.note{background:color-mix(in srgb,var(--flux-warning) 14%,var(--flux-surface));border:1px dashed color-mix(in srgb,var(--flux-warning) 50%,transparent)}
|
|
233
|
+
.wa-bubble.flash{animation:wa-flash 1.6s ease-out}
|
|
234
|
+
@keyframes wa-flash{0%,30%{box-shadow:0 0 0 3px color-mix(in srgb,var(--flux-primary) 45%,transparent)}100%{box-shadow:none}}
|
|
235
|
+
.wa-bubble.big-emoji{background:none;border:0;padding:0 2px}
|
|
236
|
+
.wa-bubble.big-emoji .wa-text{font-size:40px;line-height:1.15}
|
|
237
|
+
.wa-bubble.is-sticker{background:none;border:0}
|
|
238
|
+
.wa-text{white-space:pre-wrap;word-break:break-word;line-height:1.45}
|
|
239
|
+
.wa-text pre,.wa-text code{font-family:var(--flux-font-mono);font-size:.92em;background:var(--flux-surface2);border-radius:4px}
|
|
240
|
+
.wa-text code{padding:0 4px}
|
|
241
|
+
.wa-text pre{padding:6px 8px;margin:2px 0;white-space:pre-wrap}
|
|
242
|
+
.wa-by,.wa-sender{font-size:11px;font-weight:600;color:var(--flux-text-muted);display:inline-flex;gap:4px;align-items:center}
|
|
243
|
+
.wa-sender{color:var(--flux-accent)}
|
|
244
|
+
.wa-meta{align-self:flex-end;font-size:10.5px;color:var(--flux-text-muted);display:inline-flex;gap:4px;align-items:center;margin-top:-2px}
|
|
245
|
+
.wa-meta span{display:inline-flex;gap:2px;align-items:center}
|
|
246
|
+
.wa-more{position:absolute;top:3px;right:4px;opacity:0;color:var(--flux-text-muted);background:inherit;border-radius:6px;transition:opacity .12s}
|
|
247
|
+
.wa-bubble:hover .wa-more{opacity:1}
|
|
248
|
+
.wa-react-btn{position:absolute;top:50%;transform:translateY(-50%);right:-32px;opacity:0;color:var(--flux-text-muted);width:26px;height:26px;border-radius:50%;display:grid;place-items:center;background:var(--flux-surface);border:1px solid var(--flux-border)}
|
|
249
|
+
.wa-row.out .wa-react-btn{right:auto;left:-32px}
|
|
250
|
+
.wa-row:hover .wa-react-btn{opacity:1}
|
|
251
|
+
.wa-menu{position:absolute;top:26px;right:0;z-index:20;min-width:190px;background:var(--flux-surface);border:1px solid var(--flux-border);border-radius:var(--flux-radius-md);box-shadow:0 14px 36px rgba(0,0,0,.18);padding:6px;display:flex;flex-direction:column}
|
|
252
|
+
.wa-row.in .wa-menu{right:auto;left:0}
|
|
253
|
+
.wa-menu>button{display:flex;align-items:center;gap:10px;height:34px;padding:0 10px;border-radius:7px;font-size:var(--flux-font-sm);color:var(--flux-text)}
|
|
254
|
+
.wa-menu>button:hover{background:var(--flux-surface2)}
|
|
255
|
+
.wa-menu-react{display:flex;gap:2px;padding:2px 2px 6px;border-bottom:1px solid var(--flux-border);margin-bottom:4px}
|
|
256
|
+
.wa-menu-react button{font-size:22px;width:34px;height:34px;border-radius:50%}
|
|
257
|
+
.wa-menu-react button:hover{background:var(--flux-surface2);transform:scale(1.12)}
|
|
258
|
+
.wa-reacts{margin-top:-6px;padding:1px 6px;background:var(--flux-surface);border:1px solid var(--flux-border);border-radius:999px;font-size:14px;z-index:1;margin-left:8px;margin-right:8px}
|
|
259
|
+
.wa-failed{display:inline-flex;gap:4px;align-items:center;font-size:var(--flux-font-xs);color:var(--flux-danger);margin-top:3px;font-weight:550}
|
|
260
|
+
.wa-quote{display:flex;flex-direction:column;align-items:flex-start;text-align:left;gap:1px;padding:5px 8px;border-left:3px solid var(--flux-accent);border-radius:6px;background:color-mix(in srgb,var(--flux-text) 6%,transparent);font-size:var(--flux-font-xs);min-width:0;max-width:100%}
|
|
261
|
+
.wa-quote.out,.wa-quote.note{border-left-color:var(--flux-primary)}
|
|
262
|
+
.wa-quote strong{color:var(--flux-accent);font-size:11px}
|
|
263
|
+
.wa-quote.out strong{color:var(--flux-primary)}
|
|
264
|
+
.wa-quote .ellipsis{max-width:100%}
|
|
265
|
+
.wa-img{display:block;padding:0;border-radius:8px;overflow:hidden;max-width:300px;width:100%;background:var(--flux-surface2);cursor:zoom-in}
|
|
266
|
+
.wa-img img{display:block;width:100%;height:100%;object-fit:cover}
|
|
267
|
+
.wa-img img.blur{filter:blur(6px)}
|
|
268
|
+
.wa-img.sticker{background:none;max-width:150px}
|
|
269
|
+
.wa-img-ph{display:block;width:240px;height:160px;border-radius:8px;background:var(--flux-surface2)}
|
|
270
|
+
.wa-video,.wa-video-ph{display:block;max-width:320px;width:100%;border-radius:8px}
|
|
271
|
+
.wa-video-ph{position:relative;aspect-ratio:16/10;background:#111;color:#fff;display:grid;place-items:center;overflow:hidden}
|
|
272
|
+
.wa-video-ph img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;opacity:.7}
|
|
273
|
+
.wa-video-ph svg{position:relative}
|
|
274
|
+
.wa-doc{display:flex;align-items:center;gap:10px;padding:8px 10px;border-radius:8px;background:color-mix(in srgb,var(--flux-text) 5%,transparent);min-width:230px;max-width:320px;text-align:left}
|
|
275
|
+
.wa-doc .grow{display:flex;flex-direction:column;align-items:flex-start;min-width:0}
|
|
276
|
+
.wa-loc,.wa-contact{display:flex;align-items:center;gap:8px;padding:6px 4px}
|
|
277
|
+
.wa-audio{display:flex;align-items:center;gap:8px;min-width:240px;padding:2px 0}
|
|
278
|
+
.wa-audio-btn{width:36px;height:36px;border-radius:50%;display:grid;place-items:center;background:var(--flux-primary);color:var(--flux-primary-contrast);flex:none}
|
|
279
|
+
.wa-audio input[type=range]{flex:1;accent-color:var(--flux-primary);min-width:80px}
|
|
280
|
+
.wa-audio-time{font-size:11px;color:var(--flux-text-muted);font-variant-numeric:tabular-nums;min-width:32px}
|
|
281
|
+
.wa-audio-speed{font-size:11px;font-weight:650;padding:2px 6px;border-radius:999px;background:var(--flux-surface2);color:var(--flux-text-muted)}
|
|
282
|
+
.wa-lp{display:flex;flex-direction:column;border-radius:8px;overflow:hidden;background:color-mix(in srgb,var(--flux-text) 5%,transparent);text-decoration:none;color:inherit;max-width:320px}
|
|
283
|
+
.wa-lp img{width:100%;max-height:160px;object-fit:cover}
|
|
284
|
+
.wa-lp>span{display:flex;flex-direction:column;gap:2px;padding:7px 9px}
|
|
285
|
+
.clamp2{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
|
|
286
|
+
.xsmall{font-size:11px}
|
|
287
|
+
.wa-rcheck{font-size:11px;font-weight:600;padding:3px 8px;border-radius:6px;background:color-mix(in srgb,var(--flux-success) 14%,transparent);color:var(--flux-success)}
|
|
288
|
+
.wa-rcheck.warn,.wa-rcheck.mismatch{background:color-mix(in srgb,var(--flux-warning) 16%,transparent);color:var(--flux-warning)}
|
|
289
|
+
.wa-rcheck.fail,.wa-rcheck.fake{background:color-mix(in srgb,var(--flux-danger) 14%,transparent);color:var(--flux-danger)}
|
|
290
|
+
.wa-lightbox{position:fixed;inset:0;z-index:70;background:rgba(0,0,0,.86);display:grid;place-items:center;cursor:zoom-out;padding:24px}
|
|
291
|
+
.wa-lightbox img{max-width:100%;max-height:100%;object-fit:contain;border-radius:6px}
|
|
292
|
+
.wa-down{position:absolute;right:22px;bottom:84px;width:40px;height:40px;border-radius:50%;background:var(--flux-surface);border:1px solid var(--flux-border);box-shadow:0 6px 18px rgba(0,0,0,.14);display:grid;place-items:center;color:var(--flux-text-muted);z-index:5}
|
|
293
|
+
.wa-down .badge{position:absolute;top:-6px;right:-6px}
|
|
294
|
+
.wa-composer{position:relative;border-top:1px solid var(--flux-border);background:var(--flux-surface);padding:8px 12px}
|
|
295
|
+
.wa-composer.drag{outline:2px dashed var(--flux-primary);outline-offset:-6px}
|
|
296
|
+
.wa-composer.note{background:color-mix(in srgb,var(--flux-warning) 8%,var(--flux-surface))}
|
|
297
|
+
.wa-compose-row{display:flex;align-items:flex-end;gap:2px}
|
|
298
|
+
.wa-compose-row textarea{flex:1;border:0;outline:0;background:var(--flux-bg);border-radius:20px;padding:9px 14px;font:inherit;color:inherit;resize:none;max-height:160px;line-height:1.4;margin:0 6px}
|
|
299
|
+
.wa-compose-row .icon-btn{width:36px;height:38px}
|
|
300
|
+
.wa-send{width:40px;height:40px;padding:0;border-radius:50%}
|
|
301
|
+
.wa-note-hint{display:flex;gap:6px;align-items:center;font-size:var(--flux-font-xs);color:var(--flux-warning);font-weight:550;padding:2px 4px 6px}
|
|
302
|
+
.wa-quote-bar,.wa-file-bar{display:flex;align-items:center;gap:8px;padding:4px 4px 8px}
|
|
303
|
+
.wa-quote-bar .wa-quote{flex:1}
|
|
304
|
+
.wa-file-bar img{width:44px;height:44px;object-fit:cover;border-radius:6px}
|
|
305
|
+
.wa-picker{position:absolute;left:12px;right:12px;bottom:100%;margin-bottom:6px;background:var(--flux-surface);border:1px solid var(--flux-border);border-radius:var(--flux-radius-md);box-shadow:0 14px 36px rgba(0,0,0,.16);padding:6px;display:flex;flex-direction:column;max-height:300px;overflow:auto;z-index:10}
|
|
306
|
+
.wa-picker button{display:flex;flex-direction:column;align-items:flex-start;gap:1px;padding:7px 10px;border-radius:7px;text-align:left;font-size:var(--flux-font-sm);min-width:0}
|
|
307
|
+
.wa-picker button.on{background:var(--flux-surface2)}
|
|
308
|
+
.wa-picker .ellipsis{max-width:100%}
|
|
309
|
+
.spin-slow{animation:wa-spin 1.4s linear infinite}
|
|
310
|
+
@keyframes wa-spin{to{transform:rotate(360deg)}}
|
|
311
|
+
@media (max-width:899px){
|
|
312
|
+
.wa.split .split-list{width:100%;max-width:none;flex:1}
|
|
313
|
+
.wa.split .split-detail{display:none}
|
|
314
|
+
.wa.split.has-chat .split-list{display:none}
|
|
315
|
+
.wa.split.has-chat .split-detail{display:flex}
|
|
316
|
+
.wa-back{display:inline-grid}
|
|
317
|
+
.wa-assign{display:none}
|
|
318
|
+
.wa-messages{padding:12px 10px}
|
|
319
|
+
.wa-row{max-width:88%}
|
|
320
|
+
.wa-react-btn{display:none}
|
|
321
|
+
.wa-convo .toggle .lbl,.wa-opt{display:none}
|
|
322
|
+
.wa-convo .toggle{padding:0 9px}
|
|
323
|
+
}
|
|
324
|
+
.wa-head-text{display:flex;flex-direction:column;gap:1px}
|
|
325
|
+
.wa-head-text>*{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
|
|
326
|
+
.wa-list-title{gap:6px}
|
|
327
|
+
.wa-head-who{display:flex;align-items:center;gap:10px;flex:1;min-width:0;text-align:left;padding:2px 4px;border-radius:var(--flux-radius-sm)}
|
|
328
|
+
.wa-head-who:hover{background:var(--flux-surface2)}
|
|
329
|
+
.wa-body{display:flex;flex:1;min-height:0}
|
|
330
|
+
.wa-main{display:flex;flex-direction:column;flex:1;min-width:0;position:relative}
|
|
331
|
+
.wa-info{width:320px;flex:none;border-left:1px solid var(--flux-border);background:var(--flux-surface);display:flex;flex-direction:column;min-height:0}
|
|
332
|
+
.wa-info>header{display:flex;align-items:center;justify-content:space-between;padding:12px 14px;border-bottom:1px solid var(--flux-border)}
|
|
333
|
+
.wa-info-body{overflow:auto;padding:16px;display:flex;flex-direction:column;gap:18px}
|
|
334
|
+
.wa-info-hero{display:flex;flex-direction:column;align-items:center;gap:6px;text-align:center}
|
|
335
|
+
.wa-info-name{font:inherit;font-size:var(--flux-font-lg);font-weight:650;text-align:center;border:1px solid transparent;border-radius:var(--flux-radius-sm);background:none;color:inherit;padding:4px 8px;width:100%}
|
|
336
|
+
.wa-info-name:hover,.wa-info-name:focus{border-color:var(--flux-border);outline:none}
|
|
337
|
+
.wa-info h3{font-size:var(--flux-font-xs);text-transform:uppercase;letter-spacing:.04em;color:var(--flux-text-muted);margin:0 0 8px;font-weight:600}
|
|
338
|
+
.wa-select,.wa-notes{width:100%;font:inherit;color:inherit;background:var(--flux-bg);border:1px solid var(--flux-border);border-radius:var(--flux-radius-sm);padding:8px 10px}
|
|
339
|
+
.wa-select{height:38px;padding:0 8px}
|
|
340
|
+
.wa-notes{resize:vertical;min-height:80px}
|
|
341
|
+
.wa-sec{list-style:none;margin:0;padding:0;display:flex;flex-direction:column}
|
|
342
|
+
.wa-sec li{display:flex;align-items:center;gap:8px;padding:8px 0;border-top:1px solid var(--flux-border)}
|
|
343
|
+
.wa-sec .grow{display:flex;flex-direction:column}
|
|
344
|
+
.wa-info-actions{display:flex;gap:8px;flex-wrap:wrap}
|
|
345
|
+
.wa-emoji-wrap{position:relative}
|
|
346
|
+
.wa-emoji{position:absolute;bottom:44px;left:0;z-index:15;width:300px;max-height:240px;overflow:auto;display:grid;grid-template-columns:repeat(8,1fr);gap:2px;padding:8px;background:var(--flux-surface);border:1px solid var(--flux-border);border-radius:var(--flux-radius-md);box-shadow:0 14px 36px rgba(0,0,0,.16)}
|
|
347
|
+
.wa-emoji button{font-size:21px;height:34px;border-radius:6px}
|
|
348
|
+
.wa-emoji button:hover{background:var(--flux-surface2)}
|
|
349
|
+
.wa-recorder{display:flex;align-items:center;gap:10px;padding:2px 0}
|
|
350
|
+
.wa-rec-dot{width:10px;height:10px;border-radius:50%;background:var(--flux-danger);animation:wa-pulse 1s ease-in-out infinite}
|
|
351
|
+
@keyframes wa-pulse{50%{opacity:.3}}
|
|
352
|
+
@media (max-width:1279px){.wa-info{position:absolute;right:0;top:0;bottom:0;z-index:12;box-shadow:-10px 0 30px rgba(0,0,0,.12)}}
|
|
353
|
+
@media (max-width:899px){.wa-info{width:100%}}
|
|
354
|
+
/* menü ikonu (Flux Admin menüsüyle aynı dil) */
|
|
355
|
+
.menu-ic{flex:none;display:inline-grid;place-items:center;border-radius:28%;background:var(--flux-surface2);color:var(--flux-text-muted)}
|
|
356
|
+
.menu-ic.img{background:none;border-radius:24%;object-fit:contain}
|
|
357
|
+
.menu-ic.toned{background:color-mix(in srgb,var(--tone) 13%,transparent);color:var(--tone)}
|
|
358
|
+
|
|
359
|
+
/* Flux onay kutusu, radyo ve anahtar (flx-brand 1.7.0 ile aynı görünüm): A = yuvarlak köşeli dolgu; role="switch" = anahtar. */
|
|
360
|
+
input:is([type=checkbox],[type=radio]) { -webkit-appearance: none; appearance: none; position: relative; display: inline-grid; place-content: center; flex: none; width: 20px; height: 20px; min-width: 20px; min-height: 0; margin: 0 6px 0 0; padding: 0; vertical-align: middle; border: 1.5px solid color-mix(in srgb, var(--flux-text-muted) 70%, var(--flux-border)); border-radius: 6px; background: var(--flux-surface); box-shadow: none; cursor: pointer; transition: border-color .15s, background-color .15s, box-shadow .15s; }
|
|
361
|
+
input:is([type=checkbox],[type=radio])[type=radio] { border-radius: 50%; }
|
|
362
|
+
input:is([type=checkbox],[type=radio])::before { content: ""; display: block; float: none; width: 12px; height: 12px; margin: 0; background: var(--flux-primary-contrast, #fff); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 8.5l3.2 3.2L13 4.8'/%3E%3C/svg%3E") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 8.5l3.2 3.2L13 4.8'/%3E%3C/svg%3E") center/contain no-repeat; transform: scale(0); transition: transform .12s; }
|
|
363
|
+
input:is([type=checkbox],[type=radio])[type=radio]::before { width: 8px; height: 8px; border-radius: 50%; -webkit-mask: none; mask: none; }
|
|
364
|
+
input:is([type=checkbox],[type=radio]):hover:not(:disabled) { border-color: var(--flux-primary); }
|
|
365
|
+
input:is([type=checkbox],[type=radio]):checked, input:is([type=checkbox],[type=radio])[type=checkbox]:indeterminate { background: var(--flux-primary); border-color: var(--flux-primary); }
|
|
366
|
+
input:is([type=checkbox],[type=radio]):checked::before { transform: scale(1); }
|
|
367
|
+
input:is([type=checkbox],[type=radio])[type=checkbox]:indeterminate::before { transform: scale(1); -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M4 8h8'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M4 8h8'/%3E%3C/svg%3E"); }
|
|
368
|
+
input:is([type=checkbox],[type=radio]):focus-visible { outline: 0; box-shadow: 0 0 0 3px color-mix(in srgb, var(--flux-primary) 25%, transparent); }
|
|
369
|
+
input:is([type=checkbox],[type=radio]):disabled { opacity: .5; cursor: default; }
|
|
370
|
+
input:is([type=checkbox],[type=radio])[type=checkbox][aria-invalid=true], input:is([type=checkbox],[type=radio])[type=radio][aria-invalid=true] { border-color: var(--flux-danger); background: color-mix(in srgb, var(--flux-danger) 10%, var(--flux-surface)); }
|
|
371
|
+
input:is([type=checkbox],[type=radio])[type=checkbox][role=switch] { width: 40px; height: 24px; min-width: 40px; border: 0; border-radius: 999px; background: color-mix(in srgb, var(--flux-text-muted) 35%, var(--flux-surface)); }
|
|
372
|
+
input:is([type=checkbox],[type=radio])[type=checkbox][role=switch]::before { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); -webkit-mask: none; mask: none; transform: none; transition: transform .18s; }
|
|
373
|
+
input:is([type=checkbox],[type=radio])[type=checkbox][role=switch]:hover:not(:disabled) { background: color-mix(in srgb, var(--flux-text-muted) 50%, var(--flux-surface)); }
|
|
374
|
+
input:is([type=checkbox],[type=radio])[type=checkbox][role=switch]:checked, input:is([type=checkbox],[type=radio])[type=checkbox][role=switch]:checked:hover:not(:disabled) { background: var(--flux-primary); }
|
|
375
|
+
input:is([type=checkbox],[type=radio])[type=checkbox][role=switch]:checked::before { transform: translateX(16px); }
|
|
376
|
+
input:is([type=checkbox],[type=radio])[type=checkbox][role=switch]:indeterminate { background: color-mix(in srgb, var(--flux-primary) 55%, var(--flux-surface)); }
|
|
377
|
+
input:is([type=checkbox],[type=radio])[type=checkbox][role=switch]:indeterminate::before { transform: translateX(8px); -webkit-mask: none; mask: none; }
|
|
378
|
+
input:is([type=checkbox],[type=radio])[type=checkbox][role=switch][aria-invalid=true] { box-shadow: 0 0 0 2px var(--flux-danger); }
|
|
379
|
+
@media (pointer: coarse) { input:is([type=checkbox],[type=radio]) { width: 24px; height: 24px; min-width: 24px; } input[type=checkbox][role=switch] { width: 46px; height: 28px; min-width: 46px; } input[type=checkbox][role=switch]::before { width: 22px; height: 22px; } input[type=checkbox][role=switch]:checked::before { transform: translateX(18px); } input[type=radio]::before { width: 10px; height: 10px; } }
|
|
380
|
+
@media (prefers-reduced-motion: reduce) { input:is([type=checkbox],[type=radio]), input:is([type=checkbox],[type=radio])::before { transition: none; } }
|
|
381
|
+
/* Check bileşeni: etiketli onay kutusu / radyo / anahtar */
|
|
382
|
+
.chk{display:flex;align-items:flex-start;gap:12px;margin:0;font-size:var(--flux-font-md);line-height:1.45;color:var(--flux-text);cursor:pointer;text-align:left}
|
|
383
|
+
.chk input{margin:2px 0 0;flex:none}
|
|
384
|
+
.chk.is-disabled{cursor:default}
|
|
385
|
+
.chk__text{flex:1 1 auto;min-width:0;padding-top:2px}
|
|
386
|
+
.chk__text small{display:block;margin-top:2px;font-size:.86em;color:var(--flux-text-muted)}
|
|
387
|
+
.chk__msg{margin:6px 0 0 36px;color:var(--flux-danger);font-size:var(--flux-font-sm);font-weight:700}
|
|
388
|
+
|
|
389
|
+
/* tarih seçici: React ekranlarında renkler --flux-* belirteçlerinden (koyu renkler date.css'te) */
|
|
390
|
+
.flx-dp:not([data-theme=dark]),.flx-dp-shade:not([data-theme=dark]){--flx-dp-bg:var(--flux-surface,#fff);--flx-dp-ink:var(--flux-text,#0F172A);--flx-dp-muted:var(--flux-text-muted,#64748B);--flx-dp-line:var(--flux-border,#E2E6EC);--flx-dp-p:var(--flux-primary,#1F2937);--flx-dp-on:var(--flux-primary-contrast,#fff);--flx-dp-hov:var(--flux-surface2,#F1F3F5)}
|
|
391
|
+
.flx-dp{--flx-dp-font:var(--flux-font-family,inherit)}
|
|
392
|
+
.flx-dt{min-height:40px;border:1px solid var(--flux-border);border-radius:var(--flux-radius-md);background:var(--flux-bg);color:var(--flux-text);font-size:var(--flux-font-md);font-weight:400}
|
|
393
|
+
.flx-dt:hover:not(:disabled){border-color:color-mix(in srgb,var(--flux-primary) 40%,var(--flux-border))}
|
|
394
|
+
.flx-dt:focus-visible,.flx-dt.is-open{outline:none;border-color:var(--flux-primary);box-shadow:0 0 0 3px color-mix(in srgb,var(--flux-primary) 22%,transparent)}
|
|
395
|
+
.flx-dt.is-empty .flx-dt__val{color:var(--flux-text-muted);opacity:1}
|
|
396
|
+
.flx-dt:disabled{opacity:.55;cursor:default}
|
package/types/Check.d.ts
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
type Props = {
|
|
3
|
+
checked: boolean;
|
|
4
|
+
onChange: (checked: boolean) => void;
|
|
5
|
+
/** Etiket (düz metin ya da düğüm). */
|
|
6
|
+
children?: ReactNode;
|
|
7
|
+
/** Etiketin altındaki küçük açıklama. */
|
|
8
|
+
note?: ReactNode;
|
|
9
|
+
/** Anahtar görünümü (role="switch"). */
|
|
10
|
+
switch?: boolean;
|
|
11
|
+
/** Radyo (tek seçim); `name` ile gruplanır. */
|
|
12
|
+
radio?: boolean;
|
|
13
|
+
/** Kısmen seçili (yalnız onay kutusu). */
|
|
14
|
+
indeterminate?: boolean;
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
/** Hata iletisi; verilirse kutu hata durumunda gösterilir. */
|
|
17
|
+
error?: string;
|
|
18
|
+
name?: string;
|
|
19
|
+
value?: string;
|
|
20
|
+
id?: string;
|
|
21
|
+
/** Etiket yoksa ekran okuyucu için ad. */
|
|
22
|
+
'aria-label'?: string;
|
|
23
|
+
className?: string;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Ortak onay kutusu / radyo / anahtar. Gerçek `<input>` korunur (klavye, form, ekran okuyucu);
|
|
27
|
+
* görünüm @fluxwp/ui stilleri ve flx-brand `flx_check` ile aynıdır.
|
|
28
|
+
*/
|
|
29
|
+
export declare function Check({ checked, onChange, children, note, switch: asSwitch, radio, indeterminate, disabled, error, name, value, id, className, ...rest }: Props): import("react").JSX.Element;
|
|
30
|
+
export {};
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Ortak tarih seçici. Görünüm ve sınıflar flx-brand `date/` ile aynı (`.flx-dp`, `.flx-dt`); CSS'i styles.css içe aktarır.
|
|
3
|
+
* Değer biçimi `YYYY-MM-DD`, `time` ile `YYYY-MM-DDTHH:MM`; boş = `''`.
|
|
4
|
+
* Dil: `locale` (yoksa `<html lang>`), hafta başı TR'de Pazartesi; metinler TR / EN gömülü.
|
|
5
|
+
*/
|
|
6
|
+
export type DateQuick = {
|
|
7
|
+
label: string;
|
|
8
|
+
value: string;
|
|
9
|
+
hint?: string;
|
|
10
|
+
};
|
|
11
|
+
type Common = {
|
|
12
|
+
/** Saat satırı (24 saat). */
|
|
13
|
+
time?: boolean;
|
|
14
|
+
/** Soldaki hızlı seçim (varsayılan açık: Bugün, Yarın, Bu cuma, Gelecek hafta, 2 hafta sonra); false ya da kendi listen. */
|
|
15
|
+
quick?: boolean | DateQuick[];
|
|
16
|
+
min?: string;
|
|
17
|
+
max?: string;
|
|
18
|
+
/** Temizle düğmesi yok. */
|
|
19
|
+
required?: boolean;
|
|
20
|
+
/** "tr-TR", "en"… */
|
|
21
|
+
locale?: string;
|
|
22
|
+
/** 0 = Pazar, 1 = Pazartesi. Varsayılan dilden. */
|
|
23
|
+
weekStart?: number;
|
|
24
|
+
};
|
|
25
|
+
export declare function parseDate(s?: string | null): Date | null;
|
|
26
|
+
/** "2026-11-20T14:30" → "20 Kasım 2026 · 14:30" (style short: "20 Kas"). */
|
|
27
|
+
export declare function formatDate(v: string, locale?: string, style?: 'long' | 'short'): string;
|
|
28
|
+
type CalendarProps = Common & {
|
|
29
|
+
value: string;
|
|
30
|
+
onPick: (v: string) => void;
|
|
31
|
+
onCancel?: () => void;
|
|
32
|
+
/** Başka bir açılır kutunun içinde: çerçeve ve gölge yok. */
|
|
33
|
+
bare?: boolean;
|
|
34
|
+
/** Telefon görünümü (alttan açılan sayfa). */
|
|
35
|
+
sheet?: boolean;
|
|
36
|
+
style?: React.CSSProperties;
|
|
37
|
+
theme?: 'dark' | 'light';
|
|
38
|
+
label?: string;
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* Takvim paneli (konumlama yok). Görünüm B (Ahmet 2026-11-17): solda hızlı seçim, sağda takvim (ay / yıl menüsü),
|
|
42
|
+
* altta yazılabilir tarih (+ saat), Vazgeç ve Uygula. Güne tıklamak seçer, Uygula (Enter, çift tık) onaylar; hızlı seçim hemen onaylar.
|
|
43
|
+
* Tasks gibi kendi açılır kutusu olan ekranlar doğrudan kullanır (`bare`).
|
|
44
|
+
*/
|
|
45
|
+
export declare function DateCalendar({ value, onPick, onCancel, time, quick, min, max, required, locale, weekStart, bare, sheet, style, theme, label }: CalendarProps): import("react").JSX.Element;
|
|
46
|
+
type PickerProps = Common & {
|
|
47
|
+
value: string;
|
|
48
|
+
onChange: (v: string) => void;
|
|
49
|
+
placeholder?: string;
|
|
50
|
+
disabled?: boolean;
|
|
51
|
+
id?: string;
|
|
52
|
+
name?: string;
|
|
53
|
+
'aria-label'?: string;
|
|
54
|
+
className?: string;
|
|
55
|
+
/** Takvim ikonu (varsayılan açık). */
|
|
56
|
+
icon?: boolean;
|
|
57
|
+
};
|
|
58
|
+
/**
|
|
59
|
+
* Tarih alanı: değeri sitenin dilinde gösteren düğme + takvim. Tarayıcının `<input type="date">`'i yerine.
|
|
60
|
+
* <DatePicker value={start} onChange={setStart} />
|
|
61
|
+
* <DatePicker value={at} onChange={setAt} time /> // tarih + saat
|
|
62
|
+
* <DatePicker value={birth} onChange={setBirth} quick={false} /> // hızlı seçim yok
|
|
63
|
+
*/
|
|
64
|
+
export declare function DatePicker({ value, onChange, placeholder, disabled, id, name, className, icon, locale, ...rest }: PickerProps): import("react").JSX.Element;
|
|
65
|
+
export {};
|
package/types/Empty.d.ts
ADDED
package/types/Icon.d.ts
ADDED