import { css } from 'lit'; export const styles = css` .editor { all: revert; } .rte-container .editor.safari { -webkit-user-modify: read-write; } nile-rich-text-editor { position: relative; display: block; font-family: inherit; } .rte-container { width: 100%; border: 1px solid var(--nile-colors-neutral-400, var(--ng-colors-border-neutral)); border-radius: var(--nile-radius-radius-xl, var(--ng-radius-md)); background: var(--nile-colors-white-base, var(--ng-colors-bg-primary)); box-sizing: border-box; } .rte-container nile-rte-toolbar { display: flex; align-items: center; gap: 6px; padding: 8px; border-bottom: 1px solid var(--nile-colors-neutral-400, var(--ng-colors-border-neutral)); background: var(--nile-colors-white-base, var(--ng-colors-bg-primary)); border-radius: 8px 8px 0 0; width: 100%; box-sizing: border-box; } .rte-container .editor { min-height: 160px; width: 100%; padding: 12px; background: var(--nile-colors-white-base, var(--ng-colors-bg-primary)); border-radius: 0 0 8px 8px; outline: none; tab-size: 4; -moz-tab-size: 4; word-break: break-word; box-sizing: border-box; border-radius: var(--nile-radius-radius-xl, var(--ng-radius-md)); } nile-rich-text-editor[disabled] .rte-container { border-color: var(--nile-colors-neutral-500, var(--ng-colors-border-disabled)); cursor: not-allowed !important; background: var(--nile-colors-dark-200, var(--ng-colors-bg-disabled-subtle)); } nile-rich-text-editor[disabled] .rte-container nile-rte-toolbar { border-color: var(--nile-colors-neutral-500, var(--ng-colors-border-disabled)); cursor: not-allowed !important; } nile-rich-text-editor[disabled] .rte-container .editor { background: var(--nile-colors-dark-200, var(--ng-colors-bg-disabled-subtle)); pointer-events: none; user-select: none; -webkit-user-select: none; -webkit-user-modify: read-only; border-color: var(--nile-colors-neutral-500, var(--ng-colors-border-disabled)); color: var(--nile-colors-dark-500, var(--ng-colors-text-disabled)); } nile-rte-preview { display: block; width: 100%; margin-top: 16px; padding: 12px; border: 1px dashed var(--nile-colors-neutral-400, var(--ng-colors-border-neutral)); border-radius: var(--nile-radius-radius-xl, var(--ng-radius-md)); background: var(--nile-colors-white-base, var(--ng-colors-bg-primary)); box-sizing: border-box; word-wrap: break-word; } nile-rich-text-editor[disabled] nile-rte-preview { background: var(--nile-colors-dark-200, var(--ng-colors-bg-disabled-subtle)); cursor: not-allowed ; border-color: var(--nile-colors-neutral-500, var(--ng-colors-border-disabled)); user-select: none; -webkit-user-select: none; color: var(--nile-colors-dark-500, var(--ng-colors-text-disabled)); } nile-rte-toolbar-item nile-button::part(base) { width: 32px; height: 32px; padding: 0px 6px; border: none; } nile-rte-toolbar-item > button, nile-rte-toolbar button { border: 1px solid var(--nile-colors-neutral-400, var(--ng-colors-border-neutral)); background: var(--nile-colors-white-base, var(--ng-colors-bg-primary)); border-radius: var(--nile-radius-radius-lg, var(--ng-radius-md)); cursor: pointer; } nile-rte-toolbar-item > button nile-icon { pointer-events: none; } nile-rte-toolbar-item > button.active { border-color: #2563eb; background: var(--nile-colors-white-base); } .editor p { margin: 1em 0; } .editor h1, .preview h1 { font-size: 2em; margin: 0.67em 0; font-weight: bold; } .editor h2, .preview h2 { font-size: 1.5em; margin: 0.83em 0; font-weight: bold; } .editor h3 { font-size: 1.17em; } .editor h4 { font-size: 1em; } .editor h5 { font-size: 0.83em; } .editor h6 { font-size: 0.67em; } .editor.single-line { min-height: 50px; max-height: 50px; line-height: 1.2; overflow-x: auto; white-space: nowrap; padding: 0px 12px 0px 12px; scrollbar-width: none; -ms-overflow-style: none; } nile-rte-preview.single-line { min-height: 50px; max-height: 50px; line-height: 1.2; padding: 0px 12px 0px 12px; overflow-x: auto; white-space: nowrap; scrollbar-width: none; -ms-overflow-style: none; } nile-rte-divider { margin: 0 4px; display: inline-block; height: 24px; width: 1px; background: var(--nile-colors-neutral-400, var(--ng-colors-border-neutral)); } .editor ul, .editor ol { list-style-position: outside; padding-inline-start: 24px; } nile-rte-toolbar-item nile-button[data-active]::part(base) { background-color: var(--nile-colors-primary-400, var(--ng-componentcolors-utility-blue-400)); } nile-rte-toolbar-item nile-button[data-active]::part(base):hover { background-color: var(--nile-colors-primary-500, var(--ng-componentcolors-utility-blue-500)); } nile-rte-link nile-button[data-active]::part(base) { background-color: var(--nile-colors-primary-400, var(--ng-componentcolors-utility-blue-400)); } nile-rte-link nile-button[data-active]::part(base):hover { background-color: var(--nile-colors-primary-500, var(--ng-componentcolors-utility-blue-500)); } .editor a { color: var(--nile-colors-primary-600, var(--ng-colors-text-brand-tertiary-600)); cursor: pointer; text-decoration: none; } .editor a:hover { text-decoration: none; } nile-rich-text-editor[disabled] .editor a { color: var(--nile-colors-dark-500, var(--ng-colors-text-disabled)); cursor: not-allowed; pointer-events: none; } .editor.empty::before { content: attr(data-placeholder); color: var(--nile-colors-neutral-500, var(--ng-colors-text-secondary)); position: absolute; font-family: var(--nile-font-family-sans-serif, var(--ng-font-family-body)); pointer-events: none; user-select: none; padding-top: 16px; opacity: 0.7; } `; export default [styles];