Phase 120 - Plan 01:
- Reusable PHP alert component (resources/views/components/alert.php)
with inline SVG icon per type, optional dismiss button.
- Missing .alert--info SCSS variant added (#eff6ff/#bfdbfe/#1e3a8a) -
fixes black-on-white alert after Fakturownia test connection.
- Flash::push(type, message) + Flash::all() with BC for set/get;
legacy key heuristic (error/.save/warning -> typed entries).
- Central flash renderer in 3 layouts (app/auth/public) iterating
Flash::all() through component (.alerts-stack wrap).
- Vanilla JS alert-dismiss.js with idempotent guard and delegated
click handler on [data-alert-dismiss].
- 36 views migrated off inline <div class="alert alert--TYPE">;
.flash--error/success removed from views (orders/show, shipments/prepare).
- SCSS rebuilt: public/assets/css/{app,login}.css.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
379 lines
6.2 KiB
SCSS
379 lines
6.2 KiB
SCSS
:root {
|
|
--c-primary: #6690f4;
|
|
--c-primary-dark: #3164db;
|
|
--c-action-primary: #0f766e;
|
|
--c-action-primary-dark: #0b5f59;
|
|
--c-bg: #f4f6f9;
|
|
--c-surface: #ffffff;
|
|
--c-text: #4e5e6a;
|
|
--c-text-strong: #2d3748;
|
|
--c-muted: #718096;
|
|
--c-border: #b0bec5;
|
|
--c-danger: #cc0000;
|
|
--focus-ring: 0 0 0 3px rgba(102, 144, 244, 0.15);
|
|
--focus-ring-action: 0 0 0 3px rgba(15, 118, 110, 0.18);
|
|
--shadow-card: 0 1px 4px rgba(0, 0, 0, 0.06);
|
|
}
|
|
|
|
.btn {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
min-height: 34px;
|
|
padding: 6px 12px;
|
|
border: 1px solid transparent;
|
|
border-radius: 8px;
|
|
font: inherit;
|
|
font-weight: 600;
|
|
text-decoration: none;
|
|
cursor: pointer;
|
|
transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.1s ease;
|
|
}
|
|
|
|
.btn--primary {
|
|
color: #ffffff;
|
|
background: var(--c-action-primary);
|
|
}
|
|
|
|
.btn--primary:hover {
|
|
background: var(--c-action-primary-dark);
|
|
}
|
|
|
|
.btn--secondary {
|
|
color: var(--c-text-strong);
|
|
border-color: var(--c-border);
|
|
background: var(--c-surface);
|
|
}
|
|
|
|
.btn--secondary:hover {
|
|
border-color: #cbd5e0;
|
|
background: #f8fafc;
|
|
}
|
|
|
|
.btn--danger {
|
|
color: #ffffff;
|
|
border-color: #b91c1c;
|
|
background: #dc2626;
|
|
}
|
|
|
|
.btn--danger:hover {
|
|
border-color: #991b1b;
|
|
background: #b91c1c;
|
|
}
|
|
|
|
.btn--sm {
|
|
min-height: 28px;
|
|
padding: 3px 10px;
|
|
font-size: 12px;
|
|
}
|
|
|
|
.btn--block {
|
|
width: 100%;
|
|
}
|
|
|
|
.btn--disabled {
|
|
opacity: 0.3;
|
|
cursor: not-allowed;
|
|
pointer-events: none;
|
|
}
|
|
|
|
.btn:active {
|
|
transform: translateY(1px);
|
|
}
|
|
|
|
.btn:focus-visible {
|
|
outline: none;
|
|
box-shadow: var(--focus-ring-action);
|
|
border-color: var(--c-action-primary);
|
|
}
|
|
|
|
.form-control {
|
|
width: 100%;
|
|
min-height: 30px;
|
|
border: 1px solid var(--c-border);
|
|
border-radius: 6px;
|
|
padding: 4px 8px;
|
|
font: inherit;
|
|
color: var(--c-text-strong);
|
|
background: #ffffff;
|
|
transition: border-color 0.2s ease, box-shadow 0.2s ease;
|
|
}
|
|
|
|
.form-control:focus {
|
|
outline: none;
|
|
border-color: var(--c-primary);
|
|
box-shadow: var(--focus-ring);
|
|
}
|
|
|
|
.input {
|
|
min-height: 34px;
|
|
border: 1px solid var(--c-border);
|
|
border-radius: 8px;
|
|
padding: 5px 10px;
|
|
font: inherit;
|
|
color: var(--c-text-strong);
|
|
background: #ffffff;
|
|
}
|
|
|
|
.input--sm {
|
|
min-height: 28px;
|
|
padding: 3px 8px;
|
|
font-size: 12px;
|
|
}
|
|
|
|
.flash {
|
|
padding: 8px 12px;
|
|
border-radius: 6px;
|
|
font-size: 13px;
|
|
}
|
|
|
|
.flash--success {
|
|
border: 1px solid #b7ebcf;
|
|
background: #f0fff6;
|
|
color: #0f6b39;
|
|
}
|
|
|
|
.flash--error {
|
|
border: 1px solid #fed7d7;
|
|
background: #fff5f5;
|
|
color: var(--c-danger);
|
|
}
|
|
|
|
.alert {
|
|
display: flex;
|
|
align-items: flex-start;
|
|
gap: 10px;
|
|
padding: 12px 14px;
|
|
border-radius: 8px;
|
|
border: 1px solid transparent;
|
|
font-size: 13px;
|
|
min-height: 44px;
|
|
line-height: 1.4;
|
|
|
|
&__icon {
|
|
flex: 0 0 18px;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
width: 18px;
|
|
height: 18px;
|
|
line-height: 1;
|
|
color: inherit;
|
|
|
|
svg {
|
|
width: 18px;
|
|
height: 18px;
|
|
display: block;
|
|
}
|
|
}
|
|
|
|
&__body {
|
|
flex: 1;
|
|
min-width: 0;
|
|
word-break: break-word;
|
|
}
|
|
|
|
&__dismiss {
|
|
flex: 0 0 auto;
|
|
margin-left: auto;
|
|
align-self: flex-start;
|
|
background: transparent;
|
|
border: 0;
|
|
padding: 2px 6px;
|
|
cursor: pointer;
|
|
color: inherit;
|
|
opacity: 0.55;
|
|
font-size: 16px;
|
|
line-height: 1;
|
|
border-radius: 4px;
|
|
transition: opacity 0.15s ease, background-color 0.15s ease;
|
|
|
|
&:hover,
|
|
&:focus-visible {
|
|
opacity: 1;
|
|
background-color: rgba(0, 0, 0, 0.06);
|
|
outline: none;
|
|
}
|
|
}
|
|
}
|
|
|
|
.alert--info {
|
|
border-color: #bfdbfe;
|
|
background: #eff6ff;
|
|
color: #1e3a8a;
|
|
}
|
|
|
|
.alert--danger {
|
|
border-color: #fed7d7;
|
|
background: #fff5f5;
|
|
color: var(--c-danger);
|
|
}
|
|
|
|
.alert--success {
|
|
border-color: #b7ebcf;
|
|
background: #f0fff6;
|
|
color: #0f6b39;
|
|
}
|
|
|
|
.alert--warning {
|
|
border-color: #f7dd8b;
|
|
background: #fff8e8;
|
|
color: #815500;
|
|
}
|
|
|
|
.alerts-stack {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 8px;
|
|
margin-bottom: 12px;
|
|
}
|
|
|
|
.form-field {
|
|
display: grid;
|
|
gap: 5px;
|
|
}
|
|
|
|
.field-label {
|
|
color: var(--c-text-strong);
|
|
font-size: 13px;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.table-wrap {
|
|
width: 100%;
|
|
overflow-x: auto;
|
|
|
|
&--visible {
|
|
overflow: visible !important;
|
|
overflow-x: visible !important;
|
|
}
|
|
}
|
|
|
|
.table {
|
|
width: 100%;
|
|
border-collapse: collapse;
|
|
background: var(--c-surface);
|
|
}
|
|
|
|
.table th,
|
|
.table td {
|
|
padding: 10px 12px;
|
|
border-bottom: 1px solid var(--c-border);
|
|
text-align: left;
|
|
}
|
|
|
|
.table th {
|
|
color: var(--c-text-strong);
|
|
font-weight: 700;
|
|
background: #f8fafc;
|
|
}
|
|
|
|
.table--details th {
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.table--details th:first-child,
|
|
.table--details td:first-child {
|
|
width: 36px;
|
|
text-align: center;
|
|
}
|
|
|
|
.pagination {
|
|
display: flex;
|
|
align-items: center;
|
|
flex-wrap: wrap;
|
|
gap: 8px;
|
|
}
|
|
|
|
.pagination__item {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
min-width: 36px;
|
|
height: 36px;
|
|
padding: 0 10px;
|
|
border-radius: 8px;
|
|
border: 1px solid var(--c-border);
|
|
color: var(--c-text-strong);
|
|
background: var(--c-surface);
|
|
text-decoration: none;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.pagination__item:hover {
|
|
border-color: #cbd5e0;
|
|
background: #f8fafc;
|
|
}
|
|
|
|
.pagination__item.is-active {
|
|
border-color: var(--c-primary);
|
|
color: var(--c-primary);
|
|
background: #edf2ff;
|
|
}
|
|
|
|
.receipt-header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: flex-start;
|
|
margin-bottom: 16px;
|
|
padding-bottom: 12px;
|
|
border-bottom: 2px solid var(--c-text-strong);
|
|
|
|
&__seller {
|
|
flex: 1;
|
|
|
|
strong {
|
|
font-size: 14px;
|
|
display: block;
|
|
margin-bottom: 4px;
|
|
}
|
|
}
|
|
|
|
&__title {
|
|
text-align: right;
|
|
|
|
h1 {
|
|
font-size: 18px;
|
|
font-weight: 700;
|
|
margin-bottom: 4px;
|
|
}
|
|
}
|
|
}
|
|
|
|
.receipt-print {
|
|
max-width: 700px;
|
|
margin: 0 auto;
|
|
|
|
@media print {
|
|
max-width: 100%;
|
|
}
|
|
}
|
|
|
|
.copy-name-row {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
}
|
|
|
|
.copy-btn-inline {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
background: none;
|
|
border: none;
|
|
padding: 2px;
|
|
cursor: pointer;
|
|
color: var(--c-text-muted, #999);
|
|
border-radius: 3px;
|
|
transition: color 0.15s;
|
|
flex-shrink: 0;
|
|
|
|
&:hover {
|
|
color: var(--c-primary);
|
|
}
|
|
|
|
.check-icon {
|
|
color: var(--c-action-primary);
|
|
}
|
|
}
|