Files
Stirling-PDF/frontend/shared/components/Select.css
T
Reece BrowneandGitHub 8dde4262ec feat(policies): backend-driven policy enforcement (frontend) (#6598)
## Summary
Adds the **Policies** feature (proprietary, behind the
`POLICIES_ENABLED` flag): backend-driven enforcement that runs a fixed
tool pipeline on documents, docked in the right tool sidebar alongside
Tools.

## Highlights
- **Policy catalog** — 5 categories; **Security** is wired (redact PII +
sanitize), the others are marked "Coming soon".
- **Backend as source of truth** — policies persist via the Policies
engine (`/api/v1/policies`), one policy per category, with a local cache
+ offline fallback.
- **Auto-run** — enabled policies run on every uploaded file: dispatch →
poll → import outputs into the workspace.
- **Security redact config** — PII preset dropdown + custom word/regex
entry + advanced options; tool params map to the backend endpoint
fields.
- **Activity feed** with retry on failures; **file badges** showing
which policies ran on a file (sidebar + files page), tinted to the
policy colour.
- Reuses the **Watched Folders** engine for each policy's backing
folder; policy-owned folders are filtered out of the Watched Folders UI.

## Notes
- Gated by `POLICIES_ENABLED` (true in proprietary, false in core) —
unreachable in the open-source build.
- Frontend-only diff; depends on the backend Policies engine and the
merged Watched Folders feature.
2026-06-10 15:57:08 +01:00

80 lines
1.9 KiB
CSS

.sui-select {
position: relative;
display: inline-flex;
align-items: center;
background: var(--color-surface);
border: 1px solid var(--color-border-input);
border-radius: var(--radius-md);
color: var(--color-text-1);
transition:
border-color var(--motion-fast),
box-shadow var(--motion-fast);
}
.sui-select:focus-within {
border-color: var(--color-blue);
box-shadow: 0 0 0 2px color-mix(in srgb, var(--color-blue) 16%, transparent);
}
.sui-select--sm {
min-height: 1.75rem;
}
.sui-select--md {
min-height: 2.25rem;
}
.sui-select--invalid {
border-color: var(--color-red);
}
.sui-select--disabled {
opacity: 0.5;
cursor: not-allowed;
}
.sui-select__el {
flex: 1 1 auto;
font: inherit;
font-size: 0.875rem;
background: transparent;
border: none;
color: inherit;
outline: none;
padding: 0 var(--space-6) 0 var(--space-3);
appearance: none;
-webkit-appearance: none;
}
/*
* The native option popup is OS-rendered: without explicit colours it falls
* back to the UA scheme (white) while the option text inherits the themed
* (light) colour — i.e. white-on-white in dark mode wherever the surrounding
* app keeps color-scheme: light (e.g. the editor, whose dark mode is driven by
* Mantine, not color-scheme). Theme the options explicitly and pin the
* select's color-scheme to the active SUI theme so the popup is always legible.
*/
.sui-select__el option {
background-color: var(--color-surface);
color: var(--color-text-1);
}
[data-theme="dark"] .sui-select__el {
color-scheme: dark;
}
[data-theme="light"] .sui-select__el {
color-scheme: light;
}
.sui-select--sm .sui-select__el {
font-size: 0.8125rem;
padding-left: var(--space-2);
padding-right: var(--space-5);
}
.sui-select__caret {
position: absolute;
right: var(--space-2);
display: inline-flex;
align-items: center;
pointer-events: none;
color: var(--color-text-4);
}