@fieldia/viewer 0.19.1 → 0.20.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 +18 -0
- package/bundle/fieldia.ar.js +2 -2
- package/bundle/fieldia.ar.js.map +2 -2
- package/bundle/fieldia.choice.js +5 -0
- package/bundle/fieldia.choice.js.map +7 -0
- package/bundle/fieldia.de.js +2 -2
- package/bundle/fieldia.de.js.map +2 -2
- package/bundle/fieldia.filters.js +5 -0
- package/bundle/fieldia.filters.js.map +7 -0
- package/bundle/fieldia.fr.js +2 -2
- package/bundle/fieldia.fr.js.map +2 -2
- package/bundle/fieldia.head.js +5 -0
- package/bundle/fieldia.head.js.map +7 -0
- package/bundle/fieldia.js +44 -44
- package/bundle/fieldia.js.map +4 -4
- package/bundle/fieldia.path.js +5 -0
- package/bundle/fieldia.path.js.map +7 -0
- package/bundle/fieldia.text.js +24 -0
- package/bundle/fieldia.text.js.map +7 -0
- package/package.json +7 -3
- package/src/index.d.mts +2 -1
- package/src/index.d.ts +2 -1
- package/src/index.js +6 -1
- package/src/index.js.map +1 -1
- package/src/index.mjs +1 -0
- package/src/index.mjs.map +1 -1
- package/src/lib/button-parts.d.mts +30 -0
- package/src/lib/button-parts.d.ts +30 -0
- package/src/lib/button-parts.js +24 -0
- package/src/lib/button-parts.js.map +1 -0
- package/src/lib/button-parts.mjs +18 -0
- package/src/lib/button-parts.mjs.map +1 -0
- package/src/lib/dialog-window.d.mts +11 -0
- package/src/lib/dialog-window.d.ts +11 -0
- package/src/lib/dialog-window.js +86 -0
- package/src/lib/dialog-window.js.map +1 -0
- package/src/lib/dialog-window.mjs +82 -0
- package/src/lib/dialog-window.mjs.map +1 -0
- package/src/lib/dialog.d.mts +14 -3
- package/src/lib/dialog.d.ts +14 -3
- package/src/lib/dialog.js +84 -14
- package/src/lib/dialog.js.map +1 -1
- package/src/lib/dialog.mjs +85 -15
- package/src/lib/dialog.mjs.map +1 -1
- package/src/lib/filter-bar.d.mts +39 -0
- package/src/lib/filter-bar.d.ts +39 -0
- package/src/lib/filter-bar.js +290 -0
- package/src/lib/filter-bar.js.map +1 -0
- package/src/lib/filter-bar.mjs +287 -0
- package/src/lib/filter-bar.mjs.map +1 -0
- package/src/lib/filter-styles.d.mts +4 -0
- package/src/lib/filter-styles.d.ts +4 -0
- package/src/lib/filter-styles.js +63 -0
- package/src/lib/filter-styles.js.map +1 -0
- package/src/lib/filter-styles.mjs +59 -0
- package/src/lib/filter-styles.mjs.map +1 -0
- package/src/lib/filters-part.d.mts +8 -0
- package/src/lib/filters-part.d.ts +8 -0
- package/src/lib/filters-part.js +14 -0
- package/src/lib/filters-part.js.map +1 -0
- package/src/lib/filters-part.mjs +9 -0
- package/src/lib/filters-part.mjs.map +1 -0
- package/src/lib/group-styles.d.mts +9 -0
- package/src/lib/group-styles.d.ts +9 -0
- package/src/lib/group-styles.js +64 -0
- package/src/lib/group-styles.js.map +1 -0
- package/src/lib/group-styles.mjs +60 -0
- package/src/lib/group-styles.mjs.map +1 -0
- package/src/lib/head-part.d.mts +15 -0
- package/src/lib/head-part.d.ts +15 -0
- package/src/lib/head-part.js +26 -0
- package/src/lib/head-part.js.map +1 -0
- package/src/lib/head-part.mjs +16 -0
- package/src/lib/head-part.mjs.map +1 -0
- package/src/lib/head-styles.d.mts +28 -0
- package/src/lib/head-styles.d.ts +28 -0
- package/src/lib/head-styles.js +320 -0
- package/src/lib/head-styles.js.map +1 -0
- package/src/lib/head-styles.mjs +316 -0
- package/src/lib/head-styles.mjs.map +1 -0
- package/src/lib/labels.d.mts +29 -0
- package/src/lib/labels.d.ts +29 -0
- package/src/lib/labels.js +16 -0
- package/src/lib/labels.js.map +1 -1
- package/src/lib/labels.mjs +16 -0
- package/src/lib/labels.mjs.map +1 -1
- package/src/lib/list-styles.d.mts +1 -1
- package/src/lib/list-styles.d.ts +1 -1
- package/src/lib/list-styles.js +88 -1
- package/src/lib/list-styles.js.map +1 -1
- package/src/lib/list-styles.mjs +88 -1
- package/src/lib/list-styles.mjs.map +1 -1
- package/src/lib/list.d.mts +16 -1
- package/src/lib/list.d.ts +16 -1
- package/src/lib/list.js +281 -51
- package/src/lib/list.js.map +1 -1
- package/src/lib/list.mjs +282 -52
- package/src/lib/list.mjs.map +1 -1
- package/src/lib/locales/ar.js +16 -0
- package/src/lib/locales/ar.js.map +1 -1
- package/src/lib/locales/ar.mjs +16 -0
- package/src/lib/locales/ar.mjs.map +1 -1
- package/src/lib/locales/de.js +16 -0
- package/src/lib/locales/de.js.map +1 -1
- package/src/lib/locales/de.mjs +16 -0
- package/src/lib/locales/de.mjs.map +1 -1
- package/src/lib/locales/fr.js +16 -0
- package/src/lib/locales/fr.js.map +1 -1
- package/src/lib/locales/fr.mjs +16 -0
- package/src/lib/locales/fr.mjs.map +1 -1
- package/src/lib/look.d.mts +1 -1
- package/src/lib/look.d.ts +1 -1
- package/src/lib/look.js +3 -0
- package/src/lib/look.js.map +1 -1
- package/src/lib/look.mjs +3 -0
- package/src/lib/look.mjs.map +1 -1
- package/src/lib/record-bar.d.mts +10 -1
- package/src/lib/record-bar.d.ts +10 -1
- package/src/lib/record-bar.js +15 -7
- package/src/lib/record-bar.js.map +1 -1
- package/src/lib/record-bar.mjs +14 -7
- package/src/lib/record-bar.mjs.map +1 -1
- package/src/lib/record-head.d.mts +58 -0
- package/src/lib/record-head.d.ts +58 -0
- package/src/lib/record-head.js +245 -0
- package/src/lib/record-head.js.map +1 -0
- package/src/lib/record-head.mjs +240 -0
- package/src/lib/record-head.mjs.map +1 -0
- package/src/lib/rich-button.d.mts +12 -0
- package/src/lib/rich-button.d.ts +12 -0
- package/src/lib/rich-button.js +186 -0
- package/src/lib/rich-button.js.map +1 -0
- package/src/lib/rich-button.mjs +183 -0
- package/src/lib/rich-button.mjs.map +1 -0
- package/src/lib/section-head.d.mts +26 -0
- package/src/lib/section-head.d.ts +26 -0
- package/src/lib/section-head.js +65 -0
- package/src/lib/section-head.js.map +1 -0
- package/src/lib/section-head.mjs +56 -0
- package/src/lib/section-head.mjs.map +1 -0
- package/src/lib/section-tools.d.mts +12 -0
- package/src/lib/section-tools.d.ts +12 -0
- package/src/lib/section-tools.js +124 -0
- package/src/lib/section-tools.js.map +1 -0
- package/src/lib/section-tools.mjs +121 -0
- package/src/lib/section-tools.mjs.map +1 -0
- package/src/lib/viewer-parts.d.mts +33 -0
- package/src/lib/viewer-parts.d.ts +33 -0
- package/src/lib/viewer-parts.js +75 -0
- package/src/lib/viewer-parts.js.map +1 -0
- package/src/lib/viewer-parts.mjs +70 -0
- package/src/lib/viewer-parts.mjs.map +1 -0
- package/src/lib/viewer.d.mts +30 -7
- package/src/lib/viewer.d.ts +30 -7
- package/src/lib/viewer.js +317 -97
- package/src/lib/viewer.js.map +1 -1
- package/src/lib/viewer.mjs +319 -99
- package/src/lib/viewer.mjs.map +1 -1
package/src/lib/list-styles.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/** The list's look, on the same tokens as the forms it opens. */
|
|
2
|
-
export declare const LIST_STYLES = "\n.fd-list { display: grid; gap: 10px; min-width: 0; }\n.fd-list [hidden] { display: none !important; }\n.fd-list-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; min-height: 34px; }\n/* A list that is also a map: List, Map, or both side by side; the map's part is drawn by @fieldia/map. */\n.fd-list { container: fd-list / inline-size; }\n.fd-list-views { display: inline-flex; border: 1px solid var(--fd-border); border-radius: var(--fd-control-radius); overflow: hidden; }\n.fd-list-views .fd-button { border: 0; border-radius: 0; min-height: 32px; padding-inline: 12px; }\n.fd-list-views .fd-button + .fd-button { border-inline-start: 1px solid var(--fd-border); }\n.fd-list-views .fd-button[aria-pressed=\"true\"] { background: var(--fd-accent-soft); color: var(--fd-accent); font-weight: 600; }\n.fd-list-body { display: grid; gap: 16px; min-width: 0; }\n.fd-list-records { display: grid; gap: 10px; min-width: 0; align-content: start; }\n.fd-list[data-view=\"list\"] .fd-list-map { display: none; }\n.fd-list[data-view=\"map\"] .fd-list-records, .fd-list[data-view=\"map\"] .fd-pager { display: none; }\n.fd-list[data-view=\"both\"] .fd-list-body { grid-template-columns: minmax(0, 3fr) minmax(320px, 2fr); align-items: start; }\n.fd-list[data-view=\"both\"] .fd-list-map { position: sticky; top: 8px; }\n/* Too narrow for two: the map over the table. */\n@container fd-list (max-width: 860px) { .fd-list[data-view=\"both\"] .fd-list-body { grid-template-columns: minmax(0, 1fr); } .fd-list[data-view=\"both\"] .fd-list-map { position: static; order: -1; } }\n.fd-list-row.fd-list-hot > td { background: var(--fd-accent-soft); }\n.fd-search { position: relative; flex: 1 1 360px; max-width: 680px; min-width: 0; container: fd-search / inline-size; }\n.fd-search-field { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; min-height: 34px; box-sizing: border-box; padding: 2px 2px 2px 8px; padding-inline: 8px 2px; border: 1px solid var(--fd-border); border-radius: var(--fd-control-radius); background: var(--fd-surface); }\n.fd-search-field:focus-within { border-color: var(--fd-focus); box-shadow: var(--fd-focus-ring); }\n.fd-search-field > .fd-icon, .fd-search-field > svg { width: 16px; height: 16px; color: var(--fd-muted); flex: none; }\n.fd-facets { display: contents; }\n.fd-facet { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; min-width: 0; min-height: 24px; padding-block: 0; padding-inline: 6px 0; border-radius: 3px; background: var(--fd-accent-soft); color: var(--fd-accent); font-size: 13px; line-height: 18px; }\n.fd-facet svg { width: 13px; height: 13px; flex: none; }\n.fd-facet[data-kind=\"groupBy\"] { background: var(--fd-success-soft); color: var(--fd-success); }\n.fd-facet-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n/* 24px each way: a target a finger can hit (WCAG 2.5.8). */\n.fd-facet-remove { all: unset; cursor: pointer; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 2px; font-size: 15px; line-height: 1; opacity: 0.7; }\n.fd-facet-remove:hover, .fd-facet-remove:focus-visible { opacity: 1; background: var(--fd-surface); }\n.fd-search-input { flex: 1 1 140px; min-width: 100px; border: none; outline: none; background: none; font: inherit; font-size: 14px; color: var(--fd-text); padding: 5px 4px; }\n.fd-form .fd-search-input:focus-visible { outline: none; }\n.fd-search-toggle { all: unset; cursor: pointer; display: grid; place-items: center; width: 30px; height: 28px; border-radius: 3px; color: var(--fd-muted); }\n/* Physical sides: a down chevron points down in either direction. */\n.fd-search-toggle::before { content: ''; width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); }\n.fd-search-toggle[aria-expanded=\"true\"]::before { transform: translateY(2px) rotate(-135deg); }\n.fd-search-toggle:hover, .fd-search-toggle[aria-expanded=\"true\"] { background: var(--fd-page); color: var(--fd-text); }\n.fd-search-toggle:focus-visible { outline: 2px solid var(--fd-focus); }\n.fd-search-suggestions, .fd-search-panel { position: absolute; z-index: 30; inset-inline: 0; top: calc(100% + 4px); box-sizing: border-box; background: var(--fd-surface); border: 1px solid var(--fd-border); border-radius: var(--fd-radius); box-shadow: 0 10px 28px rgba(15, 23, 42, 0.14); }\n.fd-search-suggestions { list-style: none; margin: 0; padding: 4px 0; }\n.fd-search-suggestions [role=\"option\"] { padding: 7px 12px; cursor: pointer; font-size: 14px; }\n.fd-search-suggestions [role=\"option\"][aria-selected=\"true\"] { background: var(--fd-accent-soft); }\n.fd-search-panel { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); padding-block: 6px; }\n.fd-search-group { display: flex; flex-direction: column; align-items: stretch; gap: 1px; padding: 4px 10px 8px; min-width: 0; }\n.fd-search-group + .fd-search-group { border-inline-start: 1px solid var(--fd-border); }\n@container fd-search (max-width: 540px) {\n .fd-search-panel { grid-auto-flow: row; }\n .fd-search-group + .fd-search-group { border-inline-start: none; border-block-start: 1px solid var(--fd-border); padding-block-start: 8px; }\n}\n.fd-search-heading { display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: 13.5px; padding: 4px 6px 6px; }\n.fd-search-heading svg { width: 15px; height: 15px; }\n.fd-search-group[data-group-kind=\"filters\"] .fd-search-heading svg { color: var(--fd-accent); }\n.fd-search-group[data-group-kind=\"groupBy\"] .fd-search-heading svg { color: var(--fd-success); }\n.fd-search-group[data-group-kind=\"favourites\"] .fd-search-heading svg { color: var(--fd-warning); }\n.fd-search-option { all: unset; box-sizing: border-box; cursor: pointer; display: flex; align-items: center; gap: 6px; padding: 5px 6px; border-radius: 4px; font-size: 14px; color: var(--fd-text); }\n.fd-search-option::before { content: ''; width: 14px; flex: none; text-align: center; color: var(--fd-accent); font-weight: 700; }\n.fd-search-option[aria-pressed=\"true\"]::before { content: '\u2713'; }\n.fd-search-option:hover, .fd-search-option:focus-visible { background: var(--fd-page); }\n.fd-search-add { color: var(--fd-muted); margin-block-start: 4px; }\n.fd-search-add::before { content: '+'; color: var(--fd-muted); font-weight: 400; }\n.fd-custom-filter, .fd-favourite-form { display: grid; gap: 6px; padding: 6px; }\n.fd-custom-filter .fd-input, .fd-favourite-form .fd-input { width: 100%; box-sizing: border-box; min-height: 30px; border: 1px solid var(--fd-border); border-radius: var(--fd-control-radius); padding: 3px 6px; font: inherit; font-size: 13.5px; background: var(--fd-surface); color: var(--fd-text); }\n.fd-favourite-default { display: flex; align-items: center; gap: 6px; font-size: 13.5px; }\n.fd-favourite-list { list-style: none; margin: 0; padding: 0; }\n.fd-favourite { display: flex; align-items: center; }\n.fd-favourite .fd-search-option { flex: 1; min-width: 0; }\n.fd-favourite .fd-search-option[data-default=\"true\"]::before { content: '\u2605'; color: var(--fd-warning); }\n.fd-favourite-remove { all: unset; cursor: pointer; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 4px; color: var(--fd-muted); }\n.fd-favourite-remove:hover { background: var(--fd-page); color: var(--fd-error); }\n.fd-favourites-none { margin: 0; padding: 4px 6px; color: var(--fd-muted); font-size: 13px; }\n.fd-list-selection { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 3px 4px 3px 10px; border-radius: var(--fd-control-radius); background: var(--fd-accent-soft); }\n.fd-list-count { font-weight: 600; font-size: 13.5px; color: var(--fd-accent); font-variant-numeric: tabular-nums; }\n.fd-pager { display: flex; align-items: center; gap: 4px; margin-inline-start: auto; }\n.fd-pager-text { color: var(--fd-muted); font-size: 13.5px; font-variant-numeric: tabular-nums; margin-inline-end: 6px; white-space: nowrap; }\n.fd-pager-button { min-width: 32px; padding-inline: 0; font-size: 18px; line-height: 1; }\n.fd-list-scroll { overflow-x: auto; background: var(--fd-surface); border: 1px solid var(--fd-border); border-radius: var(--fd-radius); }\n.fd-list-table { width: 100%; border-collapse: collapse; font-size: 14px; }\n.fd-list-table th { text-align: start; font-weight: 600; font-size: 13px; color: var(--fd-text); padding: 8px 10px; border-block-end: 1px solid var(--fd-border-strong); white-space: nowrap; background: var(--fd-surface); }\n.fd-list-table td { padding: 7px 10px; border-block-end: 1px solid var(--fd-border); max-width: 28em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.fd-list-table tbody tr:last-child td { border-block-end: none; }\n.fd-list-table .fd-num { text-align: end; font-variant-numeric: tabular-nums; }\n.fd-list-table th.fd-list-check, .fd-list-table td.fd-list-check { width: 36px; padding-inline: 10px 0; }\n.fd-list-checkbox { width: 16px; height: 16px; margin: 0; vertical-align: middle; accent-color: var(--fd-accent); cursor: pointer; }\n.fd-list-sort { all: unset; box-sizing: border-box; width: 100%; cursor: pointer; display: flex; align-items: center; gap: 4px; font: inherit; color: inherit; }\n.fd-list-sort::after { content: ''; width: 0; height: 0; border-inline: 4px solid transparent; opacity: 0; }\n.fd-list-sort:hover::after { opacity: 0.35; border-block-start: 5px solid currentColor; }\n.fd-list-table th[aria-sort=\"ascending\"] .fd-list-sort::after { opacity: 1; border-block-start: none; border-block-end: 5px solid currentColor; }\n.fd-list-table th[aria-sort=\"descending\"] .fd-list-sort::after { opacity: 1; border-block-end: none; border-block-start: 5px solid currentColor; }\n.fd-list-table th.fd-num .fd-list-sort { justify-content: flex-end; }\n.fd-list-table th.fd-num .fd-list-sort::after { order: -1; }\n.fd-list-sort:focus-visible { outline: 2px solid var(--fd-focus); outline-offset: 2px; }\n.fd-list-row:hover td { background: var(--fd-page); }\n.fd-list-openable { cursor: pointer; }\n.fd-list-row[aria-selected=\"true\"] td { background: var(--fd-accent-soft); }\n.fd-list-row:focus-visible { outline: 2px solid var(--fd-focus); outline-offset: -2px; }\n.fd-list-table[aria-busy=\"true\"] tbody { opacity: 0.6; transition: opacity 0.2s 0.15s; }\n.fd-list-group td { padding: 0; background: var(--fd-page); }\n.fd-group-toggle { all: unset; box-sizing: border-box; cursor: pointer; display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 10px; padding-inline-start: calc(12px + var(--fd-level, 0) * 22px); font-weight: 600; font-size: 13.5px; color: var(--fd-text); }\n.fd-group-toggle::before { content: ''; flex: none; width: 6px; height: 6px; border-top: 1.5px solid currentColor; border-right: 1.5px solid currentColor; transform: rotate(45deg); transition: transform 0.12s; }\n.fd-group-toggle:dir(rtl)::before { transform: rotate(-135deg); }\n.fd-group-toggle[aria-expanded=\"true\"]::before { transform: rotate(135deg); }\n.fd-group-toggle:hover { background: var(--fd-accent-soft); }\n.fd-group-toggle:focus-visible { outline: 2px solid var(--fd-focus); outline-offset: -2px; }\n.fd-group-count { color: var(--fd-muted); font-weight: 400; font-variant-numeric: tabular-nums; }\n.fd-list-more td { padding: 4px 10px; padding-inline-start: calc(46px + var(--fd-level, 0) * 22px); }\n.fd-list-empty, .fd-list-failed { margin: 0; padding: 28px 12px; text-align: center; color: var(--fd-muted); }\n.fd-list-failed { color: var(--fd-error); }\n";
|
|
2
|
+
export declare const LIST_STYLES = "\n.fd-list { display: grid; gap: 10px; min-width: 0; }\n.fd-list [hidden] { display: none !important; }\n.fd-list-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; min-height: 34px; }\n/* A list that is also a map: List, Map, or both side by side; the map's part is drawn by @fieldia/map. */\n.fd-list { container: fd-list / inline-size; }\n.fd-list-views { display: inline-flex; border: 1px solid var(--fd-border); border-radius: var(--fd-control-radius); overflow: hidden; }\n.fd-list-views .fd-button { border: 0; border-radius: 0; min-height: 32px; padding-inline: 12px; }\n.fd-list-views .fd-button + .fd-button { border-inline-start: 1px solid var(--fd-border); }\n.fd-list-views .fd-button[aria-pressed=\"true\"] { background: var(--fd-accent-soft); color: var(--fd-accent); font-weight: 600; }\n.fd-list-body { display: grid; gap: 16px; min-width: 0; }\n.fd-list-records { display: grid; gap: 10px; min-width: 0; align-content: start; }\n.fd-list[data-view=\"list\"] .fd-list-map { display: none; }\n.fd-list[data-view=\"map\"] .fd-list-records, .fd-list[data-view=\"map\"] .fd-pager { display: none; }\n.fd-list[data-view=\"both\"] .fd-list-body { grid-template-columns: minmax(0, 3fr) minmax(320px, 2fr); align-items: start; }\n.fd-list[data-view=\"both\"] .fd-list-map { position: sticky; top: 8px; }\n/* Too narrow for two: the map over the table. */\n@container fd-list (max-width: 860px) { .fd-list[data-view=\"both\"] .fd-list-body { grid-template-columns: minmax(0, 1fr); } .fd-list[data-view=\"both\"] .fd-list-map { position: static; order: -1; } }\n.fd-list-row.fd-list-hot > td { background: var(--fd-accent-soft); }\n.fd-search { position: relative; flex: 1 1 360px; max-width: 680px; min-width: 0; container: fd-search / inline-size; }\n.fd-search-field { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; min-height: 34px; box-sizing: border-box; padding: 2px 2px 2px 8px; padding-inline: 8px 2px; border: 1px solid var(--fd-border); border-radius: var(--fd-control-radius); background: var(--fd-surface); }\n.fd-search-field:focus-within { border-color: var(--fd-focus); box-shadow: var(--fd-focus-ring); }\n.fd-search-field > .fd-icon, .fd-search-field > svg { width: 16px; height: 16px; color: var(--fd-muted); flex: none; }\n.fd-facets { display: contents; }\n.fd-facet { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; min-width: 0; min-height: 24px; padding-block: 0; padding-inline: 6px 0; border-radius: 3px; background: var(--fd-accent-soft); color: var(--fd-accent); font-size: 13px; line-height: 18px; }\n.fd-facet svg { width: 13px; height: 13px; flex: none; }\n.fd-facet[data-kind=\"groupBy\"] { background: var(--fd-success-soft); color: var(--fd-success); }\n.fd-facet-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n/* 24px each way: a target a finger can hit (WCAG 2.5.8). */\n.fd-facet-remove { all: unset; cursor: pointer; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 2px; font-size: 15px; line-height: 1; opacity: 0.7; }\n.fd-facet-remove:hover, .fd-facet-remove:focus-visible { opacity: 1; background: var(--fd-surface); }\n.fd-search-input { flex: 1 1 140px; min-width: 100px; border: none; outline: none; background: none; font: inherit; font-size: 14px; color: var(--fd-text); padding: 5px 4px; }\n.fd-form .fd-search-input:focus-visible { outline: none; }\n.fd-search-toggle { all: unset; cursor: pointer; display: grid; place-items: center; width: 30px; height: 28px; border-radius: 3px; color: var(--fd-muted); }\n/* Physical sides: a down chevron points down in either direction. */\n.fd-search-toggle::before { content: ''; width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); }\n.fd-search-toggle[aria-expanded=\"true\"]::before { transform: translateY(2px) rotate(-135deg); }\n.fd-search-toggle:hover, .fd-search-toggle[aria-expanded=\"true\"] { background: var(--fd-page); color: var(--fd-text); }\n.fd-search-toggle:focus-visible { outline: 2px solid var(--fd-focus); }\n.fd-search-suggestions, .fd-search-panel { position: absolute; z-index: 30; inset-inline: 0; top: calc(100% + 4px); box-sizing: border-box; background: var(--fd-surface); border: 1px solid var(--fd-border); border-radius: var(--fd-radius); box-shadow: 0 10px 28px rgba(15, 23, 42, 0.14); }\n.fd-search-suggestions { list-style: none; margin: 0; padding: 4px 0; }\n.fd-search-suggestions [role=\"option\"] { padding: 7px 12px; cursor: pointer; font-size: 14px; }\n.fd-search-suggestions [role=\"option\"][aria-selected=\"true\"] { background: var(--fd-accent-soft); }\n.fd-search-panel { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); padding-block: 6px; }\n.fd-search-group { display: flex; flex-direction: column; align-items: stretch; gap: 1px; padding: 4px 10px 8px; min-width: 0; }\n.fd-search-group + .fd-search-group { border-inline-start: 1px solid var(--fd-border); }\n@container fd-search (max-width: 540px) {\n .fd-search-panel { grid-auto-flow: row; }\n .fd-search-group + .fd-search-group { border-inline-start: none; border-block-start: 1px solid var(--fd-border); padding-block-start: 8px; }\n}\n.fd-search-heading { display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: 13.5px; padding: 4px 6px 6px; }\n.fd-search-heading svg { width: 15px; height: 15px; }\n.fd-search-group[data-group-kind=\"filters\"] .fd-search-heading svg { color: var(--fd-accent); }\n.fd-search-group[data-group-kind=\"groupBy\"] .fd-search-heading svg { color: var(--fd-success); }\n.fd-search-group[data-group-kind=\"favourites\"] .fd-search-heading svg { color: var(--fd-warning); }\n.fd-search-option { all: unset; box-sizing: border-box; cursor: pointer; display: flex; align-items: center; gap: 6px; padding: 5px 6px; border-radius: 4px; font-size: 14px; color: var(--fd-text); }\n.fd-search-option::before { content: ''; width: 14px; flex: none; text-align: center; color: var(--fd-accent); font-weight: 700; }\n.fd-search-option[aria-pressed=\"true\"]::before { content: '\u2713'; }\n.fd-search-option:hover, .fd-search-option:focus-visible { background: var(--fd-page); }\n.fd-search-add { color: var(--fd-muted); margin-block-start: 4px; }\n.fd-search-add::before { content: '+'; color: var(--fd-muted); font-weight: 400; }\n.fd-custom-filter, .fd-favourite-form { display: grid; gap: 6px; padding: 6px; }\n.fd-custom-filter .fd-input, .fd-favourite-form .fd-input { width: 100%; box-sizing: border-box; min-height: 30px; border: 1px solid var(--fd-border); border-radius: var(--fd-control-radius); padding: 3px 6px; font: inherit; font-size: 13.5px; background: var(--fd-surface); color: var(--fd-text); }\n.fd-favourite-default { display: flex; align-items: center; gap: 6px; font-size: 13.5px; }\n.fd-favourite-list { list-style: none; margin: 0; padding: 0; }\n.fd-favourite { display: flex; align-items: center; }\n.fd-favourite .fd-search-option { flex: 1; min-width: 0; }\n.fd-favourite .fd-search-option[data-default=\"true\"]::before { content: '\u2605'; color: var(--fd-warning); }\n.fd-favourite-remove { all: unset; cursor: pointer; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 4px; color: var(--fd-muted); }\n.fd-favourite-remove:hover { background: var(--fd-page); color: var(--fd-error); }\n.fd-favourites-none { margin: 0; padding: 4px 6px; color: var(--fd-muted); font-size: 13px; }\n.fd-list-selection { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 3px 4px 3px 10px; border-radius: var(--fd-control-radius); background: var(--fd-accent-soft); }\n.fd-list-count { font-weight: 600; font-size: 13.5px; color: var(--fd-accent); font-variant-numeric: tabular-nums; }\n.fd-pager { display: flex; align-items: center; gap: 4px; margin-inline-start: auto; }\n.fd-pager-text { color: var(--fd-muted); font-size: 13.5px; font-variant-numeric: tabular-nums; margin-inline-end: 6px; white-space: nowrap; }\n.fd-pager-button { min-width: 32px; padding-inline: 0; font-size: 18px; line-height: 1; }\n.fd-list-scroll { overflow-x: auto; background: var(--fd-surface); border: 1px solid var(--fd-border); border-radius: var(--fd-radius); }\n.fd-list-table { width: 100%; border-collapse: collapse; font-size: 14px; }\n.fd-list-table th { text-align: start; font-weight: 600; color: var(--fd-text); padding: 8px 10px; border-block-end: 1px solid var(--fd-border-strong); white-space: nowrap; background: var(--fd-surface); }\n/* The header's words smaller than the rows', its cell the rows' size: a column's width in characters is the same in both. */\n.fd-list-head { font-size: 13px; }\n.fd-list-table td { padding: 7px 10px; border-block-end: 1px solid var(--fd-border); max-width: 28em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.fd-list-table tbody tr:last-child td { border-block-end: none; }\n.fd-list-table .fd-num { text-align: end; font-variant-numeric: tabular-nums; }\n.fd-list-table th.fd-list-check, .fd-list-table td.fd-list-check { width: 36px; padding-inline: 10px 0; }\n.fd-list-checkbox { width: 16px; height: 16px; margin: 0; vertical-align: middle; accent-color: var(--fd-accent); cursor: pointer; }\n.fd-list-sort { all: unset; box-sizing: border-box; width: 100%; cursor: pointer; display: flex; align-items: center; gap: 4px; font: inherit; color: inherit; }\n.fd-list-sort::after { content: ''; width: 0; height: 0; border-inline: 4px solid transparent; opacity: 0; }\n.fd-list-sort:hover::after { opacity: 0.35; border-block-start: 5px solid currentColor; }\n.fd-list-table th[aria-sort=\"ascending\"] .fd-list-sort::after { opacity: 1; border-block-start: none; border-block-end: 5px solid currentColor; }\n.fd-list-table th[aria-sort=\"descending\"] .fd-list-sort::after { opacity: 1; border-block-end: none; border-block-start: 5px solid currentColor; }\n.fd-list-table th.fd-num .fd-list-sort { justify-content: flex-end; }\n.fd-list-table th.fd-num .fd-list-sort::after { order: -1; }\n.fd-list-sort:focus-visible { outline: 2px solid var(--fd-focus); outline-offset: 2px; }\n.fd-list-row:hover td { background: var(--fd-page); }\n.fd-list-openable { cursor: pointer; }\n.fd-list-row[aria-selected=\"true\"] td { background: var(--fd-accent-soft); }\n.fd-list-row:focus-visible { outline: 2px solid var(--fd-focus); outline-offset: -2px; }\n.fd-list-table[aria-busy=\"true\"] tbody { opacity: 0.6; transition: opacity 0.2s 0.15s; }\n.fd-list-group td { padding: 0; background: var(--fd-page); }\n.fd-group-toggle { all: unset; box-sizing: border-box; cursor: pointer; display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 10px; padding-inline-start: calc(12px + var(--fd-level, 0) * 22px); font-weight: 600; font-size: 13.5px; color: var(--fd-text); }\n.fd-group-toggle::before { content: ''; flex: none; width: 6px; height: 6px; border-top: 1.5px solid currentColor; border-right: 1.5px solid currentColor; transform: rotate(45deg); transition: transform 0.12s; }\n.fd-group-toggle:dir(rtl)::before { transform: rotate(-135deg); }\n.fd-group-toggle[aria-expanded=\"true\"]::before { transform: rotate(135deg); }\n.fd-group-toggle:hover { background: var(--fd-accent-soft); }\n.fd-group-toggle:focus-visible { outline: 2px solid var(--fd-focus); outline-offset: -2px; }\n.fd-group-count { color: var(--fd-muted); font-weight: 400; font-variant-numeric: tabular-nums; }\n.fd-list-more td { padding: 4px 10px; padding-inline-start: calc(46px + var(--fd-level, 0) * 22px); }\n.fd-list-empty, .fd-list-failed { margin: 0; padding: 28px 12px; text-align: center; color: var(--fd-muted); }\n.fd-list-failed { color: var(--fd-error); }\n\n/* A column of a given width (cells), in characters of the rows' words: what does not fit ends in \"\u2026\". */\n.fd-list-table [data-width] { box-sizing: content-box; width: calc(var(--fd-col-width) * 1ch); max-width: calc(var(--fd-col-width) * 1ch); overflow: hidden; text-overflow: ellipsis; }\n.fd-list-table th[data-width] .fd-list-sort { min-width: 0; }\n.fd-list-table th[data-width] .fd-list-head { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; }\n/* A column in pixels: the whole column, its paddings in it, as a work tracker sizes its grid's. */\n.fd-list-table [data-width-px] { box-sizing: border-box; width: var(--fd-col-px); min-width: var(--fd-col-px); max-width: var(--fd-col-px); overflow: hidden; text-overflow: ellipsis; }\n.fd-list-table th[data-width-px] .fd-list-sort { min-width: 0; }\n.fd-list-table th[data-width-px] .fd-list-head { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; }\n/* Every column sized: the table as wide as they are, never stretched; wider than its card, the card scrolls sideways. */\n.fd-list-table[data-fixed] { width: max-content; }\n/* The row whose record is open (in a popup over the list): lit as a chosen one is, until it closes. */\n.fd-list-row[aria-current=\"true\"] td { background: var(--fd-accent-soft); }\n/* What a cell draws before its words: a kind's icon in its colour, a state's dot. */\n.fd-list-lead { width: 14px; height: 14px; margin-inline-end: 6px; vertical-align: -2px; flex: none; stroke-width: 2.2; }\n.fd-list-dot { display: inline-block; width: 8px; height: 8px; margin-inline-end: 6px; border-radius: 50%; vertical-align: 1px; background: var(--fd-dot, var(--fd-border-strong)); }\n.fd-list-dot[data-tone=\"muted\"] { --fd-dot: var(--fd-border-strong); }\n.fd-list-dot[data-tone=\"danger\"] { --fd-dot: var(--fd-error); }\n.fd-list-dot[data-tone=\"success\"] { --fd-dot: var(--fd-success); }\n.fd-list-dot[data-tone=\"warning\"] { --fd-dot: #d97706; }\n.fd-list-dot[data-tone=\"info\"] { --fd-dot: var(--fd-info); }\n@media (forced-colors: active) { .fd-list-dot { background: CanvasText; } }\n/* Rows under their parent: Expand all and Collapse all in the header, a toggle before a parent's name, each depth further in. */\n.fd-list-table .fd-list-tree { width: 1%; padding-inline: 10px 4px; white-space: nowrap; }\n.fd-list-folds { display: inline-flex; gap: 6px; vertical-align: middle; }\n.fd-list-fold { all: unset; box-sizing: border-box; cursor: pointer; display: grid; place-items: center; width: 24px; height: 24px; border: 1px solid var(--fd-text); border-radius: 2px; color: var(--fd-text); font-size: 18px; font-weight: 400; line-height: 1; }\n.fd-list-fold:hover { background: var(--fd-page); }\n.fd-list-fold:focus-visible, .fd-list-twisty:focus-visible { outline: 2px solid var(--fd-focus); outline-offset: 1px; }\n.fd-list-row[data-depth] > td[data-name] { padding-inline-start: calc(10px + var(--fd-depth, 0) * 20px); }\n.fd-list-twisty, .fd-list-twisty-room { display: inline-block; width: 20px; height: 20px; margin-inline-end: 2px; vertical-align: middle; }\n.fd-list-twisty { all: unset; display: inline-grid; place-items: center; width: 20px; height: 20px; margin-inline-end: 2px; vertical-align: middle; cursor: pointer; border-radius: 2px; color: var(--fd-muted); }\n.fd-list-twisty::before { content: ''; width: 6px; height: 6px; border-top: 1.5px solid currentColor; border-right: 1.5px solid currentColor; transform: rotate(45deg); transition: transform 0.12s; }\n.fd-list-twisty:dir(rtl)::before { transform: rotate(-135deg); }\n.fd-list-twisty[aria-expanded=\"true\"]::before { transform: rotate(135deg); }\n.fd-list-twisty:hover { background: var(--fd-page); color: var(--fd-text); }\n\n/* A list with the filter bar: its card above the table's, the pager under the table. */\n.fd-list[data-search=\"fields\"] .fd-list-bar { gap: 16px; }\n.fd-list[data-search=\"fields\"] .fd-list-records > .fd-pager { justify-self: end; }\n/* Fluent's lists, as a work tracker draws its backlog: the table a card with a light shadow and no frame; the header's words\n small, semibold and muted, the columns parted by short rules; rows 35px tall with no lines between them. */\n/* Its header 38px and its rule, 39px in all whether a column's width is in pixels (its whole box) or characters. */\n.fd-form[data-fd-theme=\"fluent\"] .fd-list-table th { position: relative; box-sizing: border-box; height: 39px; padding-block: 0; color: var(--fd-muted); border-block-end: 1px solid var(--fd-border); }\n.fd-form[data-fd-theme=\"fluent\"] .fd-list-head { font-size: 12px; font-weight: 600; }\n.fd-form[data-fd-theme=\"fluent\"] .fd-list-table thead th:not(:first-child)::after { content: ''; position: absolute; inset-inline-end: var(--fd-rule-in, 0px); inset-block: 10px; width: 1px; background: var(--fd-border); }\n.fd-form[data-fd-theme=\"fluent\"] .fd-list-table thead th.fd-list-tree::after, .fd-form[data-fd-theme=\"fluent\"] .fd-list-table thead th.fd-list-check::after { content: none; }\n/* A column the page says has no rule (a tracker's Order, which the person cannot size). */\n.fd-form[data-fd-theme=\"fluent\"] .fd-list-table thead th[data-rule=\"none\"]::after { content: none; }\n/* Rows 36px apart (measured on the tracker's backlog: 17 rows from y 280 to 892); a cell's words 3px in from its column's\n start, its header's 7px, so a header stands a little in from the words under it. */\n.fd-form[data-fd-theme=\"fluent\"] .fd-list-table td { height: 36px; padding-block: 0; padding-inline: 3px 8px; border-block-end: 0; }\n.fd-form[data-fd-theme=\"fluent\"] .fd-list-table th { padding-inline: 7px 8px; }\n.fd-form[data-fd-theme=\"fluent\"] .fd-list-row:hover td { background: var(--fd-fill, var(--fd-page)); }\n.fd-form[data-fd-theme=\"fluent\"] .fd-list-row[aria-current=\"true\"] td { background: var(--fd-accent-soft); }\n/* Expand all and Collapse all 15px in, 25px by 22px and 4px apart, 7px before the next column; a parent's toggle, or room\n the size of one, 24px and 5px before the name, and the name's header over the name. */\n.fd-form[data-fd-theme=\"fluent\"] .fd-list-table .fd-list-tree { padding-inline: 15px 7px; }\n.fd-form[data-fd-theme=\"fluent\"] .fd-list-folds { gap: 4px; }\n.fd-form[data-fd-theme=\"fluent\"] .fd-list-fold { width: 25px; height: 22px; }\n.fd-form[data-fd-theme=\"fluent\"] .fd-list-row[data-depth] > td[data-name] { padding-inline-start: calc(3px + var(--fd-depth, 0) * 20px); }\n/* The kind's icon 30px into the name's column, its words 4px after it, the header's word over the icon (08_18: the bug's\n ink at 495, its title's words at 512, \"Title\" at 494). */\n.fd-form[data-fd-theme=\"fluent\"] :is(.fd-list-twisty, .fd-list-twisty-room) { width: 24px; margin-inline-end: 3px; }\n.fd-form[data-fd-theme=\"fluent\"] .fd-list-table th[data-name] { padding-inline-start: 30px; }\n.fd-form[data-fd-theme=\"fluent\"] .fd-list-lead { margin-inline-end: 4px; }\n/* The grid runs 9px on past its last column's rule, as the tracker's does (08_18: its white to 2011, the rule at 2002). */\n.fd-form[data-fd-theme=\"fluent\"] .fd-list-scroll:has(> .fd-list-table[data-fixed]) { padding-inline-end: 9px; }\n/* Its card's scroll bar as the tracker's, on every system that lets a page draw one: 15px, a light track with a hairline\n at its inner edge, a rounded thumb in it, no arrows. Each selector written out: Chrome drops a part's :horizontal under\n an :is(), and a part paints no logical border. */\n.fd-form[data-fd-theme=\"fluent\"] .fd-list-scroll::-webkit-scrollbar { width: 15px; height: 15px; }\n.fd-form[data-fd-theme=\"fluent\"] .fd-list-scroll::-webkit-scrollbar-track,\n.fd-form[data-fd-theme=\"fluent\"] .fd-list-scroll::-webkit-scrollbar-corner { background: color-mix(in srgb, var(--fd-text) 2.2%, var(--fd-surface)); }\n.fd-form[data-fd-theme=\"fluent\"] .fd-list-scroll::-webkit-scrollbar-track:horizontal {\n border-top: 1px solid color-mix(in srgb, var(--fd-text) 10%, var(--fd-surface)); border-bottom: 1px solid color-mix(in srgb, var(--fd-text) 7.5%, var(--fd-surface));\n}\n.fd-form[data-fd-theme=\"fluent\"] .fd-list-scroll::-webkit-scrollbar-track:vertical {\n border-left: 1px solid color-mix(in srgb, var(--fd-text) 10%, var(--fd-surface)); border-right: 1px solid color-mix(in srgb, var(--fd-text) 7.5%, var(--fd-surface));\n}\n.fd-form[data-fd-theme=\"fluent\"] .fd-list-scroll::-webkit-scrollbar-thumb {\n border: solid transparent; border-width: 4px 3px 3px; border-radius: 8px; background: color-mix(in srgb, var(--fd-text) 24.5%, var(--fd-surface)) padding-box;\n}\n.fd-form[data-fd-theme=\"fluent\"] .fd-list-scroll::-webkit-scrollbar-thumb:vertical { border-width: 3px 3px 3px 4px; }\n.fd-form[data-fd-theme=\"fluent\"] .fd-list-scroll::-webkit-scrollbar-thumb:hover { background-color: color-mix(in srgb, var(--fd-text) 40%, var(--fd-surface)); }\n.fd-form[data-fd-theme=\"fluent\"] .fd-list-scroll::-webkit-scrollbar-button { display: none; }\n";
|
|
3
3
|
/** Puts the list's look in the document once. */
|
|
4
4
|
export declare function installListStyles(doc: Document): void;
|
package/src/lib/list-styles.js
CHANGED
|
@@ -81,7 +81,9 @@ exports.LIST_STYLES = `
|
|
|
81
81
|
.fd-pager-button { min-width: 32px; padding-inline: 0; font-size: 18px; line-height: 1; }
|
|
82
82
|
.fd-list-scroll { overflow-x: auto; background: var(--fd-surface); border: 1px solid var(--fd-border); border-radius: var(--fd-radius); }
|
|
83
83
|
.fd-list-table { width: 100%; border-collapse: collapse; font-size: 14px; }
|
|
84
|
-
.fd-list-table th { text-align: start; font-weight: 600;
|
|
84
|
+
.fd-list-table th { text-align: start; font-weight: 600; color: var(--fd-text); padding: 8px 10px; border-block-end: 1px solid var(--fd-border-strong); white-space: nowrap; background: var(--fd-surface); }
|
|
85
|
+
/* The header's words smaller than the rows', its cell the rows' size: a column's width in characters is the same in both. */
|
|
86
|
+
.fd-list-head { font-size: 13px; }
|
|
85
87
|
.fd-list-table td { padding: 7px 10px; border-block-end: 1px solid var(--fd-border); max-width: 28em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
86
88
|
.fd-list-table tbody tr:last-child td { border-block-end: none; }
|
|
87
89
|
.fd-list-table .fd-num { text-align: end; font-variant-numeric: tabular-nums; }
|
|
@@ -111,6 +113,91 @@ exports.LIST_STYLES = `
|
|
|
111
113
|
.fd-list-more td { padding: 4px 10px; padding-inline-start: calc(46px + var(--fd-level, 0) * 22px); }
|
|
112
114
|
.fd-list-empty, .fd-list-failed { margin: 0; padding: 28px 12px; text-align: center; color: var(--fd-muted); }
|
|
113
115
|
.fd-list-failed { color: var(--fd-error); }
|
|
116
|
+
|
|
117
|
+
/* A column of a given width (cells), in characters of the rows' words: what does not fit ends in "…". */
|
|
118
|
+
.fd-list-table [data-width] { box-sizing: content-box; width: calc(var(--fd-col-width) * 1ch); max-width: calc(var(--fd-col-width) * 1ch); overflow: hidden; text-overflow: ellipsis; }
|
|
119
|
+
.fd-list-table th[data-width] .fd-list-sort { min-width: 0; }
|
|
120
|
+
.fd-list-table th[data-width] .fd-list-head { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
|
|
121
|
+
/* A column in pixels: the whole column, its paddings in it, as a work tracker sizes its grid's. */
|
|
122
|
+
.fd-list-table [data-width-px] { box-sizing: border-box; width: var(--fd-col-px); min-width: var(--fd-col-px); max-width: var(--fd-col-px); overflow: hidden; text-overflow: ellipsis; }
|
|
123
|
+
.fd-list-table th[data-width-px] .fd-list-sort { min-width: 0; }
|
|
124
|
+
.fd-list-table th[data-width-px] .fd-list-head { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
|
|
125
|
+
/* Every column sized: the table as wide as they are, never stretched; wider than its card, the card scrolls sideways. */
|
|
126
|
+
.fd-list-table[data-fixed] { width: max-content; }
|
|
127
|
+
/* The row whose record is open (in a popup over the list): lit as a chosen one is, until it closes. */
|
|
128
|
+
.fd-list-row[aria-current="true"] td { background: var(--fd-accent-soft); }
|
|
129
|
+
/* What a cell draws before its words: a kind's icon in its colour, a state's dot. */
|
|
130
|
+
.fd-list-lead { width: 14px; height: 14px; margin-inline-end: 6px; vertical-align: -2px; flex: none; stroke-width: 2.2; }
|
|
131
|
+
.fd-list-dot { display: inline-block; width: 8px; height: 8px; margin-inline-end: 6px; border-radius: 50%; vertical-align: 1px; background: var(--fd-dot, var(--fd-border-strong)); }
|
|
132
|
+
.fd-list-dot[data-tone="muted"] { --fd-dot: var(--fd-border-strong); }
|
|
133
|
+
.fd-list-dot[data-tone="danger"] { --fd-dot: var(--fd-error); }
|
|
134
|
+
.fd-list-dot[data-tone="success"] { --fd-dot: var(--fd-success); }
|
|
135
|
+
.fd-list-dot[data-tone="warning"] { --fd-dot: #d97706; }
|
|
136
|
+
.fd-list-dot[data-tone="info"] { --fd-dot: var(--fd-info); }
|
|
137
|
+
@media (forced-colors: active) { .fd-list-dot { background: CanvasText; } }
|
|
138
|
+
/* Rows under their parent: Expand all and Collapse all in the header, a toggle before a parent's name, each depth further in. */
|
|
139
|
+
.fd-list-table .fd-list-tree { width: 1%; padding-inline: 10px 4px; white-space: nowrap; }
|
|
140
|
+
.fd-list-folds { display: inline-flex; gap: 6px; vertical-align: middle; }
|
|
141
|
+
.fd-list-fold { all: unset; box-sizing: border-box; cursor: pointer; display: grid; place-items: center; width: 24px; height: 24px; border: 1px solid var(--fd-text); border-radius: 2px; color: var(--fd-text); font-size: 18px; font-weight: 400; line-height: 1; }
|
|
142
|
+
.fd-list-fold:hover { background: var(--fd-page); }
|
|
143
|
+
.fd-list-fold:focus-visible, .fd-list-twisty:focus-visible { outline: 2px solid var(--fd-focus); outline-offset: 1px; }
|
|
144
|
+
.fd-list-row[data-depth] > td[data-name] { padding-inline-start: calc(10px + var(--fd-depth, 0) * 20px); }
|
|
145
|
+
.fd-list-twisty, .fd-list-twisty-room { display: inline-block; width: 20px; height: 20px; margin-inline-end: 2px; vertical-align: middle; }
|
|
146
|
+
.fd-list-twisty { all: unset; display: inline-grid; place-items: center; width: 20px; height: 20px; margin-inline-end: 2px; vertical-align: middle; cursor: pointer; border-radius: 2px; color: var(--fd-muted); }
|
|
147
|
+
.fd-list-twisty::before { content: ''; width: 6px; height: 6px; border-top: 1.5px solid currentColor; border-right: 1.5px solid currentColor; transform: rotate(45deg); transition: transform 0.12s; }
|
|
148
|
+
.fd-list-twisty:dir(rtl)::before { transform: rotate(-135deg); }
|
|
149
|
+
.fd-list-twisty[aria-expanded="true"]::before { transform: rotate(135deg); }
|
|
150
|
+
.fd-list-twisty:hover { background: var(--fd-page); color: var(--fd-text); }
|
|
151
|
+
|
|
152
|
+
/* A list with the filter bar: its card above the table's, the pager under the table. */
|
|
153
|
+
.fd-list[data-search="fields"] .fd-list-bar { gap: 16px; }
|
|
154
|
+
.fd-list[data-search="fields"] .fd-list-records > .fd-pager { justify-self: end; }
|
|
155
|
+
/* Fluent's lists, as a work tracker draws its backlog: the table a card with a light shadow and no frame; the header's words
|
|
156
|
+
small, semibold and muted, the columns parted by short rules; rows 35px tall with no lines between them. */
|
|
157
|
+
/* Its header 38px and its rule, 39px in all whether a column's width is in pixels (its whole box) or characters. */
|
|
158
|
+
.fd-form[data-fd-theme="fluent"] .fd-list-table th { position: relative; box-sizing: border-box; height: 39px; padding-block: 0; color: var(--fd-muted); border-block-end: 1px solid var(--fd-border); }
|
|
159
|
+
.fd-form[data-fd-theme="fluent"] .fd-list-head { font-size: 12px; font-weight: 600; }
|
|
160
|
+
.fd-form[data-fd-theme="fluent"] .fd-list-table thead th:not(:first-child)::after { content: ''; position: absolute; inset-inline-end: var(--fd-rule-in, 0px); inset-block: 10px; width: 1px; background: var(--fd-border); }
|
|
161
|
+
.fd-form[data-fd-theme="fluent"] .fd-list-table thead th.fd-list-tree::after, .fd-form[data-fd-theme="fluent"] .fd-list-table thead th.fd-list-check::after { content: none; }
|
|
162
|
+
/* A column the page says has no rule (a tracker's Order, which the person cannot size). */
|
|
163
|
+
.fd-form[data-fd-theme="fluent"] .fd-list-table thead th[data-rule="none"]::after { content: none; }
|
|
164
|
+
/* Rows 36px apart (measured on the tracker's backlog: 17 rows from y 280 to 892); a cell's words 3px in from its column's
|
|
165
|
+
start, its header's 7px, so a header stands a little in from the words under it. */
|
|
166
|
+
.fd-form[data-fd-theme="fluent"] .fd-list-table td { height: 36px; padding-block: 0; padding-inline: 3px 8px; border-block-end: 0; }
|
|
167
|
+
.fd-form[data-fd-theme="fluent"] .fd-list-table th { padding-inline: 7px 8px; }
|
|
168
|
+
.fd-form[data-fd-theme="fluent"] .fd-list-row:hover td { background: var(--fd-fill, var(--fd-page)); }
|
|
169
|
+
.fd-form[data-fd-theme="fluent"] .fd-list-row[aria-current="true"] td { background: var(--fd-accent-soft); }
|
|
170
|
+
/* Expand all and Collapse all 15px in, 25px by 22px and 4px apart, 7px before the next column; a parent's toggle, or room
|
|
171
|
+
the size of one, 24px and 5px before the name, and the name's header over the name. */
|
|
172
|
+
.fd-form[data-fd-theme="fluent"] .fd-list-table .fd-list-tree { padding-inline: 15px 7px; }
|
|
173
|
+
.fd-form[data-fd-theme="fluent"] .fd-list-folds { gap: 4px; }
|
|
174
|
+
.fd-form[data-fd-theme="fluent"] .fd-list-fold { width: 25px; height: 22px; }
|
|
175
|
+
.fd-form[data-fd-theme="fluent"] .fd-list-row[data-depth] > td[data-name] { padding-inline-start: calc(3px + var(--fd-depth, 0) * 20px); }
|
|
176
|
+
/* The kind's icon 30px into the name's column, its words 4px after it, the header's word over the icon (08_18: the bug's
|
|
177
|
+
ink at 495, its title's words at 512, "Title" at 494). */
|
|
178
|
+
.fd-form[data-fd-theme="fluent"] :is(.fd-list-twisty, .fd-list-twisty-room) { width: 24px; margin-inline-end: 3px; }
|
|
179
|
+
.fd-form[data-fd-theme="fluent"] .fd-list-table th[data-name] { padding-inline-start: 30px; }
|
|
180
|
+
.fd-form[data-fd-theme="fluent"] .fd-list-lead { margin-inline-end: 4px; }
|
|
181
|
+
/* The grid runs 9px on past its last column's rule, as the tracker's does (08_18: its white to 2011, the rule at 2002). */
|
|
182
|
+
.fd-form[data-fd-theme="fluent"] .fd-list-scroll:has(> .fd-list-table[data-fixed]) { padding-inline-end: 9px; }
|
|
183
|
+
/* Its card's scroll bar as the tracker's, on every system that lets a page draw one: 15px, a light track with a hairline
|
|
184
|
+
at its inner edge, a rounded thumb in it, no arrows. Each selector written out: Chrome drops a part's :horizontal under
|
|
185
|
+
an :is(), and a part paints no logical border. */
|
|
186
|
+
.fd-form[data-fd-theme="fluent"] .fd-list-scroll::-webkit-scrollbar { width: 15px; height: 15px; }
|
|
187
|
+
.fd-form[data-fd-theme="fluent"] .fd-list-scroll::-webkit-scrollbar-track,
|
|
188
|
+
.fd-form[data-fd-theme="fluent"] .fd-list-scroll::-webkit-scrollbar-corner { background: color-mix(in srgb, var(--fd-text) 2.2%, var(--fd-surface)); }
|
|
189
|
+
.fd-form[data-fd-theme="fluent"] .fd-list-scroll::-webkit-scrollbar-track:horizontal {
|
|
190
|
+
border-top: 1px solid color-mix(in srgb, var(--fd-text) 10%, var(--fd-surface)); border-bottom: 1px solid color-mix(in srgb, var(--fd-text) 7.5%, var(--fd-surface));
|
|
191
|
+
}
|
|
192
|
+
.fd-form[data-fd-theme="fluent"] .fd-list-scroll::-webkit-scrollbar-track:vertical {
|
|
193
|
+
border-left: 1px solid color-mix(in srgb, var(--fd-text) 10%, var(--fd-surface)); border-right: 1px solid color-mix(in srgb, var(--fd-text) 7.5%, var(--fd-surface));
|
|
194
|
+
}
|
|
195
|
+
.fd-form[data-fd-theme="fluent"] .fd-list-scroll::-webkit-scrollbar-thumb {
|
|
196
|
+
border: solid transparent; border-width: 4px 3px 3px; border-radius: 8px; background: color-mix(in srgb, var(--fd-text) 24.5%, var(--fd-surface)) padding-box;
|
|
197
|
+
}
|
|
198
|
+
.fd-form[data-fd-theme="fluent"] .fd-list-scroll::-webkit-scrollbar-thumb:vertical { border-width: 3px 3px 3px 4px; }
|
|
199
|
+
.fd-form[data-fd-theme="fluent"] .fd-list-scroll::-webkit-scrollbar-thumb:hover { background-color: color-mix(in srgb, var(--fd-text) 40%, var(--fd-surface)); }
|
|
200
|
+
.fd-form[data-fd-theme="fluent"] .fd-list-scroll::-webkit-scrollbar-button { display: none; }
|
|
114
201
|
`;
|
|
115
202
|
/** Puts the list's look in the document once. */
|
|
116
203
|
function installListStyles(doc) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-styles.js","sourceRoot":"","sources":["../../../../../libs/viewer/src/lib/list-styles.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"list-styles.js","sourceRoot":"","sources":["../../../../../libs/viewer/src/lib/list-styles.ts"],"names":[],"mappings":";;;AAuMA,8CAMC;AA7MD,iEAAiE;AACpD,QAAA,WAAW,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmM1B,CAAC;AAEF,iDAAiD;AACjD,SAAgB,iBAAiB,CAAC,GAAa;IAC7C,IAAI,GAAG,CAAC,cAAc,CAAC,gBAAgB,CAAC;QAAE,OAAO;IACjD,MAAM,KAAK,GAAG,GAAG,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;IACzC,KAAK,CAAC,EAAE,GAAG,gBAAgB,CAAC;IAC5B,KAAK,CAAC,WAAW,GAAG,mBAAW,CAAC;IAChC,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AACzB,CAAC"}
|
package/src/lib/list-styles.mjs
CHANGED
|
@@ -77,7 +77,9 @@ export const LIST_STYLES = `
|
|
|
77
77
|
.fd-pager-button { min-width: 32px; padding-inline: 0; font-size: 18px; line-height: 1; }
|
|
78
78
|
.fd-list-scroll { overflow-x: auto; background: var(--fd-surface); border: 1px solid var(--fd-border); border-radius: var(--fd-radius); }
|
|
79
79
|
.fd-list-table { width: 100%; border-collapse: collapse; font-size: 14px; }
|
|
80
|
-
.fd-list-table th { text-align: start; font-weight: 600;
|
|
80
|
+
.fd-list-table th { text-align: start; font-weight: 600; color: var(--fd-text); padding: 8px 10px; border-block-end: 1px solid var(--fd-border-strong); white-space: nowrap; background: var(--fd-surface); }
|
|
81
|
+
/* The header's words smaller than the rows', its cell the rows' size: a column's width in characters is the same in both. */
|
|
82
|
+
.fd-list-head { font-size: 13px; }
|
|
81
83
|
.fd-list-table td { padding: 7px 10px; border-block-end: 1px solid var(--fd-border); max-width: 28em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
82
84
|
.fd-list-table tbody tr:last-child td { border-block-end: none; }
|
|
83
85
|
.fd-list-table .fd-num { text-align: end; font-variant-numeric: tabular-nums; }
|
|
@@ -107,6 +109,91 @@ export const LIST_STYLES = `
|
|
|
107
109
|
.fd-list-more td { padding: 4px 10px; padding-inline-start: calc(46px + var(--fd-level, 0) * 22px); }
|
|
108
110
|
.fd-list-empty, .fd-list-failed { margin: 0; padding: 28px 12px; text-align: center; color: var(--fd-muted); }
|
|
109
111
|
.fd-list-failed { color: var(--fd-error); }
|
|
112
|
+
|
|
113
|
+
/* A column of a given width (cells), in characters of the rows' words: what does not fit ends in "…". */
|
|
114
|
+
.fd-list-table [data-width] { box-sizing: content-box; width: calc(var(--fd-col-width) * 1ch); max-width: calc(var(--fd-col-width) * 1ch); overflow: hidden; text-overflow: ellipsis; }
|
|
115
|
+
.fd-list-table th[data-width] .fd-list-sort { min-width: 0; }
|
|
116
|
+
.fd-list-table th[data-width] .fd-list-head { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
|
|
117
|
+
/* A column in pixels: the whole column, its paddings in it, as a work tracker sizes its grid's. */
|
|
118
|
+
.fd-list-table [data-width-px] { box-sizing: border-box; width: var(--fd-col-px); min-width: var(--fd-col-px); max-width: var(--fd-col-px); overflow: hidden; text-overflow: ellipsis; }
|
|
119
|
+
.fd-list-table th[data-width-px] .fd-list-sort { min-width: 0; }
|
|
120
|
+
.fd-list-table th[data-width-px] .fd-list-head { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
|
|
121
|
+
/* Every column sized: the table as wide as they are, never stretched; wider than its card, the card scrolls sideways. */
|
|
122
|
+
.fd-list-table[data-fixed] { width: max-content; }
|
|
123
|
+
/* The row whose record is open (in a popup over the list): lit as a chosen one is, until it closes. */
|
|
124
|
+
.fd-list-row[aria-current="true"] td { background: var(--fd-accent-soft); }
|
|
125
|
+
/* What a cell draws before its words: a kind's icon in its colour, a state's dot. */
|
|
126
|
+
.fd-list-lead { width: 14px; height: 14px; margin-inline-end: 6px; vertical-align: -2px; flex: none; stroke-width: 2.2; }
|
|
127
|
+
.fd-list-dot { display: inline-block; width: 8px; height: 8px; margin-inline-end: 6px; border-radius: 50%; vertical-align: 1px; background: var(--fd-dot, var(--fd-border-strong)); }
|
|
128
|
+
.fd-list-dot[data-tone="muted"] { --fd-dot: var(--fd-border-strong); }
|
|
129
|
+
.fd-list-dot[data-tone="danger"] { --fd-dot: var(--fd-error); }
|
|
130
|
+
.fd-list-dot[data-tone="success"] { --fd-dot: var(--fd-success); }
|
|
131
|
+
.fd-list-dot[data-tone="warning"] { --fd-dot: #d97706; }
|
|
132
|
+
.fd-list-dot[data-tone="info"] { --fd-dot: var(--fd-info); }
|
|
133
|
+
@media (forced-colors: active) { .fd-list-dot { background: CanvasText; } }
|
|
134
|
+
/* Rows under their parent: Expand all and Collapse all in the header, a toggle before a parent's name, each depth further in. */
|
|
135
|
+
.fd-list-table .fd-list-tree { width: 1%; padding-inline: 10px 4px; white-space: nowrap; }
|
|
136
|
+
.fd-list-folds { display: inline-flex; gap: 6px; vertical-align: middle; }
|
|
137
|
+
.fd-list-fold { all: unset; box-sizing: border-box; cursor: pointer; display: grid; place-items: center; width: 24px; height: 24px; border: 1px solid var(--fd-text); border-radius: 2px; color: var(--fd-text); font-size: 18px; font-weight: 400; line-height: 1; }
|
|
138
|
+
.fd-list-fold:hover { background: var(--fd-page); }
|
|
139
|
+
.fd-list-fold:focus-visible, .fd-list-twisty:focus-visible { outline: 2px solid var(--fd-focus); outline-offset: 1px; }
|
|
140
|
+
.fd-list-row[data-depth] > td[data-name] { padding-inline-start: calc(10px + var(--fd-depth, 0) * 20px); }
|
|
141
|
+
.fd-list-twisty, .fd-list-twisty-room { display: inline-block; width: 20px; height: 20px; margin-inline-end: 2px; vertical-align: middle; }
|
|
142
|
+
.fd-list-twisty { all: unset; display: inline-grid; place-items: center; width: 20px; height: 20px; margin-inline-end: 2px; vertical-align: middle; cursor: pointer; border-radius: 2px; color: var(--fd-muted); }
|
|
143
|
+
.fd-list-twisty::before { content: ''; width: 6px; height: 6px; border-top: 1.5px solid currentColor; border-right: 1.5px solid currentColor; transform: rotate(45deg); transition: transform 0.12s; }
|
|
144
|
+
.fd-list-twisty:dir(rtl)::before { transform: rotate(-135deg); }
|
|
145
|
+
.fd-list-twisty[aria-expanded="true"]::before { transform: rotate(135deg); }
|
|
146
|
+
.fd-list-twisty:hover { background: var(--fd-page); color: var(--fd-text); }
|
|
147
|
+
|
|
148
|
+
/* A list with the filter bar: its card above the table's, the pager under the table. */
|
|
149
|
+
.fd-list[data-search="fields"] .fd-list-bar { gap: 16px; }
|
|
150
|
+
.fd-list[data-search="fields"] .fd-list-records > .fd-pager { justify-self: end; }
|
|
151
|
+
/* Fluent's lists, as a work tracker draws its backlog: the table a card with a light shadow and no frame; the header's words
|
|
152
|
+
small, semibold and muted, the columns parted by short rules; rows 35px tall with no lines between them. */
|
|
153
|
+
/* Its header 38px and its rule, 39px in all whether a column's width is in pixels (its whole box) or characters. */
|
|
154
|
+
.fd-form[data-fd-theme="fluent"] .fd-list-table th { position: relative; box-sizing: border-box; height: 39px; padding-block: 0; color: var(--fd-muted); border-block-end: 1px solid var(--fd-border); }
|
|
155
|
+
.fd-form[data-fd-theme="fluent"] .fd-list-head { font-size: 12px; font-weight: 600; }
|
|
156
|
+
.fd-form[data-fd-theme="fluent"] .fd-list-table thead th:not(:first-child)::after { content: ''; position: absolute; inset-inline-end: var(--fd-rule-in, 0px); inset-block: 10px; width: 1px; background: var(--fd-border); }
|
|
157
|
+
.fd-form[data-fd-theme="fluent"] .fd-list-table thead th.fd-list-tree::after, .fd-form[data-fd-theme="fluent"] .fd-list-table thead th.fd-list-check::after { content: none; }
|
|
158
|
+
/* A column the page says has no rule (a tracker's Order, which the person cannot size). */
|
|
159
|
+
.fd-form[data-fd-theme="fluent"] .fd-list-table thead th[data-rule="none"]::after { content: none; }
|
|
160
|
+
/* Rows 36px apart (measured on the tracker's backlog: 17 rows from y 280 to 892); a cell's words 3px in from its column's
|
|
161
|
+
start, its header's 7px, so a header stands a little in from the words under it. */
|
|
162
|
+
.fd-form[data-fd-theme="fluent"] .fd-list-table td { height: 36px; padding-block: 0; padding-inline: 3px 8px; border-block-end: 0; }
|
|
163
|
+
.fd-form[data-fd-theme="fluent"] .fd-list-table th { padding-inline: 7px 8px; }
|
|
164
|
+
.fd-form[data-fd-theme="fluent"] .fd-list-row:hover td { background: var(--fd-fill, var(--fd-page)); }
|
|
165
|
+
.fd-form[data-fd-theme="fluent"] .fd-list-row[aria-current="true"] td { background: var(--fd-accent-soft); }
|
|
166
|
+
/* Expand all and Collapse all 15px in, 25px by 22px and 4px apart, 7px before the next column; a parent's toggle, or room
|
|
167
|
+
the size of one, 24px and 5px before the name, and the name's header over the name. */
|
|
168
|
+
.fd-form[data-fd-theme="fluent"] .fd-list-table .fd-list-tree { padding-inline: 15px 7px; }
|
|
169
|
+
.fd-form[data-fd-theme="fluent"] .fd-list-folds { gap: 4px; }
|
|
170
|
+
.fd-form[data-fd-theme="fluent"] .fd-list-fold { width: 25px; height: 22px; }
|
|
171
|
+
.fd-form[data-fd-theme="fluent"] .fd-list-row[data-depth] > td[data-name] { padding-inline-start: calc(3px + var(--fd-depth, 0) * 20px); }
|
|
172
|
+
/* The kind's icon 30px into the name's column, its words 4px after it, the header's word over the icon (08_18: the bug's
|
|
173
|
+
ink at 495, its title's words at 512, "Title" at 494). */
|
|
174
|
+
.fd-form[data-fd-theme="fluent"] :is(.fd-list-twisty, .fd-list-twisty-room) { width: 24px; margin-inline-end: 3px; }
|
|
175
|
+
.fd-form[data-fd-theme="fluent"] .fd-list-table th[data-name] { padding-inline-start: 30px; }
|
|
176
|
+
.fd-form[data-fd-theme="fluent"] .fd-list-lead { margin-inline-end: 4px; }
|
|
177
|
+
/* The grid runs 9px on past its last column's rule, as the tracker's does (08_18: its white to 2011, the rule at 2002). */
|
|
178
|
+
.fd-form[data-fd-theme="fluent"] .fd-list-scroll:has(> .fd-list-table[data-fixed]) { padding-inline-end: 9px; }
|
|
179
|
+
/* Its card's scroll bar as the tracker's, on every system that lets a page draw one: 15px, a light track with a hairline
|
|
180
|
+
at its inner edge, a rounded thumb in it, no arrows. Each selector written out: Chrome drops a part's :horizontal under
|
|
181
|
+
an :is(), and a part paints no logical border. */
|
|
182
|
+
.fd-form[data-fd-theme="fluent"] .fd-list-scroll::-webkit-scrollbar { width: 15px; height: 15px; }
|
|
183
|
+
.fd-form[data-fd-theme="fluent"] .fd-list-scroll::-webkit-scrollbar-track,
|
|
184
|
+
.fd-form[data-fd-theme="fluent"] .fd-list-scroll::-webkit-scrollbar-corner { background: color-mix(in srgb, var(--fd-text) 2.2%, var(--fd-surface)); }
|
|
185
|
+
.fd-form[data-fd-theme="fluent"] .fd-list-scroll::-webkit-scrollbar-track:horizontal {
|
|
186
|
+
border-top: 1px solid color-mix(in srgb, var(--fd-text) 10%, var(--fd-surface)); border-bottom: 1px solid color-mix(in srgb, var(--fd-text) 7.5%, var(--fd-surface));
|
|
187
|
+
}
|
|
188
|
+
.fd-form[data-fd-theme="fluent"] .fd-list-scroll::-webkit-scrollbar-track:vertical {
|
|
189
|
+
border-left: 1px solid color-mix(in srgb, var(--fd-text) 10%, var(--fd-surface)); border-right: 1px solid color-mix(in srgb, var(--fd-text) 7.5%, var(--fd-surface));
|
|
190
|
+
}
|
|
191
|
+
.fd-form[data-fd-theme="fluent"] .fd-list-scroll::-webkit-scrollbar-thumb {
|
|
192
|
+
border: solid transparent; border-width: 4px 3px 3px; border-radius: 8px; background: color-mix(in srgb, var(--fd-text) 24.5%, var(--fd-surface)) padding-box;
|
|
193
|
+
}
|
|
194
|
+
.fd-form[data-fd-theme="fluent"] .fd-list-scroll::-webkit-scrollbar-thumb:vertical { border-width: 3px 3px 3px 4px; }
|
|
195
|
+
.fd-form[data-fd-theme="fluent"] .fd-list-scroll::-webkit-scrollbar-thumb:hover { background-color: color-mix(in srgb, var(--fd-text) 40%, var(--fd-surface)); }
|
|
196
|
+
.fd-form[data-fd-theme="fluent"] .fd-list-scroll::-webkit-scrollbar-button { display: none; }
|
|
110
197
|
`;
|
|
111
198
|
/** Puts the list's look in the document once. */
|
|
112
199
|
export function installListStyles(doc) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-styles.mjs","sourceRoot":"","sources":["../../../../../libs/viewer/src/lib/list-styles.ts"],"names":[],"mappings":"AAAA,iEAAiE;AACjE,MAAM,CAAC,MAAM,WAAW,GAAG
|
|
1
|
+
{"version":3,"file":"list-styles.mjs","sourceRoot":"","sources":["../../../../../libs/viewer/src/lib/list-styles.ts"],"names":[],"mappings":"AAAA,iEAAiE;AACjE,MAAM,CAAC,MAAM,WAAW,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmM1B,CAAC;AAEF,iDAAiD;AACjD,MAAM,UAAU,iBAAiB,CAAC,GAAa;IAC7C,IAAI,GAAG,CAAC,cAAc,CAAC,gBAAgB,CAAC;QAAE,OAAO;IACjD,MAAM,KAAK,GAAG,GAAG,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;IACzC,KAAK,CAAC,EAAE,GAAG,gBAAgB,CAAC;IAC5B,KAAK,CAAC,WAAW,GAAG,WAAW,CAAC;IAChC,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AACzB,CAAC"}
|
package/src/lib/list.d.mts
CHANGED
|
@@ -19,7 +19,11 @@ export interface ListContext {
|
|
|
19
19
|
icons?: IconSet;
|
|
20
20
|
/** Where the list's favourite searches are kept. */
|
|
21
21
|
preferences: PreferenceStore;
|
|
22
|
-
|
|
22
|
+
/**
|
|
23
|
+
* A row opened. A promise answered (the record in a dialog, closed): the list asks again once it settles, and its row
|
|
24
|
+
* takes the focus back. Anything else answered is let be, so a handler that returns what it did (a push's count) still fits.
|
|
25
|
+
*/
|
|
26
|
+
onOpenRecord?: (id: RecordId) => unknown;
|
|
23
27
|
/** Conditions every search keeps: the records this list may show at all. */
|
|
24
28
|
fixedFilter?: ResolvedFilter[];
|
|
25
29
|
/** Other ways of showing the records, by name: `map` for a list with `map`. */
|
|
@@ -77,10 +81,21 @@ export interface ListViewPart {
|
|
|
77
81
|
destroy(): void;
|
|
78
82
|
}
|
|
79
83
|
export type ListViewFactory = (context: ListViewContext) => ListViewPart;
|
|
84
|
+
/** How a record is opened from the app rather than by a row's press. */
|
|
85
|
+
export interface OpenRowOptions {
|
|
86
|
+
/** Its row marked open (aria-current, lit) while it is: true, as a press does; false when no row was pressed (the address). */
|
|
87
|
+
lit?: boolean;
|
|
88
|
+
}
|
|
80
89
|
export interface ListView {
|
|
81
90
|
element: HTMLElement;
|
|
82
91
|
/** Ask for the records again, keeping the page, the order and what is chosen where it still applies. */
|
|
83
92
|
reload(): Promise<void>;
|
|
93
|
+
/**
|
|
94
|
+
* Open a record as its row's press does: the app's onOpenRecord, its row marked open meanwhile (aria-current); once the
|
|
95
|
+
* app's promise settles, the records again and the focus back on its row. For an app that opens one by its address too:
|
|
96
|
+
* `{ lit: false }` leaves the row unmarked, as no row was pressed.
|
|
97
|
+
*/
|
|
98
|
+
open(id: RecordId, options?: OpenRowOptions): Promise<void>;
|
|
84
99
|
destroy(): void;
|
|
85
100
|
}
|
|
86
101
|
/**
|
package/src/lib/list.d.ts
CHANGED
|
@@ -19,7 +19,11 @@ export interface ListContext {
|
|
|
19
19
|
icons?: IconSet;
|
|
20
20
|
/** Where the list's favourite searches are kept. */
|
|
21
21
|
preferences: PreferenceStore;
|
|
22
|
-
|
|
22
|
+
/**
|
|
23
|
+
* A row opened. A promise answered (the record in a dialog, closed): the list asks again once it settles, and its row
|
|
24
|
+
* takes the focus back. Anything else answered is let be, so a handler that returns what it did (a push's count) still fits.
|
|
25
|
+
*/
|
|
26
|
+
onOpenRecord?: (id: RecordId) => unknown;
|
|
23
27
|
/** Conditions every search keeps: the records this list may show at all. */
|
|
24
28
|
fixedFilter?: ResolvedFilter[];
|
|
25
29
|
/** Other ways of showing the records, by name: `map` for a list with `map`. */
|
|
@@ -77,10 +81,21 @@ export interface ListViewPart {
|
|
|
77
81
|
destroy(): void;
|
|
78
82
|
}
|
|
79
83
|
export type ListViewFactory = (context: ListViewContext) => ListViewPart;
|
|
84
|
+
/** How a record is opened from the app rather than by a row's press. */
|
|
85
|
+
export interface OpenRowOptions {
|
|
86
|
+
/** Its row marked open (aria-current, lit) while it is: true, as a press does; false when no row was pressed (the address). */
|
|
87
|
+
lit?: boolean;
|
|
88
|
+
}
|
|
80
89
|
export interface ListView {
|
|
81
90
|
element: HTMLElement;
|
|
82
91
|
/** Ask for the records again, keeping the page, the order and what is chosen where it still applies. */
|
|
83
92
|
reload(): Promise<void>;
|
|
93
|
+
/**
|
|
94
|
+
* Open a record as its row's press does: the app's onOpenRecord, its row marked open meanwhile (aria-current); once the
|
|
95
|
+
* app's promise settles, the records again and the focus back on its row. For an app that opens one by its address too:
|
|
96
|
+
* `{ lit: false }` leaves the row unmarked, as no row was pressed.
|
|
97
|
+
*/
|
|
98
|
+
open(id: RecordId, options?: OpenRowOptions): Promise<void>;
|
|
84
99
|
destroy(): void;
|
|
85
100
|
}
|
|
86
101
|
/**
|