@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.
Files changed (158) hide show
  1. package/README.md +18 -0
  2. package/bundle/fieldia.ar.js +2 -2
  3. package/bundle/fieldia.ar.js.map +2 -2
  4. package/bundle/fieldia.choice.js +5 -0
  5. package/bundle/fieldia.choice.js.map +7 -0
  6. package/bundle/fieldia.de.js +2 -2
  7. package/bundle/fieldia.de.js.map +2 -2
  8. package/bundle/fieldia.filters.js +5 -0
  9. package/bundle/fieldia.filters.js.map +7 -0
  10. package/bundle/fieldia.fr.js +2 -2
  11. package/bundle/fieldia.fr.js.map +2 -2
  12. package/bundle/fieldia.head.js +5 -0
  13. package/bundle/fieldia.head.js.map +7 -0
  14. package/bundle/fieldia.js +44 -44
  15. package/bundle/fieldia.js.map +4 -4
  16. package/bundle/fieldia.path.js +5 -0
  17. package/bundle/fieldia.path.js.map +7 -0
  18. package/bundle/fieldia.text.js +24 -0
  19. package/bundle/fieldia.text.js.map +7 -0
  20. package/package.json +7 -3
  21. package/src/index.d.mts +2 -1
  22. package/src/index.d.ts +2 -1
  23. package/src/index.js +6 -1
  24. package/src/index.js.map +1 -1
  25. package/src/index.mjs +1 -0
  26. package/src/index.mjs.map +1 -1
  27. package/src/lib/button-parts.d.mts +30 -0
  28. package/src/lib/button-parts.d.ts +30 -0
  29. package/src/lib/button-parts.js +24 -0
  30. package/src/lib/button-parts.js.map +1 -0
  31. package/src/lib/button-parts.mjs +18 -0
  32. package/src/lib/button-parts.mjs.map +1 -0
  33. package/src/lib/dialog-window.d.mts +11 -0
  34. package/src/lib/dialog-window.d.ts +11 -0
  35. package/src/lib/dialog-window.js +86 -0
  36. package/src/lib/dialog-window.js.map +1 -0
  37. package/src/lib/dialog-window.mjs +82 -0
  38. package/src/lib/dialog-window.mjs.map +1 -0
  39. package/src/lib/dialog.d.mts +14 -3
  40. package/src/lib/dialog.d.ts +14 -3
  41. package/src/lib/dialog.js +84 -14
  42. package/src/lib/dialog.js.map +1 -1
  43. package/src/lib/dialog.mjs +85 -15
  44. package/src/lib/dialog.mjs.map +1 -1
  45. package/src/lib/filter-bar.d.mts +39 -0
  46. package/src/lib/filter-bar.d.ts +39 -0
  47. package/src/lib/filter-bar.js +290 -0
  48. package/src/lib/filter-bar.js.map +1 -0
  49. package/src/lib/filter-bar.mjs +287 -0
  50. package/src/lib/filter-bar.mjs.map +1 -0
  51. package/src/lib/filter-styles.d.mts +4 -0
  52. package/src/lib/filter-styles.d.ts +4 -0
  53. package/src/lib/filter-styles.js +63 -0
  54. package/src/lib/filter-styles.js.map +1 -0
  55. package/src/lib/filter-styles.mjs +59 -0
  56. package/src/lib/filter-styles.mjs.map +1 -0
  57. package/src/lib/filters-part.d.mts +8 -0
  58. package/src/lib/filters-part.d.ts +8 -0
  59. package/src/lib/filters-part.js +14 -0
  60. package/src/lib/filters-part.js.map +1 -0
  61. package/src/lib/filters-part.mjs +9 -0
  62. package/src/lib/filters-part.mjs.map +1 -0
  63. package/src/lib/group-styles.d.mts +9 -0
  64. package/src/lib/group-styles.d.ts +9 -0
  65. package/src/lib/group-styles.js +64 -0
  66. package/src/lib/group-styles.js.map +1 -0
  67. package/src/lib/group-styles.mjs +60 -0
  68. package/src/lib/group-styles.mjs.map +1 -0
  69. package/src/lib/head-part.d.mts +15 -0
  70. package/src/lib/head-part.d.ts +15 -0
  71. package/src/lib/head-part.js +26 -0
  72. package/src/lib/head-part.js.map +1 -0
  73. package/src/lib/head-part.mjs +16 -0
  74. package/src/lib/head-part.mjs.map +1 -0
  75. package/src/lib/head-styles.d.mts +28 -0
  76. package/src/lib/head-styles.d.ts +28 -0
  77. package/src/lib/head-styles.js +320 -0
  78. package/src/lib/head-styles.js.map +1 -0
  79. package/src/lib/head-styles.mjs +316 -0
  80. package/src/lib/head-styles.mjs.map +1 -0
  81. package/src/lib/labels.d.mts +29 -0
  82. package/src/lib/labels.d.ts +29 -0
  83. package/src/lib/labels.js +16 -0
  84. package/src/lib/labels.js.map +1 -1
  85. package/src/lib/labels.mjs +16 -0
  86. package/src/lib/labels.mjs.map +1 -1
  87. package/src/lib/list-styles.d.mts +1 -1
  88. package/src/lib/list-styles.d.ts +1 -1
  89. package/src/lib/list-styles.js +88 -1
  90. package/src/lib/list-styles.js.map +1 -1
  91. package/src/lib/list-styles.mjs +88 -1
  92. package/src/lib/list-styles.mjs.map +1 -1
  93. package/src/lib/list.d.mts +16 -1
  94. package/src/lib/list.d.ts +16 -1
  95. package/src/lib/list.js +281 -51
  96. package/src/lib/list.js.map +1 -1
  97. package/src/lib/list.mjs +282 -52
  98. package/src/lib/list.mjs.map +1 -1
  99. package/src/lib/locales/ar.js +16 -0
  100. package/src/lib/locales/ar.js.map +1 -1
  101. package/src/lib/locales/ar.mjs +16 -0
  102. package/src/lib/locales/ar.mjs.map +1 -1
  103. package/src/lib/locales/de.js +16 -0
  104. package/src/lib/locales/de.js.map +1 -1
  105. package/src/lib/locales/de.mjs +16 -0
  106. package/src/lib/locales/de.mjs.map +1 -1
  107. package/src/lib/locales/fr.js +16 -0
  108. package/src/lib/locales/fr.js.map +1 -1
  109. package/src/lib/locales/fr.mjs +16 -0
  110. package/src/lib/locales/fr.mjs.map +1 -1
  111. package/src/lib/look.d.mts +1 -1
  112. package/src/lib/look.d.ts +1 -1
  113. package/src/lib/look.js +3 -0
  114. package/src/lib/look.js.map +1 -1
  115. package/src/lib/look.mjs +3 -0
  116. package/src/lib/look.mjs.map +1 -1
  117. package/src/lib/record-bar.d.mts +10 -1
  118. package/src/lib/record-bar.d.ts +10 -1
  119. package/src/lib/record-bar.js +15 -7
  120. package/src/lib/record-bar.js.map +1 -1
  121. package/src/lib/record-bar.mjs +14 -7
  122. package/src/lib/record-bar.mjs.map +1 -1
  123. package/src/lib/record-head.d.mts +58 -0
  124. package/src/lib/record-head.d.ts +58 -0
  125. package/src/lib/record-head.js +245 -0
  126. package/src/lib/record-head.js.map +1 -0
  127. package/src/lib/record-head.mjs +240 -0
  128. package/src/lib/record-head.mjs.map +1 -0
  129. package/src/lib/rich-button.d.mts +12 -0
  130. package/src/lib/rich-button.d.ts +12 -0
  131. package/src/lib/rich-button.js +186 -0
  132. package/src/lib/rich-button.js.map +1 -0
  133. package/src/lib/rich-button.mjs +183 -0
  134. package/src/lib/rich-button.mjs.map +1 -0
  135. package/src/lib/section-head.d.mts +26 -0
  136. package/src/lib/section-head.d.ts +26 -0
  137. package/src/lib/section-head.js +65 -0
  138. package/src/lib/section-head.js.map +1 -0
  139. package/src/lib/section-head.mjs +56 -0
  140. package/src/lib/section-head.mjs.map +1 -0
  141. package/src/lib/section-tools.d.mts +12 -0
  142. package/src/lib/section-tools.d.ts +12 -0
  143. package/src/lib/section-tools.js +124 -0
  144. package/src/lib/section-tools.js.map +1 -0
  145. package/src/lib/section-tools.mjs +121 -0
  146. package/src/lib/section-tools.mjs.map +1 -0
  147. package/src/lib/viewer-parts.d.mts +33 -0
  148. package/src/lib/viewer-parts.d.ts +33 -0
  149. package/src/lib/viewer-parts.js +75 -0
  150. package/src/lib/viewer-parts.js.map +1 -0
  151. package/src/lib/viewer-parts.mjs +70 -0
  152. package/src/lib/viewer-parts.mjs.map +1 -0
  153. package/src/lib/viewer.d.mts +30 -7
  154. package/src/lib/viewer.d.ts +30 -7
  155. package/src/lib/viewer.js +317 -97
  156. package/src/lib/viewer.js.map +1 -1
  157. package/src/lib/viewer.mjs +319 -99
  158. package/src/lib/viewer.mjs.map +1 -1
@@ -0,0 +1,320 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.HEAD_PART_CSS = void 0;
4
+ exports.installHeadStyles = installHeadStyles;
5
+ const widgets_1 = require("@fieldia/widgets");
6
+ /**
7
+ * A record's head as a work tracker draws a work item's, and the dialog round
8
+ * it: measured from the work item's own window (fieldia's docs/plans,
9
+ * work-item-replica.md §2.3–2.5) and written in the form's tokens, so a
10
+ * theme, a host's colours, the dark scheme and right to left all follow.
11
+ * Greys that are no token of their own are mixed from the text and the
12
+ * surface, in the shares the light window shows them: the band #f8f8f8, the
13
+ * tabs' frame #dadada, a count's pill #ebebeb, a pressed button #d2d2d2.
14
+ *
15
+ * - The dialog of the `inset` size: 96px in from the window's sides and 46px
16
+ * from its top and bottom, the whole window under 760px; with no dimmed
17
+ * page behind (`clear`); maximised, the whole window; resized by its grip.
18
+ * - The head: the kind's strip along its start edge through its white part,
19
+ * the badge row (⤢ and × at its end), the title line, the row of people,
20
+ * links and buttons, then the band of fields with "Updated by" and the
21
+ * tabs at its end; the body under it scrolls on its own in a dialog.
22
+ * - Buttons a head holds: quiet ones on a light fill, split ones with a rule
23
+ * between their press and their chevron, ones shown by their icon alone.
24
+ *
25
+ * Logical properties throughout: right to left mirrors on its own.
26
+ *
27
+ * The head part's own sheet (head-part.ts), put in its place among Fieldia's
28
+ * the first time a page draws a head, a split button, a work heading or the
29
+ * inset dialog (installPartStyles, PART_RANK.head).
30
+ */
31
+ exports.HEAD_PART_CSS = `
32
+ /* ---- the dialog ---------------------------------------------------------------------- */
33
+ /* Nothing dimmed behind: the page stays as it is, out of reach while the dialog is open. */
34
+ .fd-dialog-backdrop.fd-backdrop-clear { background: transparent; }
35
+ /* As a work item's window over its list: in from the window's edges, its corners small, its shadow deep. */
36
+ .fd-form-dialog.fd-size-inset {
37
+ position: fixed; inset: 46px 96px; width: auto; height: auto; max-width: none; max-height: none;
38
+ border-radius: 4px; background: var(--fd-surface);
39
+ /* An edge of its own where the scheme has one: in the dark a shadow is lost on the page behind. */
40
+ box-shadow: 0 0 0 1px var(--fd-edge, transparent), 0 25.6px 57.6px rgba(0, 0, 0, 0.22), 0 4.8px 14.4px rgba(0, 0, 0, 0.18);
41
+ }
42
+ /* Under 760px it is the whole window already: nothing to maximise or resize. */
43
+ @media (max-width: 759.98px) { .fd-form-dialog.fd-size-inset { inset: 0; border-radius: 0; } .fd-form-dialog.fd-size-inset :is(.fd-dialog-max, .fd-dialog-grip) { display: none !important; } }
44
+ /* Resized by its grip: where it stands and how big, set on it. */
45
+ .fd-form-dialog[data-resized] { position: fixed; max-width: none; max-height: none; margin: 0; }
46
+ /* Maximised: the whole window, whatever its size or place was; Restore puts it back. */
47
+ .fd-form-dialog[data-maximised] { position: fixed; inset: 0 !important; width: auto !important; height: auto !important; max-width: none; max-height: none; border-radius: 0; }
48
+ .fd-form-dialog[data-maximised] > .fd-dialog-grip { display: none; }
49
+ /* ⤢ beside ×, and the head's own window buttons: an icon in a box a finger's size. */
50
+ .fd-dialog-max { display: inline-grid; place-items: center; border: none; background: none; cursor: pointer; padding: 2px 8px; border-radius: 4px; color: var(--fd-muted); }
51
+ .fd-dialog-max:hover { background: var(--fd-page); color: var(--fd-text); }
52
+ .fd-dialog-max .fd-icon { width: 16px; height: 16px; margin: 0; }
53
+ .fd-form-dialog :is(.fd-dialog-max, .fd-head-window .fd-dialog-close) {
54
+ display: inline-grid; place-items: center; width: 32px; height: 32px; padding: 0; font-size: 16px;
55
+ color: var(--fd-text); border-radius: 2px;
56
+ }
57
+ .fd-form-dialog :is(.fd-dialog-max, .fd-head-window .fd-dialog-close) .fd-icon { width: 16px; height: 16px; margin: 0; }
58
+ /* The grip at the end-bottom corner: a small triangle in outline, in the words' colour, a finger's room round it (08_19). */
59
+ .fd-dialog-grip {
60
+ position: absolute; inset-inline-end: 0; inset-block-end: 0; width: 16px; height: 16px; padding: 0; border: 0; z-index: 2;
61
+ background: none; cursor: nwse-resize; color: color-mix(in srgb, var(--fd-text) 90%, var(--fd-surface)); border-end-end-radius: 4px;
62
+ }
63
+ .fd-dialog-grip:dir(rtl) { cursor: nesw-resize; }
64
+ .fd-dialog-grip::before {
65
+ content: ""; position: absolute; inset-inline-end: 4px; inset-block-end: 4px; box-sizing: border-box; width: 7px; height: 7px;
66
+ border-inline-end: 1.5px solid currentColor; border-block-end: 1.5px solid currentColor;
67
+ background: linear-gradient(to top left, transparent calc(50% - 0.75px), currentColor calc(50% - 0.75px) calc(50% + 0.75px), transparent calc(50% + 0.75px));
68
+ }
69
+ .fd-dialog-grip:dir(rtl)::before {
70
+ background: linear-gradient(to top right, transparent calc(50% - 0.75px), currentColor calc(50% - 0.75px) calc(50% + 0.75px), transparent calc(50% + 0.75px));
71
+ }
72
+ .fd-form-dialog:has(> .fd-dialog-grip) { position: relative; }
73
+ /* The grip has a band of its own at the foot: the body's scrollbar ends above it, as a work item's window has it; a
74
+ history filling the body keeps 20px under its list, its foot 38px from the window's edge as before. */
75
+ .fd-form-dialog[data-headed]:not([data-maximised]):has(> .fd-dialog-grip) > .fd-form-dialog-body { padding-block-end: 18px; --fd-history-foot: 20px; }
76
+ @media (max-width: 759.98px) { .fd-form-dialog.fd-size-inset[data-headed]:has(> .fd-dialog-grip) > .fd-form-dialog-body { padding-block-end: 0; --fd-history-foot: 38px; } }
77
+ .fd-form-dialog.fd-size-inset:has(> .fd-dialog-grip), .fd-form-dialog[data-resized] { position: fixed; }
78
+
79
+ /* A page with a head of its own is the dialog: its head stays, its body scrolls under it. */
80
+ .fd-form-dialog[data-headed] > .fd-form-dialog-body { display: flex; flex-direction: column; overflow: hidden; padding: 0; background: var(--fd-surface); }
81
+ .fd-form-dialog[data-headed] > .fd-form-dialog-body > .fd-form { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
82
+ .fd-form-dialog[data-headed] > .fd-form-dialog-body > .fd-form > .fd-content { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
83
+ .fd-form-dialog[data-headed] .fd-head-page { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
84
+ .fd-form-dialog[data-headed] .fd-head-page > .fd-head { flex: none; }
85
+ .fd-form-dialog[data-headed] .fd-head-page > :is(.fd-head-body, .fd-head-layout) { flex: 1 1 auto; min-height: 0; overflow: auto; }
86
+
87
+ /* ---- scroll bars, as the tracker's window draws them on every system: 15px, a light track with a hairline at its
88
+ inner edge, a rounded thumb inset in it, no arrows (where the browser lets a page draw them: Chrome, Edge, Safari).
89
+ Each selector written out: Chrome drops a scroll bar part's :vertical or :horizontal under an :is() ancestor, and a
90
+ part paints no logical border, so its sides are physical ones, swapped right to left. ---- */
91
+ .fd-head-page ::-webkit-scrollbar { width: 15px; height: 15px; }
92
+ .fd-head-page ::-webkit-scrollbar-track,
93
+ .fd-head-page ::-webkit-scrollbar-corner { background: color-mix(in srgb, var(--fd-text) 2.2%, var(--fd-surface)); }
94
+ .fd-head-page ::-webkit-scrollbar-track:vertical {
95
+ 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));
96
+ }
97
+ [dir="rtl"] .fd-head-page ::-webkit-scrollbar-track:vertical {
98
+ border-left-color: color-mix(in srgb, var(--fd-text) 7.5%, var(--fd-surface)); border-right-color: color-mix(in srgb, var(--fd-text) 10%, var(--fd-surface));
99
+ }
100
+ .fd-head-page ::-webkit-scrollbar-track:horizontal {
101
+ 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));
102
+ }
103
+ .fd-head-page ::-webkit-scrollbar-thumb {
104
+ border: solid transparent; border-width: 3px 3px 3px 4px; border-radius: 8px; background: color-mix(in srgb, var(--fd-text) 24.5%, var(--fd-surface)) padding-box;
105
+ }
106
+ .fd-head-page ::-webkit-scrollbar-thumb:horizontal { border-width: 4px 3px 3px; }
107
+ [dir="rtl"] .fd-head-page ::-webkit-scrollbar-thumb:vertical { border-width: 3px 4px 3px 3px; }
108
+ .fd-head-page ::-webkit-scrollbar-thumb:hover { background-color: color-mix(in srgb, var(--fd-text) 40%, var(--fd-surface)); }
109
+ .fd-head-page ::-webkit-scrollbar-button { display: none; }
110
+
111
+ /* ---- the head ------------------------------------------------------------------------ */
112
+ .fd-head-page { padding: 0; background: var(--fd-surface); }
113
+ .fd-head {
114
+ --fd-head-edge: color-mix(in srgb, var(--fd-text) 16.2%, var(--fd-surface));
115
+ --fd-head-pill: color-mix(in srgb, var(--fd-text) 8.7%, var(--fd-surface));
116
+ --fd-head-pressed: color-mix(in srgb, var(--fd-text) 19.7%, var(--fd-surface));
117
+ --fd-head-fill: var(--fd-fill, color-mix(in srgb, var(--fd-text) 5.7%, var(--fd-surface)));
118
+ --fd-head-icon: color-mix(in srgb, var(--fd-text) 79%, var(--fd-surface));
119
+ --fd-head-link: var(--fd-link, var(--fd-accent));
120
+ --fd-control-height: 32px;
121
+ container: fd-head / inline-size;
122
+ position: relative; background: var(--fd-surface); color: var(--fd-text); font-size: 14px;
123
+ }
124
+ /* The white part: the strip of the kind's colour along its start edge, through it and no further. */
125
+ .fd-head-top { position: relative; padding-block-end: 6px; }
126
+ .fd-head-strip { position: absolute; inset-block: 0; inset-inline-start: 0; width: 10px; background: var(--fd-kind, transparent); }
127
+ .fd-head:not([data-kind]) .fd-head-strip { display: none; }
128
+ /* The badge row: the kind's icon in its colour, its name in capitals and the number in the link colour; ⤢ and × at its end. */
129
+ .fd-head-badge-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; height: 42px; padding-inline: 20px 4px; }
130
+ .fd-head-badge { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; line-height: 16px; color: var(--fd-head-link); white-space: nowrap; }
131
+ .fd-head-badge-icon { display: inline-grid; color: var(--fd-kind, var(--fd-head-link)); }
132
+ /* The kind's icon 14px, its box 2px before the badge's start so its drawing starts there, the words 39px in (20.22.23). */
133
+ .fd-head-badge-icon .fd-icon { width: 14px; height: 14px; margin: 0; margin-inline-start: -2px; stroke-width: 2.2; }
134
+ .fd-head-window { display: inline-flex; align-items: center; gap: 3px; margin-inline-start: auto; }
135
+ /* The title line: the number before the title, its box from 64px in, Copy title at its end. */
136
+ .fd-head-title { display: flex; align-items: center; min-height: 32px; margin-block-start: 1px; padding-inline: 19px 8px; }
137
+ .fd-head-number { flex: none; min-inline-size: 40px; margin-inline-end: 5px; font-size: 18px; line-height: 24px; color: color-mix(in srgb, var(--fd-text) 85%, #000); font-variant-numeric: tabular-nums; }
138
+ .fd-form .fd-head-title > .fd-field { flex: 1 1 auto; min-width: 0; display: block; }
139
+ .fd-form .fd-head-title > .fd-title-side { flex: none; }
140
+ .fd-form .fd-head-title > .fd-field > .fd-input { width: 100%; height: 32px; font-size: 18px; padding-inline: 11px; color: var(--fd-text); }
141
+ /* Copy title: there while the title is pointed at or worked in, its room always kept; always where nothing can point. */
142
+ .fd-head-copy {
143
+ flex: none; display: inline-grid; place-items: center; width: 34px; height: 32px; padding: 0; border: 0; border-radius: 2px;
144
+ background: var(--fd-head-fill); color: var(--fd-head-icon); cursor: pointer; visibility: hidden;
145
+ }
146
+ .fd-head-copy .fd-icon { width: 16px; height: 16px; margin: 0; }
147
+ .fd-head-title:focus-within > .fd-head-copy { visibility: visible; }
148
+ @media (hover: hover) { .fd-head-title:hover > .fd-head-copy { visibility: visible; } }
149
+ @media (hover: none) { .fd-head-copy { visibility: visible; } }
150
+ .fd-head-copy:hover { background: var(--fd-head-pressed); }
151
+
152
+ /* The row under the title: people and links from its start, the record's buttons at its end. */
153
+ .fd-head-row { display: flex; align-items: center; justify-content: space-between; gap: 8px 16px; min-height: 32px; margin-block-start: 9px; padding-inline: 21px 6px; }
154
+ .fd-head-meta { display: flex; align-items: center; gap: 6px; min-width: 0; flex: 1 1 auto; }
155
+ .fd-form .fd-head-meta > .fd-field { flex: 0 1 269px; min-width: 0; }
156
+ .fd-form .fd-head-meta > .fd-field:is([data-type="many2many"], [data-widget="tags"]) { flex: 0 1 auto; }
157
+ /* Tags with their "Add Tag" button: the button just after the comments' link, as the tracker's (08_19): no box room round it. */
158
+ .fd-form .fd-head-meta .fd-field[data-quiet] .fd-tags:has(> .fd-tags-adder:not([hidden])) { padding-inline: 0; }
159
+ .fd-head-link {
160
+ display: inline-flex; align-items: center; gap: 2px; padding: 0 2px; border: 0; background: none; cursor: pointer;
161
+ font: inherit; font-size: 14px; color: var(--fd-head-link); white-space: nowrap; border-radius: 2px;
162
+ }
163
+ .fd-head-link .fd-icon { width: 16px; height: 16px; margin: 0; }
164
+ /* A link led by its icon: the icon at the link's start, its words 2px after it (the comments' bubble, 20.22.23). */
165
+ .fd-head-link:has(> .fd-icon:first-child) { padding-inline-start: 0; }
166
+ button.fd-head-link:hover .fd-head-link-words { text-decoration: underline; }
167
+ span.fd-head-link { cursor: default; color: var(--fd-text); }
168
+ .fd-head-actions { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 10px; flex: none; }
169
+
170
+ /* The head's buttons: quiet on a light fill, 14px in 600; the primary one in the accent; icons alone with no fill. */
171
+ .fd-head .fd-button, .fd-split > .fd-button { min-height: 32px; height: 32px; padding: 0 12px; gap: 10px; border: 0; border-radius: 2px; font-size: 14px; font-weight: 600; white-space: nowrap; }
172
+ .fd-head .fd-button .fd-icon, .fd-split > .fd-button .fd-icon { width: 16px; height: 16px; margin: 0; flex: none; }
173
+ .fd-button.fd-button-subtle { background: var(--fd-head-fill, var(--fd-fill, var(--fd-page))); color: var(--fd-text); border-color: transparent; }
174
+ .fd-button.fd-button-subtle:hover { background: color-mix(in srgb, var(--fd-text) 9%, var(--fd-surface)); color: var(--fd-text); }
175
+ .fd-button.fd-button-subtle[aria-expanded="true"], .fd-button.fd-button-subtle:active { background: var(--fd-head-pressed, var(--fd-border)); }
176
+ .fd-head .fd-button-secondary { background: var(--fd-head-fill); color: var(--fd-text); }
177
+ .fd-head .fd-button-secondary:hover { background: color-mix(in srgb, var(--fd-text) 9%, var(--fd-surface)); color: var(--fd-text); }
178
+ .fd-head .fd-button-primary, .fd-split[data-look="primary"] > .fd-button { background: var(--fd-accent); color: var(--fd-accent-text); }
179
+ .fd-head .fd-button-primary:hover { filter: none; background: var(--fd-accent-hover, var(--fd-accent)); color: var(--fd-accent-text); }
180
+ /* Its icon alone: a box 34 by 32, no fill, the icon a shade off the words. */
181
+ .fd-button.fd-button-icon-only { width: 34px; padding: 0; justify-content: center; }
182
+ .fd-head .fd-button.fd-button-icon-only:not(.fd-button-primary) { background: none; color: var(--fd-head-icon); }
183
+ .fd-head .fd-button.fd-button-icon-only:not(.fd-button-primary):hover { background: var(--fd-head-fill); }
184
+ /* ⋮, the record's menu, as an icon alone. */
185
+ .fd-head .fd-record-actions { position: relative; }
186
+ .fd-head .fd-head-more { width: 34px; padding: 0; background: none; color: var(--fd-head-icon); }
187
+ .fd-head .fd-head-more:hover { background: var(--fd-head-fill); }
188
+ .fd-head .fd-head-more[aria-expanded="true"] { background: var(--fd-head-pressed); }
189
+ /* Undo with nothing changed: idle in a light grey, as the tracker's (08_19), still at 3:1 as a usable button's icon must
190
+ be; its tooltip and a press say why. */
191
+ .fd-head .fd-button.fd-button-icon-only[data-idle]:not(.fd-button-primary) { color: color-mix(in srgb, var(--fd-text) 48%, var(--fd-surface)); }
192
+ /* An arrow that points back points the other way right to left. */
193
+ .fd-head .fd-icon[data-icon="undo"]:dir(rtl) { transform: scaleX(-1); }
194
+ /* A toggle pressed: Following. */
195
+ .fd-head .fd-button[aria-pressed="true"]:not(.fd-button-primary) { color: var(--fd-text); }
196
+
197
+ /* A split button: its press, a rule, its chevron or its own icon (Follow's gear); its menu under it. */
198
+ .fd-split { position: relative; display: inline-flex; align-items: stretch; flex: none; }
199
+ .fd-split > .fd-split-rule { width: 1px; background: var(--fd-head-pressed, var(--fd-border)); }
200
+ .fd-split[data-look="primary"] > .fd-split-rule { background: color-mix(in srgb, var(--fd-accent-text) 35%, var(--fd-accent)); }
201
+ .fd-split > .fd-button:first-child:not(:last-of-type) { border-start-end-radius: 0; border-end-end-radius: 0; }
202
+ .fd-split > .fd-split-more { padding: 0; width: 30px; border-start-start-radius: 0; border-end-start-radius: 0; }
203
+ .fd-split > .fd-split-more:has(> .fd-icon:not([data-icon="chevron-down"])) { width: 34px; }
204
+ /* Its chevron 13px across in a thin line; Follow's gear 12px (08_19). */
205
+ .fd-split > .fd-split-more > .fd-icon[data-icon="chevron-down"] { width: 20px; height: 20px; stroke-width: 1.3; }
206
+ .fd-split > .fd-split-more > .fd-icon:not([data-icon="chevron-down"]) { width: 13px; height: 13px; }
207
+ .fd-split-alone > .fd-button .fd-split-icon { width: 14px; height: 14px; }
208
+ .fd-split > .fd-button-menu { position: absolute; inset-block-start: calc(100% + 2px); inset-inline-start: 0; z-index: 40; }
209
+ .fd-split > .fd-button-menu[data-end] { inset-inline-start: auto; inset-inline-end: 0; }
210
+
211
+ /* ---- the band ---------------------------------------------------------------------- */
212
+ .fd-head-band {
213
+ display: flex; align-items: stretch; gap: 9px; min-height: 78px; background: var(--fd-band, color-mix(in srgb, var(--fd-text) 3%, var(--fd-surface)));
214
+ padding-inline: 16px 8px;
215
+ }
216
+ /* Its fields on its columns, two rows of 32px a pixel apart, each label in a track of 76px, the last 24px of it the lead slot. */
217
+ .fd-head-fields {
218
+ --fd-head-label: 76px;
219
+ flex: 1 1 auto; min-width: 0; display: grid; grid-template-columns: var(--fd-head-tracks, 1fr 1fr); grid-auto-rows: minmax(32px, auto);
220
+ column-gap: 8px; row-gap: 1px; align-content: start; padding-block: 7px 6px;
221
+ }
222
+ .fd-form .fd-head-fields > .fd-field[data-labels] {
223
+ display: grid; grid-template-columns: calc(var(--fd-head-label) - 24px) 24px minmax(0, 1fr); align-items: center; gap: 0; container-type: normal; min-width: 0;
224
+ }
225
+ .fd-form .fd-head-fields > .fd-field[data-labels] > .fd-label {
226
+ grid-column: 1 / 3; grid-row: 1; align-self: center; padding: 0; margin: 0; font-size: 12px; line-height: 16px; font-weight: 400; color: var(--fd-muted);
227
+ white-space: nowrap; overflow: hidden; text-overflow: clip;
228
+ }
229
+ .fd-form .fd-head-fields > .fd-field[data-labels] > :not(.fd-label) { grid-column: 3; }
230
+ .fd-form .fd-head-fields > .fd-field[data-labels] > .fd-label + * { grid-row: 1; }
231
+ /* The lead slot: a lock at the value's start, its words muted. */
232
+ /* Its middle 2px past the slot's, toward the value, as the tracker's lock stands under the state's dot. */
233
+ .fd-form .fd-head-fields > .fd-field[data-labels] > .fd-lock-wrap { grid-column: 2; grid-row: 1; justify-self: center; margin: 0; margin-inline-start: 4px; z-index: 1; }
234
+ .fd-form .fd-head-fields > .fd-field[data-labels] > .fd-lock-wrap + * { grid-row: 1; }
235
+ .fd-head-fields .fd-lock .fd-icon { width: 16px; height: 16px; }
236
+ .fd-head-fields .fd-lock { color: var(--fd-text); }
237
+ /* A locked value's words on a row of exactly 32px, as a box's: the rows and all under them on whole pixels. */
238
+ .fd-form .fd-head-fields > .fd-field > .fd-read-text { line-height: 20px; }
239
+ /* Every box in the head 32px tall, as the rows they stand in, its corners as small as a button's. */
240
+ .fd-form .fd-head :is(input, select).fd-input { box-sizing: border-box; height: 32px; min-height: 32px; }
241
+ .fd-form .fd-head .fd-field[data-quiet] :is(.fd-input:not(.fd-tags *), .fd-tags, .fd-dot-box) { border-radius: 2px; }
242
+ /* Values in 14px, their words 12px in from their box's edge. */
243
+ .fd-form .fd-head-fields > .fd-field[data-quiet] { --fd-quiet-pad: 11px; font-size: 14px; }
244
+ .fd-form .fd-head-fields > .fd-field > .fd-input, .fd-form .fd-head-fields > .fd-field .fd-input { font-size: 14px; }
245
+ /* A state's dot in the lead slot, its words where the other values' start. */
246
+ .fd-form .fd-head-fields .fd-field[data-quiet] .fd-dot-box { box-sizing: border-box; gap: 0; padding-inline-start: 11px; height: 32px; min-height: 32px; }
247
+ /* Its button the lead slot's 24px before the box, a finger's room; pressed anywhere on the box, it opens the states all the same. */
248
+ .fd-form .fd-head-fields .fd-field[data-quiet] .fd-dot-button { width: 24px; height: 32px; margin-inline: -36px 12px; }
249
+ .fd-form .fd-head-fields .fd-dot-button > .fd-dot { width: 10px; height: 10px; }
250
+ /* A box pointed at in the head, as the title's and Area's: an edge of the strong border. */
251
+ @media (hover: hover) {
252
+ .fd-form .fd-head .fd-field[data-quiet] > :hover :is(.fd-input:not(.fd-tags *), .fd-tags):not([readonly], :disabled, [contenteditable="false"], :focus, :focus-within),
253
+ .fd-form .fd-head .fd-field[data-quiet] > :is(.fd-input, .fd-tags, .fd-dot-box:not(:has(:disabled))):not([readonly], :disabled, [contenteditable="false"], :focus, :focus-within):hover {
254
+ border-color: var(--fd-border-strong);
255
+ }
256
+ }
257
+ /* The band's end: "Updated by" at its top, the tabs at its bottom. */
258
+ .fd-head-aside { flex: none; display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; gap: 4px; padding-block-start: 4px; min-width: 0; }
259
+ .fd-head-updated { font: inherit; font-size: 12px; line-height: 16px; color: var(--fd-muted); white-space: nowrap; padding: 0; border: 0; background: none; }
260
+ button.fd-head-updated { cursor: pointer; border-radius: 2px; }
261
+ button.fd-head-updated:hover { text-decoration: underline; }
262
+ .fd-head-tabs { display: flex; min-width: 0; max-width: 100%; }
263
+ .fd-head-tabs .fd-tabbar { min-width: 0; }
264
+ .fd-head-tabs .fd-tablist { gap: 0; border: 0; }
265
+ .fd-head-tabs .fd-tab {
266
+ position: relative; display: inline-flex; align-items: center; gap: 6px; height: 36px; margin: 0; padding: 0 8px;
267
+ border: 1px solid var(--fd-head-edge); border-block-end: 0; border-radius: 0; background: transparent;
268
+ font: inherit; font-size: 14px; font-weight: 400; color: var(--fd-text); white-space: nowrap;
269
+ }
270
+ .fd-head-tabs .fd-tab:has(> .fd-tab-count) { padding-inline-end: 8px; }
271
+ .fd-head-tabs .fd-tab .fd-icon { width: 16px; height: 16px; margin: 0; }
272
+ /* An icon alone in thin lines, a little above the middle, as the tracker's; a link's and a paperclip's 12px across (08_19). */
273
+ .fd-head-tabs .fd-tab-icon-only > .fd-icon { margin-block-end: 3px; stroke-width: 1.5; }
274
+ .fd-head-tabs .fd-tab-icon-only > .fd-icon[data-icon="link"] { width: 14px; height: 14px; stroke-width: 1.7; }
275
+ /* The paperclip in its own one-pixel lines, its box 16px and the count as close as with the link's 14 (20.22.23). */
276
+ .fd-head-tabs .fd-tab-icon-only > .fd-icon[data-icon="attach"]:not(:only-child) { margin-inline-end: -2px; }
277
+ .fd-head-tabs .fd-tab-icon-only > .fd-icon:only-child { margin-inline: 3px; }
278
+ .fd-head-tabs .fd-tab[aria-selected="true"] { font-weight: 600; color: var(--fd-text); border-color: var(--fd-head-edge); }
279
+ .fd-head-tabs .fd-tab[aria-selected="true"] .fd-icon { stroke-width: 2.3; }
280
+ /* The tab shown: two pixels of the accent under its words. */
281
+ .fd-head-tabs .fd-tab[aria-selected="true"]::after {
282
+ content: ""; position: absolute; inset-inline: 8px; inset-block-end: 4px; height: 2px; background: var(--fd-accent); border-radius: 1px;
283
+ }
284
+ .fd-head-tabs .fd-tab:has(> .fd-tab-count)[aria-selected="true"]::after { inset-inline-end: 8px; }
285
+ .fd-head-tabs .fd-tab:hover { background: color-mix(in srgb, var(--fd-text) 4%, transparent); }
286
+ .fd-tab-count {
287
+ display: inline-grid; place-items: center; min-width: 25px; height: 19px; padding: 0 6px; border-radius: 10px;
288
+ background: var(--fd-head-pill, var(--fd-accent-soft)); font-size: 12px; font-weight: 600; line-height: 19px; color: var(--fd-text);
289
+ }
290
+ .fd-tabs:not(.fd-tabs-in-head) .fd-tab-count { margin-inline-start: 6px; }
291
+
292
+ /* ---- the body under it --------------------------------------------------------------- */
293
+ .fd-head-body { padding: 0 12px 12px; background: var(--fd-surface); min-width: 0; }
294
+ .fd-head-body > .fd-alert { margin-block: 12px 0; }
295
+ .fd-tabs.fd-tabs-in-head > .fd-tabpanel { padding-block: 0; }
296
+ /* A tab of fields keeps room after its last ones, as the tracker's window scrolls on past them (20.22.25: 54px past a
297
+ 929px window), and no more: in a window 54px taller (08_19) they fit, with no scrollbar; a history fitting the window
298
+ keeps its own. */
299
+ .fd-form-dialog[data-headed] .fd-tabs.fd-tabs-in-head > .fd-tabpanel:not(:has(.fd-history)) { padding-block-end: 30px; }
300
+ .fd-head-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
301
+ @media (min-width: 1534px) { .fd-head-layout:has(> .fd-side) { grid-template-columns: minmax(0, 1fr) minmax(320px, 0.6fr); } }
302
+ .fd-form-dialog .fd-head-layout > .fd-side { display: none; }
303
+
304
+ /* ---- a narrow head: one column, the buttons and tabs under what they followed ------------------ */
305
+ @container fd-head (max-width: 760px) {
306
+ .fd-head-row { flex-wrap: wrap; }
307
+ .fd-head-meta { flex-wrap: wrap; flex-basis: 100%; }
308
+ .fd-head-actions { flex: 1 1 100%; justify-content: flex-start; gap: 8px; }
309
+ .fd-head-band { flex-direction: column; gap: 4px; padding-inline: 12px 8px; }
310
+ .fd-head-fields { grid-template-columns: minmax(0, 1fr); padding-block-end: 0; }
311
+ .fd-head-aside { align-items: stretch; padding-block-start: 0; }
312
+ .fd-head-updated { align-self: flex-start; white-space: normal; text-align: start; }
313
+ .fd-head-tabs { align-self: flex-start; }
314
+ }
315
+ `;
316
+ /** The sheet in a document, once, in its place among Fieldia's. */
317
+ function installHeadStyles(doc) {
318
+ (0, widgets_1.installPartStyles)(doc, 'fieldia-head-styles', exports.HEAD_PART_CSS, widgets_1.PART_RANK.head);
319
+ }
320
+ //# sourceMappingURL=head-styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"head-styles.js","sourceRoot":"","sources":["../../../../../libs/viewer/src/lib/head-styles.ts"],"names":[],"mappings":";;;AA0TA,8CAEC;AA5TD,8CAAgE;AAEhE;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACU,QAAA,aAAa,GAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4RtC,CAAC;AAEF,mEAAmE;AACnE,SAAgB,iBAAiB,CAAC,GAAa;IAC7C,IAAA,2BAAiB,EAAC,GAAG,EAAE,qBAAqB,EAAE,qBAAa,EAAE,mBAAS,CAAC,IAAI,CAAC,CAAC;AAC/E,CAAC"}