@fieldia/widgets 0.11.0 → 0.12.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 (213) hide show
  1. package/package.json +2 -2
  2. package/src/index.d.mts +2 -0
  3. package/src/index.d.ts +2 -0
  4. package/src/index.js +6 -1
  5. package/src/index.js.map +1 -1
  6. package/src/index.mjs +2 -0
  7. package/src/index.mjs.map +1 -1
  8. package/src/lib/badge.d.mts +8 -0
  9. package/src/lib/badge.d.ts +8 -0
  10. package/src/lib/badge.js +37 -0
  11. package/src/lib/badge.js.map +1 -0
  12. package/src/lib/badge.mjs +33 -0
  13. package/src/lib/badge.mjs.map +1 -0
  14. package/src/lib/calendar.d.mts +3 -1
  15. package/src/lib/calendar.d.ts +3 -1
  16. package/src/lib/calendar.js +17 -1
  17. package/src/lib/calendar.js.map +1 -1
  18. package/src/lib/calendar.mjs +17 -1
  19. package/src/lib/calendar.mjs.map +1 -1
  20. package/src/lib/cards.js +12 -4
  21. package/src/lib/cards.js.map +1 -1
  22. package/src/lib/cards.mjs +13 -5
  23. package/src/lib/cards.mjs.map +1 -1
  24. package/src/lib/choice-images.js +1 -1
  25. package/src/lib/choice-images.js.map +1 -1
  26. package/src/lib/choice-images.mjs +1 -1
  27. package/src/lib/choice-images.mjs.map +1 -1
  28. package/src/lib/choice-tags.js +2 -2
  29. package/src/lib/choice-tags.js.map +1 -1
  30. package/src/lib/choice-tags.mjs +2 -2
  31. package/src/lib/choice-tags.mjs.map +1 -1
  32. package/src/lib/colour.d.mts +11 -0
  33. package/src/lib/colour.d.ts +11 -0
  34. package/src/lib/colour.js +114 -0
  35. package/src/lib/colour.js.map +1 -0
  36. package/src/lib/colour.mjs +110 -0
  37. package/src/lib/colour.mjs.map +1 -0
  38. package/src/lib/copy.d.mts +8 -0
  39. package/src/lib/copy.d.ts +8 -0
  40. package/src/lib/copy.js +58 -0
  41. package/src/lib/copy.js.map +1 -0
  42. package/src/lib/copy.mjs +54 -0
  43. package/src/lib/copy.mjs.map +1 -0
  44. package/src/lib/date-range.d.mts +2 -0
  45. package/src/lib/date-range.d.ts +2 -0
  46. package/src/lib/date-range.js +220 -0
  47. package/src/lib/date-range.js.map +1 -0
  48. package/src/lib/date-range.mjs +216 -0
  49. package/src/lib/date-range.mjs.map +1 -0
  50. package/src/lib/display.d.mts +25 -1
  51. package/src/lib/display.d.ts +25 -1
  52. package/src/lib/display.js +42 -2
  53. package/src/lib/display.js.map +1 -1
  54. package/src/lib/display.mjs +39 -2
  55. package/src/lib/display.mjs.map +1 -1
  56. package/src/lib/distribution.d.mts +13 -0
  57. package/src/lib/distribution.d.ts +13 -0
  58. package/src/lib/distribution.js +159 -0
  59. package/src/lib/distribution.js.map +1 -0
  60. package/src/lib/distribution.mjs +152 -0
  61. package/src/lib/distribution.mjs.map +1 -0
  62. package/src/lib/duration.d.mts +18 -0
  63. package/src/lib/duration.d.ts +18 -0
  64. package/src/lib/duration.js +137 -0
  65. package/src/lib/duration.js.map +1 -0
  66. package/src/lib/duration.mjs +128 -0
  67. package/src/lib/duration.mjs.map +1 -0
  68. package/src/lib/embed.d.mts +3 -0
  69. package/src/lib/embed.d.ts +3 -0
  70. package/src/lib/embed.js +97 -0
  71. package/src/lib/embed.js.map +1 -0
  72. package/src/lib/embed.mjs +92 -0
  73. package/src/lib/embed.mjs.map +1 -0
  74. package/src/lib/extras.js +6 -0
  75. package/src/lib/extras.js.map +1 -1
  76. package/src/lib/extras.mjs +6 -0
  77. package/src/lib/extras.mjs.map +1 -1
  78. package/src/lib/files.d.mts +11 -0
  79. package/src/lib/files.d.ts +11 -0
  80. package/src/lib/files.js +19 -0
  81. package/src/lib/files.js.map +1 -1
  82. package/src/lib/files.mjs +18 -0
  83. package/src/lib/files.mjs.map +1 -1
  84. package/src/lib/kind-parts.d.mts +4 -3
  85. package/src/lib/kind-parts.d.ts +4 -3
  86. package/src/lib/kind-parts.js +5 -3
  87. package/src/lib/kind-parts.js.map +1 -1
  88. package/src/lib/kind-parts.mjs +5 -3
  89. package/src/lib/kind-parts.mjs.map +1 -1
  90. package/src/lib/labels.d.mts +37 -0
  91. package/src/lib/labels.d.ts +37 -0
  92. package/src/lib/labels.js +28 -0
  93. package/src/lib/labels.js.map +1 -1
  94. package/src/lib/labels.mjs +28 -0
  95. package/src/lib/labels.mjs.map +1 -1
  96. package/src/lib/lines.d.mts +12 -2
  97. package/src/lib/lines.d.ts +12 -2
  98. package/src/lib/lines.js +251 -15
  99. package/src/lib/lines.js.map +1 -1
  100. package/src/lib/lines.mjs +250 -16
  101. package/src/lib/lines.mjs.map +1 -1
  102. package/src/lib/links-table.d.mts +11 -0
  103. package/src/lib/links-table.d.ts +11 -0
  104. package/src/lib/links-table.js +116 -0
  105. package/src/lib/links-table.js.map +1 -0
  106. package/src/lib/links-table.mjs +112 -0
  107. package/src/lib/links-table.mjs.map +1 -0
  108. package/src/lib/locales/ar.js +28 -0
  109. package/src/lib/locales/ar.js.map +1 -1
  110. package/src/lib/locales/ar.mjs +28 -0
  111. package/src/lib/locales/ar.mjs.map +1 -1
  112. package/src/lib/locales/de.js +28 -0
  113. package/src/lib/locales/de.js.map +1 -1
  114. package/src/lib/locales/de.mjs +28 -0
  115. package/src/lib/locales/de.mjs.map +1 -1
  116. package/src/lib/locales/fr.js +28 -0
  117. package/src/lib/locales/fr.js.map +1 -1
  118. package/src/lib/locales/fr.mjs +28 -0
  119. package/src/lib/locales/fr.mjs.map +1 -1
  120. package/src/lib/payments.d.mts +2 -0
  121. package/src/lib/payments.d.ts +2 -0
  122. package/src/lib/payments.js +94 -0
  123. package/src/lib/payments.js.map +1 -0
  124. package/src/lib/payments.mjs +90 -0
  125. package/src/lib/payments.mjs.map +1 -0
  126. package/src/lib/popup.d.mts +11 -0
  127. package/src/lib/popup.d.ts +11 -0
  128. package/src/lib/popup.js +48 -0
  129. package/src/lib/popup.js.map +1 -0
  130. package/src/lib/popup.mjs +45 -0
  131. package/src/lib/popup.mjs.map +1 -0
  132. package/src/lib/priority.d.mts +10 -0
  133. package/src/lib/priority.d.ts +10 -0
  134. package/src/lib/priority.js +59 -0
  135. package/src/lib/priority.js.map +1 -0
  136. package/src/lib/priority.mjs +55 -0
  137. package/src/lib/priority.mjs.map +1 -0
  138. package/src/lib/progress.js +3 -0
  139. package/src/lib/progress.js.map +1 -1
  140. package/src/lib/progress.mjs +3 -0
  141. package/src/lib/progress.mjs.map +1 -1
  142. package/src/lib/properties.js +100 -9
  143. package/src/lib/properties.js.map +1 -1
  144. package/src/lib/properties.mjs +100 -9
  145. package/src/lib/properties.mjs.map +1 -1
  146. package/src/lib/read-text.d.mts +25 -0
  147. package/src/lib/read-text.d.ts +25 -0
  148. package/src/lib/read-text.js +102 -0
  149. package/src/lib/read-text.js.map +1 -0
  150. package/src/lib/read-text.mjs +98 -0
  151. package/src/lib/read-text.mjs.map +1 -0
  152. package/src/lib/relations.d.mts +12 -0
  153. package/src/lib/relations.d.ts +12 -0
  154. package/src/lib/relations.js +99 -8
  155. package/src/lib/relations.js.map +1 -1
  156. package/src/lib/relations.mjs +97 -8
  157. package/src/lib/relations.mjs.map +1 -1
  158. package/src/lib/slider.js +1 -1
  159. package/src/lib/slider.js.map +1 -1
  160. package/src/lib/slider.mjs +1 -1
  161. package/src/lib/slider.mjs.map +1 -1
  162. package/src/lib/state-dot.d.mts +2 -0
  163. package/src/lib/state-dot.d.ts +2 -0
  164. package/src/lib/state-dot.js +107 -0
  165. package/src/lib/state-dot.js.map +1 -0
  166. package/src/lib/state-dot.mjs +103 -0
  167. package/src/lib/state-dot.mjs.map +1 -0
  168. package/src/lib/statusbar.js +151 -14
  169. package/src/lib/statusbar.js.map +1 -1
  170. package/src/lib/statusbar.mjs +151 -14
  171. package/src/lib/statusbar.mjs.map +1 -1
  172. package/src/lib/styles-business.d.mts +8 -0
  173. package/src/lib/styles-business.d.ts +8 -0
  174. package/src/lib/styles-business.js +120 -0
  175. package/src/lib/styles-business.js.map +1 -0
  176. package/src/lib/styles-business.mjs +117 -0
  177. package/src/lib/styles-business.mjs.map +1 -0
  178. package/src/lib/styles-kinds.d.mts +1 -1
  179. package/src/lib/styles-kinds.d.ts +1 -1
  180. package/src/lib/styles-kinds.js +1 -1
  181. package/src/lib/styles-kinds.mjs +1 -1
  182. package/src/lib/styles-sheet.d.mts +6 -0
  183. package/src/lib/styles-sheet.d.ts +6 -0
  184. package/src/lib/styles-sheet.js +123 -0
  185. package/src/lib/styles-sheet.js.map +1 -0
  186. package/src/lib/styles-sheet.mjs +120 -0
  187. package/src/lib/styles-sheet.mjs.map +1 -0
  188. package/src/lib/styles.js +142 -10
  189. package/src/lib/styles.js.map +1 -1
  190. package/src/lib/styles.mjs +142 -10
  191. package/src/lib/styles.mjs.map +1 -1
  192. package/src/lib/tax-totals.d.mts +2 -0
  193. package/src/lib/tax-totals.d.ts +2 -0
  194. package/src/lib/tax-totals.js +92 -0
  195. package/src/lib/tax-totals.js.map +1 -0
  196. package/src/lib/tax-totals.mjs +88 -0
  197. package/src/lib/tax-totals.mjs.map +1 -0
  198. package/src/lib/timer.d.mts +4 -0
  199. package/src/lib/timer.d.ts +4 -0
  200. package/src/lib/timer.js +62 -0
  201. package/src/lib/timer.js.map +1 -0
  202. package/src/lib/timer.mjs +57 -0
  203. package/src/lib/timer.mjs.map +1 -0
  204. package/src/lib/widgets.d.mts +18 -3
  205. package/src/lib/widgets.d.ts +18 -3
  206. package/src/lib/widgets.js +63 -5
  207. package/src/lib/widgets.js.map +1 -1
  208. package/src/lib/widgets.mjs +63 -5
  209. package/src/lib/widgets.mjs.map +1 -1
  210. package/src/lib/yes-no.js +1 -1
  211. package/src/lib/yes-no.js.map +1 -1
  212. package/src/lib/yes-no.mjs +1 -1
  213. package/src/lib/yes-no.mjs.map +1 -1
@@ -0,0 +1,120 @@
1
+ /**
2
+ * How a record sheet reads, as Flectra draws one: read-only values as words.
3
+ * Appended to Fieldia's stylesheet, scoped and written with logical
4
+ * properties as the rest of it is.
5
+ */
6
+ export const SHEET_CSS = /* css */ `
7
+ /* ---- a sheet's reading ----------------------------------------------------- */
8
+ /* A read-only value as its words: on the line a box's words would sit on, wrapped rather than cut at the box's edge. */
9
+ .fd-read-text {
10
+ min-width: 0; min-height: var(--fd-control-height, 30px); padding-block: calc(var(--fd-pad-y) + 1px);
11
+ white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.45; color: var(--fd-text);
12
+ }
13
+ .fd-field:is([data-type="integer"], [data-type="float"], [data-type="monetary"]) > .fd-read-text { font-variant-numeric: tabular-nums; }
14
+ /* A record's words read their own way — English on a page read right to left keeps its order — lined up with the page. */
15
+ .fd-read-text { unicode-bidi: plaintext; text-align: left; }
16
+ [dir="rtl"] .fd-read-text { text-align: right; }
17
+ .fd-read-text a, .fd-read-link { color: var(--fd-accent); text-decoration: none; }
18
+ .fd-read-link { border: none; background: none; padding: 0; font: inherit; cursor: pointer; text-align: start; }
19
+ .fd-read-text a:hover, .fd-read-link:hover { text-decoration: underline; }
20
+ .fd-read-link:focus-visible, .fd-read-text a:focus-visible { outline: 2px solid var(--fd-focus); outline-offset: 2px; border-radius: 2px; }
21
+ /* A choice as a coloured pill, as wide as its words, on the line a box's words sit on. */
22
+ .fd-field > .fd-value-badge { justify-self: start; align-self: start; width: fit-content; margin-block: calc((var(--fd-control-height, 30px) - 24px) / 2); }
23
+ .fd-title > .fd-field > .fd-read-text { font-size: 24px; font-weight: 600; line-height: 1.25; }
24
+ /* A ribbon with words to point at takes the pointer, though its frame lets clicks through. */
25
+ .fd-ribbon[title] { pointer-events: auto; cursor: help; }
26
+ /* A field's value inside an alert's or a text's words, set apart by its weight. */
27
+ .fd-value { font-weight: 600; }
28
+ /* An alert's own buttons, after its words: links in the alert's colour, wrapping under the words on a narrow screen. */
29
+ .fd-alert:has(> .fd-alert-actions) { flex-wrap: wrap; align-items: baseline; }
30
+ .fd-alert-actions { display: inline-flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
31
+ .fd-alert-actions .fd-button { min-height: 0; padding-block: 0; font-size: inherit; }
32
+ .fd-alert-actions .fd-button-link { color: inherit; padding-inline: 0; text-decoration: underline; text-underline-offset: 2px; font-weight: 600; }
33
+ /* An alert among a page's parts, as Flectra's in a tab: across its row. */
34
+ .fd-text-alert { grid-column: 1 / -1; margin: 0; }
35
+ /* The first alert on a card clears the ribbon in its corner, when no stat buttons stand between them. */
36
+ .fd-card:has(> .fd-ribbon-frame > .fd-ribbon:not([hidden])) > :is(.fd-ribbon-frame + .fd-alert, .fd-ribbon-frame + .fd-stats[hidden] + .fd-alert) { margin-inline-end: 72px; }
37
+ /* A stat button with two values, each after its words, one over the other: "In: 3", "Out: 5". */
38
+ .fd-stat-pair { gap: 1px; }
39
+ .fd-stat-row { display: inline-flex; align-items: baseline; gap: 5px; }
40
+ .fd-stat-row > .fd-stat-label::after { content: ":"; }
41
+ .fd-stat-pair .fd-stat-value { font-size: 13.5px; }
42
+ /* On a phone, stat buttons two to a row, edged between them, clear of a ribbon in the corner. */
43
+ @container (max-width: 520px) {
44
+ .fd-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
45
+ .fd-stat { min-width: 0; padding-inline: 12px; text-align: start; column-gap: 8px; }
46
+ .fd-stat:has(> .fd-icon) { column-gap: 8px; }
47
+ .fd-stat-value { font-size: 14px; }
48
+ .fd-stat:nth-child(odd of :not([hidden])) { border-inline-start: none; }
49
+ .fd-stat:nth-child(n + 3 of :not([hidden])) { border-block-start: 1px solid var(--fd-border); }
50
+ .fd-card:has(> .fd-ribbon-frame > .fd-ribbon:not([hidden])) .fd-stats { padding-inline-end: 0; }
51
+ .fd-card:has(> .fd-ribbon-frame > .fd-ribbon:not([hidden])) .fd-stat:nth-child(2 of :not([hidden])) { padding-inline-end: 64px; }
52
+ .fd-card:has(> .fd-ribbon-frame > .fd-ribbon:not([hidden])) .fd-stat:nth-child(4 of :not([hidden])) { padding-inline-end: 36px; }
53
+ }
54
+ /* A statusbar's time spent in a step, after its words; its folded stages under More, in a menu fixed to the page so the bar's scrolling never cuts it. */
55
+ .fd-step-time { margin-inline-start: 6px; font-size: 11.5px; font-weight: 400; font-variant-numeric: tabular-nums; }
56
+ .fd-statusbar li.fd-step-more > button { padding-inline: 16px 20px; letter-spacing: 1px; }
57
+ .fd-statusbar li.fd-step-more > .fd-step-menu {
58
+ position: fixed; z-index: 30; display: grid; min-width: 160px; margin: 0; padding: 4px 0; clip-path: none; transform: none;
59
+ background: var(--fd-surface); color: var(--fd-text); border: 1px solid var(--fd-border); border-radius: max(var(--fd-control-radius), 4px);
60
+ box-shadow: 0 8px 24px rgba(15, 20, 25, 0.12); white-space: nowrap;
61
+ }
62
+ .fd-statusbar li.fd-step-more > .fd-step-menu[hidden] { display: none; }
63
+ .fd-statusbar .fd-step-menu > button {
64
+ font: inherit; font-size: 13px; text-align: start; border: none; background: none; color: inherit; padding: 6px 14px; cursor: pointer; transform: none;
65
+ }
66
+ .fd-statusbar .fd-step-menu > button:hover:not(:disabled), .fd-statusbar .fd-step-menu > button:focus-visible { background: var(--fd-accent-soft); outline: none; }
67
+ .fd-statusbar .fd-step-menu > button:disabled { cursor: default; color: var(--fd-muted); }
68
+ /* A button's key, shown on it while Alt is held, as Flectra shows its hotkeys. */
69
+ .fd-hotkey { display: none; }
70
+ [data-hotkeys] .fd-hotkey {
71
+ display: inline-block; margin-inline-start: 6px; padding: 0 4px; border: 1px solid currentColor; border-radius: 3px;
72
+ font: 600 10.5px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace; opacity: 0.85; vertical-align: 1px;
73
+ }
74
+ /* A link's picture, or its initials, in a circle before its name; lines of the record — an address — under the link. */
75
+ .fd-link-avatar {
76
+ flex: none; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; overflow: hidden;
77
+ background: var(--fd-accent-soft); color: var(--fd-accent); font-size: 10px; font-weight: 700; line-height: 1; vertical-align: middle;
78
+ }
79
+ .fd-link-avatar img { width: 100%; height: 100%; object-fit: cover; }
80
+ .fd-combo[data-avatar] > .fd-link-avatar { position: absolute; inset-inline-start: 4px; pointer-events: none; }
81
+ .fd-combo[data-avatar] > .fd-link-avatar[hidden] ~ .fd-combo-input { padding-inline-start: var(--fd-pad-x); }
82
+ .fd-combo[data-avatar] > .fd-link-avatar:not([hidden]) ~ .fd-combo-input { padding-inline-start: 32px; }
83
+ .fd-form[data-fd-skin="underline"] .fd-combo[data-avatar] > .fd-link-avatar { inset-inline-start: 0; }
84
+ .fd-form[data-fd-skin="underline"] .fd-combo[data-avatar] > .fd-link-avatar:not([hidden]) ~ .fd-combo-input { padding-inline-start: 28px; }
85
+ .fd-read-text > .fd-link-avatar { margin-inline-end: 6px; }
86
+ .fd-chip > .fd-link-avatar { width: 18px; height: 18px; font-size: 9px; margin-inline: -4px 2px; }
87
+ .fd-link { display: grid; gap: 2px; min-width: 0; }
88
+ .fd-link-details { font-size: 12.5px; line-height: 1.4; color: var(--fd-muted); text-align: left; }
89
+ [dir="rtl"] .fd-link-details { text-align: right; }
90
+ .fd-link-details > div { unicode-bidi: plaintext; }
91
+ /* Tags in their record's colour, as Flectra numbers them, soft enough to read in either scheme. */
92
+ .fd-chip[data-color] { background: color-mix(in srgb, var(--fd-tag) 18%, var(--fd-surface)); border-color: color-mix(in srgb, var(--fd-tag) 55%, var(--fd-surface)); }
93
+ .fd-chip[data-color="1"] { --fd-tag: #f06050; } .fd-chip[data-color="2"] { --fd-tag: #f4a460; } .fd-chip[data-color="3"] { --fd-tag: #f7cd1f; }
94
+ .fd-chip[data-color="4"] { --fd-tag: #6cc1ed; } .fd-chip[data-color="5"] { --fd-tag: #814968; } .fd-chip[data-color="6"] { --fd-tag: #eb7e7f; }
95
+ .fd-chip[data-color="7"] { --fd-tag: #2c8397; } .fd-chip[data-color="8"] { --fd-tag: #475577; } .fd-chip[data-color="9"] { --fd-tag: #d6145f; }
96
+ .fd-chip[data-color="10"] { --fd-tag: #30c381; } .fd-chip[data-color="11"] { --fd-tag: #9365b8; }
97
+ /* A line of parts, as Flectra's o_row: its title the line's label, its parts each as wide as they need, words and buttons among them. */
98
+ .fd-oneline-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; min-width: 0; min-height: var(--fd-control-height, 30px); }
99
+ .fd-form .fd-oneline-row > .fd-field { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; flex: 0 1 auto; width: auto; min-width: 0; grid-template-columns: none; }
100
+ .fd-form .fd-oneline-row > .fd-field > * { grid-column: auto !important; }
101
+ .fd-oneline-row > .fd-field:not([data-labels="beside"]):not([data-labels="above"]) > .fd-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
102
+ .fd-oneline-row > .fd-field > :is(.fd-error, .fd-warning) { flex-basis: 100%; }
103
+ .fd-oneline-row .fd-input { width: 12em; max-width: 100%; }
104
+ /* On a narrow screen each part gives way to the row's width rather than run past it. */
105
+ .fd-form .fd-oneline-row > .fd-field { max-width: 100%; }
106
+ .fd-oneline-row > .fd-field > * { max-width: 100%; min-width: 0; }
107
+ .fd-oneline-row > .fd-field:is([data-type="many2one"], [data-type="reference"]) .fd-input { width: 15em; }
108
+ .fd-oneline-row > .fd-field:is([data-type="integer"], [data-type="float"]) .fd-input { width: 7em; }
109
+ .fd-oneline-row > .fd-field[data-type="monetary"] .fd-input { width: 8.5em; }
110
+ .fd-oneline-row > .fd-field:is([data-type="date"], [data-type="datetime"]) .fd-input { width: 9.5em; }
111
+ .fd-form .fd-oneline-words { margin: 0; padding: 0; border: 0; background: none; color: var(--fd-text); }
112
+ .fd-form .fd-oneline-words.fd-text-note { color: var(--fd-muted); font-size: 12.5px; }
113
+ /* A line with no title of its own takes the whole row, its fields' labels beside them where they ask. */
114
+ .fd-form .fd-oneline:not(:has(> .fd-label)) > .fd-oneline-row { grid-column: 1 / -1 !important; }
115
+ .fd-oneline-row > .fd-button-link { padding-inline: 0; min-height: 0; }
116
+ .fd-oneline-row > .fd-field > .fd-read-text { min-height: 0; padding-block: 0; }
117
+ /* Words over a sheet's title, as Flectra's label over its h1. */
118
+ .fd-title-label { font-size: 12.5px; font-weight: 600; color: var(--fd-muted); }
119
+ `;
120
+ //# sourceMappingURL=styles-sheet.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles-sheet.mjs","sourceRoot":"","sources":["../../../../../libs/widgets/src/lib/styles-sheet.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,SAAS,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiHlC,CAAC"}
package/src/lib/styles.js CHANGED
@@ -6,6 +6,8 @@ const styles_kinds_1 = require("./styles-kinds");
6
6
  const styles_choices_1 = require("./styles-choices");
7
7
  const styles_inputs_1 = require("./styles-inputs");
8
8
  const styles_parts_1 = require("./styles-parts");
9
+ const styles_sheet_1 = require("./styles-sheet");
10
+ const styles_business_1 = require("./styles-business");
9
11
  /**
10
12
  * Fieldia's stylesheet: two skins and the layout chrome, all scoped to the
11
13
  * form's own root (`.fd-form[data-fd-skin=…]`), so two forms on one page can
@@ -123,6 +125,9 @@ const SKINS_CSS = /* css */ `
123
125
  align-items: start;
124
126
  }
125
127
  .fd-grid > * { grid-column: span min(var(--fd-span, 1), var(--fd-cols)); }
128
+ /* Twelfths keep the page's gap while it takes under half their width, so they line up with the columns
129
+ round them; in a narrow column it shrinks with them instead of pushing past its edge. */
130
+ .fd-grid[data-twelfths] { column-gap: min(var(--fd-gap-x), 100% / 24); }
126
131
  .fd-field { display: grid; gap: 4px; min-width: 0; }
127
132
  .fd-label { font-weight: var(--fd-label-weight); color: var(--fd-text); }
128
133
  /* The ✓ of a field filled in right, by its label. */
@@ -131,6 +136,12 @@ const SKINS_CSS = /* css */ `
131
136
  .fd-form[data-fd-skin="outlined"] .fd-field.fd-required > .fd-label::after { content: ""; }
132
137
  .fd-form[data-fd-skin="outlined"] .fd-field.fd-required > .fd-label::before { content: "* "; color: var(--fd-error); }
133
138
  .fd-help { color: var(--fd-muted); font-size: 12.5px; }
139
+ /* A field's help behind a (?) by its label: a bubble on hover, focus or a tap. */
140
+ .fd-help-tip-wrap { position: relative; display: inline-flex; vertical-align: 0.05em; margin-inline-start: 6px; }
141
+ .fd-help-tip { all: unset; box-sizing: border-box; display: inline-grid; place-items: center; width: 16px; height: 16px; border: 1px solid var(--fd-border); border-radius: 50%; color: var(--fd-muted); font-size: 11px; font-weight: 600; line-height: 1; cursor: help; }
142
+ .fd-help-tip:hover, .fd-help-tip[aria-expanded="true"] { color: var(--fd-accent); border-color: var(--fd-accent); }
143
+ .fd-help-tip:focus-visible { outline: 2px solid var(--fd-focus); outline-offset: 2px; }
144
+ .fd-help-bubble { position: absolute; inset-block-start: calc(100% + 6px); inset-inline-start: -8px; z-index: 30; width: max-content; max-width: min(280px, 70vw); padding: 6px 9px; border-radius: 6px; background: var(--fd-text); color: var(--fd-surface); font-size: 12.5px; font-weight: 400; line-height: 1.4; white-space: normal; box-shadow: 0 6px 18px rgb(0 0 0 / 0.18); }
134
145
  /*
135
146
  * A page's words run the way they are written — a sentence left in English on
136
147
  * an Arabic page keeps its full stop at its end — and line up with the form.
@@ -158,6 +169,18 @@ const SKINS_CSS = /* css */ `
158
169
  .fd-form[data-fd-skin="underline"] .fd-field[data-type="one2many"] { grid-template-columns: minmax(0, 1fr); }
159
170
  .fd-form[data-fd-skin="underline"] .fd-field[data-type="one2many"] > * { grid-column: 1 !important; }
160
171
  .fd-form[data-fd-skin="underline"] .fd-field:where(:not([data-labels])) > :not(.fd-label) { grid-column: 2; }
172
+ /* A row of twelfths led by a field with its label beside — the skin's (data-row="skin") or the page's
173
+ ("beside") — Flectra's o_row: that label sits with the labels round it, the parts share the values' room. */
174
+ .fd-form[data-fd-skin="underline"] .fd-section[data-row="skin"] { --fd-row-label: var(--fd-label-width, 11em); --fd-row-gap: 12px; --fd-row-place: absolute; --fd-row-drop: max(0px, calc((var(--fd-control-height, 30px) - 1.45em) / 2)); }
175
+ .fd-form .fd-section[data-row="beside"] { --fd-row-label: var(--fd-label-width, 140px); --fd-row-gap: 14px; --fd-row-place: absolute; --fd-row-drop: max(0px, calc((var(--fd-control-height, 30px) - 1.45em) / 2)); }
176
+ .fd-form .fd-section[data-row] { padding-inline-start: calc(var(--fd-row-label, 0px) + var(--fd-row-gap, 0px)); }
177
+ .fd-form .fd-section[data-row] > .fd-grid > .fd-field:first-child { grid-template-columns: minmax(0, 1fr); position: relative; }
178
+ .fd-form .fd-section[data-row] > .fd-grid > .fd-field:first-child > :not(.fd-label) { grid-column: 1; }
179
+ .fd-form .fd-section[data-row] > .fd-grid > .fd-field:first-child > .fd-label {
180
+ /* Out of the field's own box, back over the row's room for it — where the row has one. */
181
+ position: var(--fd-row-place, static); inset-inline-start: calc(-1 * (var(--fd-row-label, 0px) + var(--fd-row-gap, 0px))); inset-block-start: 0;
182
+ width: var(--fd-row-label, auto); padding-block-start: var(--fd-row-drop, 0px);
183
+ }
161
184
  /* A label beside every value needs room twice over: the underline skin stacks its columns sooner. */
162
185
  @container (max-width: 760px) {
163
186
  .fd-form[data-fd-skin="underline"] .fd-grid { --fd-cols: 1; }
@@ -169,6 +192,9 @@ const SKINS_CSS = /* css */ `
169
192
  }
170
193
  @container (max-width: 520px) {
171
194
  .fd-grid { --fd-cols: 1; }
195
+ /* Labels go above here: a row's first one too, the parts stacked under it. */
196
+ .fd-form .fd-section.fd-section[data-row] { --fd-row-label: auto; --fd-row-gap: 0px; --fd-row-place: static; --fd-row-drop: 0px; }
197
+ .fd-form .fd-section[data-row] { padding-inline-start: 0; }
172
198
  .fd-form[data-fd-skin="underline"] .fd-field:where(:not([data-labels])) { grid-template-columns: minmax(0, 1fr); }
173
199
  .fd-form[data-fd-skin="underline"] .fd-field:where(:not([data-labels])) > * { grid-column: 1 !important; }
174
200
  /* The narrow count, or one column when only the medium one was given. */
@@ -203,6 +229,9 @@ const SKINS_CSS = /* css */ `
203
229
  /* A whole form locked reads as a record: plain values in either skin, no boxes, and no prompts to type. */
204
230
  .fd-form[data-readonly] .fd-input[readonly] { background: transparent; border-color: transparent; padding-inline: 0; color: var(--fd-text); }
205
231
  .fd-form[data-readonly] .fd-input::placeholder { color: transparent; }
232
+ /* Nothing to read in a read-only box draws nothing, in either skin: no prompt to type, and no date's dd.mm.yyyy or its calendar. */
233
+ .fd-input[readonly]::placeholder, .fd-form .fd-input.fd-blank[readonly] { color: transparent; }
234
+ .fd-blank[readonly]::-webkit-calendar-picker-indicator { display: none; }
206
235
  .fd-form[data-readonly] select.fd-input:disabled { appearance: none; background: transparent; border-color: transparent; padding-inline: 0; color: var(--fd-text); opacity: 1; }
207
236
  .fd-input[aria-invalid="true"] { border-color: var(--fd-error); }
208
237
  .fd-form[data-fd-skin="outlined"] .fd-input[aria-invalid="true"]:focus { box-shadow: 0 0 0 2px rgba(255, 38, 5, 0.06); }
@@ -313,10 +342,66 @@ button.fd-chip-label:hover { text-decoration: underline; }
313
342
  .fd-lines-table td > .fd-checkbox, .fd-lines-table td > .fd-switch { margin-block-start: 6px; }
314
343
  .fd-lines-table .fd-lines-grip { width: 1px; min-width: 0; padding-inline: 6px 2px; }
315
344
  .fd-line-grip { display: block; margin-block-start: 7px; cursor: grab; }
316
- .fd-line-delete { border: none; background: none; cursor: pointer; color: var(--fd-muted); font-size: 16px; line-height: 1; padding: 4px 6px; border-radius: 4px; }
345
+ .fd-line-delete { border: none; background: none; cursor: pointer; color: var(--fd-muted); font-size: 16px; line-height: 1; padding: 4px 6px; border-radius: 4px; min-width: 24px; min-height: 24px; }
317
346
  .fd-line-delete:hover { color: var(--fd-error); background: var(--fd-error-soft); }
347
+ /* A table's own rules: a line's or a cell's tone and bold (Flectra's decoration-*), and buttons on a line. */
348
+ .fd-lines-table [data-tone="info"] { --fd-line-tone: var(--fd-info); --fd-tone: var(--fd-info); --fd-tone-soft: var(--fd-info-soft); }
349
+ .fd-lines-table [data-tone="success"] { --fd-line-tone: var(--fd-success); --fd-tone: var(--fd-success); --fd-tone-soft: var(--fd-success-soft); }
350
+ .fd-lines-table [data-tone="warning"] { --fd-line-tone: var(--fd-warning); --fd-tone: var(--fd-warning); --fd-tone-soft: var(--fd-warning-soft); }
351
+ .fd-lines-table [data-tone="danger"] { --fd-line-tone: var(--fd-error); --fd-tone: var(--fd-error); --fd-tone-soft: var(--fd-error-soft); }
352
+ .fd-lines-table [data-tone="muted"] { --fd-line-tone: var(--fd-muted); --fd-tone: var(--fd-muted); --fd-tone-soft: color-mix(in srgb, var(--fd-muted) 14%, transparent); }
353
+ .fd-lines-table [data-tone] :is(input, select, textarea, .fd-input, .fd-display) { color: var(--fd-line-tone); -webkit-text-fill-color: var(--fd-line-tone); }
354
+ .fd-lines-table :is(.fd-line-bold, .fd-cell-bold) :is(input, select, textarea, .fd-input, .fd-display) { font-weight: 600; }
355
+ .fd-lines-table td.fd-lines-tools { white-space: nowrap; }
356
+ /* With buttons on some lines, every line's × keeps to the end, so they line up. */
357
+ .fd-lines-table:has(.fd-line-button) td.fd-lines-tools { text-align: end; padding-inline-end: 4px; }
358
+ .fd-line-button { padding: 2px 6px; font-size: 12.5px; vertical-align: middle; }
359
+ .fd-line-button-icon { padding: 4px; color: var(--fd-muted); }
360
+ .fd-line-button-icon:hover { color: var(--fd-accent); }
361
+ .fd-line-button svg { width: 15px; height: 15px; display: block; }
318
362
  .fd-lines-totals td { padding: 8px; font-weight: 600; border-block-start: 1px solid var(--fd-border); font-variant-numeric: tabular-nums; }
319
363
  .fd-lines-adds { display: flex; flex-wrap: wrap; gap: 4px 16px; justify-self: start; }
364
+ .fd-lines-control { display: inline-flex; align-items: center; gap: 6px; }
365
+ .fd-lines-control svg, .fd-lines-chosen-button svg { width: 15px; height: 15px; }
366
+ /* Lines chosen for the table's buttons: a tick before each line's grip, and a bar of buttons over the table. */
367
+ .fd-line-lead { display: inline-flex; align-items: center; gap: 4px; margin-block-start: 6px; }
368
+ .fd-line-lead .fd-line-grip { margin-block-start: 0; }
369
+ .fd-lines-table th.fd-lines-grip:has(.fd-line-pick-all) { padding-block: 4px; }
370
+ .fd-lines-chosen { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 6px 10px; border-radius: var(--fd-radius); background: var(--fd-accent-soft); }
371
+ .fd-lines-chosen[hidden] { display: none; }
372
+ .fd-lines-chosen-count { font-weight: 600; font-size: 13px; margin-inline-end: 6px; }
373
+ .fd-lines-chosen-button { display: inline-flex; align-items: center; gap: 6px; padding-block: 3px; }
374
+ /* A line opened in a dialog: its own record's page, or its every field. */
375
+ .fd-lines-table .fd-line-open { border: none; background: none; cursor: pointer; color: var(--fd-accent); font-size: 14px; line-height: 1; padding: 4px 6px; border-radius: 4px; }
376
+ .fd-lines-table .fd-line-open:hover { background: var(--fd-accent-soft); }
377
+ .fd-links-table td { vertical-align: middle; }
378
+ .fd-links-table .fd-value-text { padding-block: 4px; }
379
+ /* Columns as wide as they hold (fit: content), the widest taking what is left. */
380
+ .fd-lines[data-fit="content"] .fd-lines-table { width: auto; max-width: 100%; }
381
+ .fd-lines[data-fit="content"] .fd-lines-table td { min-width: 0; }
382
+ /* Lines as cards (cards: narrow on a phone, or always): each a box, every cell its column's label above its value. */
383
+ .fd-lines[data-cards] { container: fd-lines / inline-size; }
384
+ @container fd-lines (max-width: 520px) {
385
+ .fd-lines[data-cards="narrow"] .fd-lines-table, .fd-lines[data-cards="narrow"] .fd-lines-table :is(tbody, tfoot) { display: block; }
386
+ .fd-lines[data-cards="narrow"] .fd-lines-table thead { display: none; }
387
+ .fd-lines[data-cards="narrow"] .fd-lines-table tr { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; position: relative; padding: 10px 12px; margin-block-end: 8px; border: 1px solid var(--fd-border); border-radius: var(--fd-radius); background: var(--fd-surface); }
388
+ .fd-lines[data-cards="narrow"] .fd-lines-table td { display: block; border: none; padding: 0; min-width: 0; }
389
+ .fd-lines[data-cards="narrow"] .fd-lines-table td[data-label]:not([colspan]:not([colspan="1"]))::before { content: attr(data-label); display: block; font-size: 12px; font-weight: 600; color: var(--fd-muted); }
390
+ .fd-lines[data-cards="narrow"] .fd-lines-table td.fd-lines-grip { position: absolute; inset-block-start: 6px; inset-inline-start: 6px; padding: 0; }
391
+ .fd-lines[data-cards="narrow"] .fd-lines-table td.fd-lines-grip .fd-line-grip { display: none; }
392
+ .fd-lines[data-cards="narrow"] .fd-lines-table tr:has(.fd-line-pick) { padding-inline-start: 36px; }
393
+ .fd-lines[data-cards="narrow"] .fd-lines-table td.fd-lines-tools { width: auto; text-align: end; }
394
+ .fd-lines[data-cards="narrow"] .fd-lines-totals td:empty { display: none; }
395
+ }
396
+ .fd-lines[data-cards="always"] .fd-lines-table, .fd-lines[data-cards="always"] .fd-lines-table :is(tbody, tfoot) { display: block; }
397
+ .fd-lines[data-cards="always"] .fd-lines-table thead { display: none; }
398
+ .fd-lines[data-cards="always"] .fd-lines-table tr { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 6px 12px; position: relative; padding: 10px 12px; margin-block-end: 8px; border: 1px solid var(--fd-border); border-radius: var(--fd-radius); background: var(--fd-surface); }
399
+ .fd-lines[data-cards="always"] .fd-lines-table td { display: block; border: none; padding: 0; min-width: 0; }
400
+ .fd-lines[data-cards="always"] .fd-lines-table td[data-label]:not([colspan]:not([colspan="1"]))::before { content: attr(data-label); display: block; font-size: 12px; font-weight: 600; color: var(--fd-muted); }
401
+ .fd-lines[data-cards="always"] .fd-lines-table td.fd-lines-grip, .fd-lines[data-cards="always"] .fd-lines-table td.fd-lines-tools { grid-column: 1 / -1; width: auto; }
402
+ .fd-lines[data-cards="always"] .fd-lines-table td.fd-lines-tools { text-align: end; }
403
+ .fd-line-copy { border: none; background: none; cursor: pointer; color: var(--fd-muted); font-size: 15px; line-height: 1; padding: 4px 6px; border-radius: 4px; }
404
+ .fd-line-copy:hover { color: var(--fd-accent); background: var(--fd-accent-soft); }
320
405
  /* A section heads the lines below it; a note reads as a remark between them. */
321
406
  .fd-line-section td { background: var(--fd-page); }
322
407
  .fd-line-section .fd-input { font-weight: 600; }
@@ -433,6 +518,7 @@ button.fd-chip-label:hover { text-decoration: underline; }
433
518
  .fd-richtext-tool svg circle { fill: currentColor; stroke: none; }
434
519
  .fd-link-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 6px; border: 1px solid var(--fd-border); border-block-end: none; background: var(--fd-surface); }
435
520
  .fd-link-row > .fd-input { flex: 1 1 200px; min-width: 0; }
521
+ .fd-richtext.fd-blank[contenteditable="true"]::before { content: attr(data-placeholder); position: absolute; color: var(--fd-muted); opacity: 0.8; pointer-events: none; }
436
522
  .fd-richtext[contenteditable="false"] { background: transparent; border-color: transparent; padding-inline: 0; min-height: 0; }
437
523
  .fd-richtext p { margin: 0 0 6px; }
438
524
  .fd-code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 12.5px; min-height: 96px; }
@@ -465,12 +551,35 @@ button.fd-chip-label:hover { text-decoration: underline; }
465
551
  /* A saved form placed in another: a quiet line while its page comes, and words in a dashed box when it cannot be shown. */
466
552
  .fd-form-part-note { margin: 0; color: var(--fd-muted); font-size: 13px; }
467
553
  .fd-form-part-problem { padding: 10px 12px; border: 1px dashed var(--fd-border); border-radius: var(--fd-radius); }
468
- .fd-tablist { display: flex; gap: 2px; border-block-end: 1px solid var(--fd-border); overflow-x: auto; }
554
+ .fd-tablist { display: flex; gap: 2px; border-block-end: 1px solid var(--fd-border); overflow-x: auto; scrollbar-width: none; }
555
+ .fd-tablist::-webkit-scrollbar { display: none; }
556
+ /* Too long for its room: the tabs fade out at an edge with more past it, under a button that scrolls them along. */
557
+ .fd-tabbar { position: relative; min-width: 0; --fd-fade: to right; }
558
+ [dir="rtl"] .fd-tabbar { --fd-fade: to left; }
559
+ /* Nothing shows under a button (28px); the tabs fade in over the next 36. */
560
+ .fd-tabbar[data-more="start"] > .fd-tablist { mask-image: linear-gradient(var(--fd-fade), transparent 28px, #000 64px); }
561
+ .fd-tabbar[data-more="end"] > .fd-tablist { mask-image: linear-gradient(var(--fd-fade), #000 calc(100% - 64px), transparent calc(100% - 28px)); }
562
+ .fd-tabbar[data-more="start end"] > .fd-tablist { mask-image: linear-gradient(var(--fd-fade), transparent 28px, #000 64px, #000 calc(100% - 64px), transparent calc(100% - 28px)); }
563
+ .fd-tabs-scroll {
564
+ position: absolute; inset-block: 0 1px; z-index: 1; width: 28px; padding: 0; border: none; background: none; cursor: pointer;
565
+ color: var(--fd-muted); display: grid; place-items: center;
566
+ }
567
+ .fd-tabs-scroll[hidden] { display: none; }
568
+ .fd-tabs-scroll:hover { color: var(--fd-accent); }
569
+ .fd-tabs-scroll::before { content: ""; width: 7px; height: 7px; border: solid currentColor; border-width: 0 0 2px 2px; }
570
+ .fd-tabs-before { inset-inline-start: 0; }
571
+ .fd-tabs-after { inset-inline-end: 0; }
572
+ .fd-tabs-before::before { transform: translateX(2px) rotate(45deg); }
573
+ .fd-tabs-after::before { transform: translateX(-2px) rotate(-135deg); }
574
+ [dir="rtl"] .fd-tabs-before::before { transform: translateX(-2px) rotate(-135deg); }
575
+ [dir="rtl"] .fd-tabs-after::before { transform: translateX(2px) rotate(45deg); }
469
576
  .fd-tab {
470
577
  font: inherit; background: none; border: none; cursor: pointer; padding: 8px 14px; color: var(--fd-muted);
471
578
  border-block-end: 2px solid transparent; margin-block-end: -1px; white-space: nowrap;
472
579
  }
473
580
  .fd-tab[aria-selected="true"] { color: var(--fd-accent); border-block-end-color: var(--fd-accent); font-weight: 600; }
581
+ /* A tab with a problem in it, seen or not: a dot in the error colour after its words. */
582
+ .fd-tab[data-problem]::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-inline-start: 6px; border-radius: 50%; background: var(--fd-error); vertical-align: 0.15em; }
474
583
  .fd-tabpanel { padding-block: 16px; display: grid; gap: 16px; }
475
584
 
476
585
  /* ---- buttons ---------------------------------------------------------- */
@@ -518,6 +627,11 @@ button.fd-chip-label:hover { text-decoration: underline; }
518
627
  .fd-sheet-layout.fd-has-side { grid-template-columns: minmax(0, 1fr) minmax(260px, 360px); }
519
628
  /* The side panel goes under the sheet before the sheet is left too narrow for a label beside its value. */
520
629
  @container (max-width: 1000px) { .fd-sheet-layout.fd-has-side { grid-template-columns: minmax(0, 1fr); } }
630
+ /* A part hidden at some widths of the form (hideOn): narrow up to 520px, medium up to 760px, wide above — the form's own width, as its columns. */
631
+ .fd-form { container-name: fd-form; }
632
+ @container fd-form (max-width: 520px) { .fd-form [data-hide-on~="narrow"] { display: none !important; } }
633
+ @container fd-form (min-width: 521px) and (max-width: 760px) { .fd-form [data-hide-on~="medium"] { display: none !important; } }
634
+ @container fd-form (min-width: 761px) { .fd-form [data-hide-on~="wide"] { display: none !important; } }
521
635
  .fd-card {
522
636
  position: relative; background: var(--fd-surface); border: 1px solid var(--fd-border);
523
637
  border-radius: var(--fd-radius); padding: 24px 28px 28px; display: grid; gap: 18px; min-width: 0;
@@ -527,14 +641,15 @@ button.fd-chip-label:hover { text-decoration: underline; }
527
641
  .fd-ribbon-frame { position: absolute; inset: 0; overflow: hidden; border-radius: inherit; pointer-events: none; }
528
642
  .fd-ribbon {
529
643
  position: absolute; inset-block-start: 18px; inset-inline-end: -42px; transform: rotate(45deg); width: 160px;
530
- text-align: center; font-size: 12px; font-weight: 700; padding: 4px 0; color: #fff; background: var(--fd-muted);
644
+ text-align: center; font-size: 12px; font-weight: 700; padding: 4px 0; color: #fff; background: #5f6670;
531
645
  text-transform: uppercase; letter-spacing: 0.06em; pointer-events: none;
532
646
  }
533
647
  [dir="rtl"] .fd-ribbon { transform: rotate(-45deg); }
534
- .fd-ribbon.fd-tone-danger { background: var(--fd-error); }
535
- .fd-ribbon.fd-tone-success { background: var(--fd-success); }
536
- .fd-ribbon.fd-tone-warning { background: #d97706; }
537
- .fd-ribbon.fd-tone-info { background: var(--fd-info); }
648
+ /* White words on a ribbon in either scheme: fixed, deep colours, each at least 5:1 against white. */
649
+ .fd-ribbon.fd-tone-danger { background: #c63c3d; }
650
+ .fd-ribbon.fd-tone-success { background: #2e7d32; }
651
+ .fd-ribbon.fd-tone-warning { background: #a14f00; }
652
+ .fd-ribbon.fd-tone-info { background: #1365d9; }
538
653
  .fd-alert { padding: 10px 14px; border-radius: var(--fd-control-radius); border: 1px solid; font-size: 13.5px; display: flex; align-items: flex-start; gap: 10px; }
539
654
  .fd-alert-message { flex: 1 1 auto; min-width: 0; }
540
655
  .fd-alert-close { border: none; background: none; color: inherit; cursor: pointer; font: inherit; font-size: 18px; line-height: 1; padding: 0 4px; border-radius: 4px; opacity: 0.75; }
@@ -601,6 +716,23 @@ button.fd-chip-label:hover { text-decoration: underline; }
601
716
  .fd-progress { display: grid; gap: 8px; }
602
717
  .fd-progress-text { color: var(--fd-muted); font-size: 13px; }
603
718
  .fd-value-text { display: block; padding-block: 6px; font-variant-numeric: tabular-nums; }
719
+ /* A field's own value in a tone while a condition holds, and in bold (Flectra's decoration-* on a field). */
720
+ .fd-field[data-tone="info"] { --fd-tone: var(--fd-info); --fd-tone-soft: var(--fd-info-soft); }
721
+ .fd-field[data-tone="success"] { --fd-tone: var(--fd-success); --fd-tone-soft: var(--fd-success-soft); }
722
+ .fd-field[data-tone="warning"] { --fd-tone: var(--fd-warning); --fd-tone-soft: var(--fd-warning-soft); }
723
+ .fd-field[data-tone="danger"] { --fd-tone: var(--fd-error); --fd-tone-soft: var(--fd-error-soft); }
724
+ .fd-field[data-tone="muted"] { --fd-tone: var(--fd-muted); --fd-tone-soft: color-mix(in srgb, var(--fd-muted) 14%, transparent); }
725
+ .fd-field[data-tone] :is(input, select, textarea, .fd-value-text, .fd-pending) { color: var(--fd-tone); -webkit-text-fill-color: var(--fd-tone); }
726
+ .fd-field.fd-value-bold :is(input, select, textarea, .fd-value-text, .fd-pending, .fd-value-badge) { font-weight: 700; }
727
+ /* A value as a pill (widget badge): grey, or its tone's colour on its soft shade. */
728
+ .fd-value-badge { justify-self: start; align-self: center; display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 2px 10px; border-radius: 999px; font-size: 12.5px; line-height: 18px; font-weight: 500; color: var(--fd-tone, var(--fd-muted)); background: var(--fd-tone-soft, color-mix(in srgb, var(--fd-tone, var(--fd-muted)) 14%, transparent)); }
729
+ .fd-value-badge[hidden] { display: none; }
730
+ /* A value given its own tone by options.tones, over the part's. */
731
+ .fd-value-badge[data-tone="info"] { --fd-tone: var(--fd-info); --fd-tone-soft: var(--fd-info-soft); }
732
+ .fd-value-badge[data-tone="success"] { --fd-tone: var(--fd-success); --fd-tone-soft: var(--fd-success-soft); }
733
+ .fd-value-badge[data-tone="warning"] { --fd-tone: var(--fd-warning); --fd-tone-soft: var(--fd-warning-soft); }
734
+ .fd-value-badge[data-tone="danger"] { --fd-tone: var(--fd-error); --fd-tone-soft: var(--fd-error-soft); }
735
+ .fd-value-badge[data-tone="muted"] { --fd-tone: var(--fd-muted); --fd-tone-soft: color-mix(in srgb, var(--fd-muted) 14%, transparent); }
604
736
  .fd-date-pick { position: relative; display: flex; align-items: center; gap: 6px; min-width: 0; }
605
737
  .fd-date-pick > .fd-input { flex: 1 1 auto; min-width: 0; }
606
738
  .fd-calendar-button {
@@ -736,9 +868,9 @@ button.fd-chip-label:hover { text-decoration: underline; }
736
868
  border: 1px solid var(--fd-edge, transparent);
737
869
  }
738
870
  .fd-dialog p { margin: 0; }
739
- /* Words a step says: toasts at the foot of the screen, one over another, each in its tone; over the page, under a dialog. */
871
+ /* Words a step says: toasts at the foot of the screen, one over another, each in its tone; over the page and over a dialog or panel, whose own words they are too. */
740
872
  .fd-says {
741
- position: fixed; inset-inline: 16px; inset-block-end: max(20px, env(safe-area-inset-bottom, 0px)); z-index: 990;
873
+ position: fixed; inset-inline: 16px; inset-block-end: max(20px, env(safe-area-inset-bottom, 0px)); z-index: 1100;
742
874
  display: grid; justify-items: center; gap: 8px; pointer-events: none;
743
875
  }
744
876
  .fd-say {
@@ -820,7 +952,7 @@ button.fd-chip-label:hover { text-decoration: underline; }
820
952
  @media (prefers-reduced-motion: reduce) { .fd-form *, .fd-form *::before, .fd-form *::after { transition: none !important; } .fd-button[aria-busy="true"]::after { animation: none; } }
821
953
  `;
822
954
  /** Fieldia's whole stylesheet: the skins, then the layout over them, the inputs' details, the question kinds and the choices' details. */
823
- exports.FIELDIA_CSS = SKINS_CSS + layout_styles_1.LAYOUT_CSS + styles_inputs_1.INPUTS_CSS + styles_kinds_1.KINDS_CSS + styles_choices_1.CHOICES_CSS + styles_parts_1.PARTS_CSS;
955
+ exports.FIELDIA_CSS = SKINS_CSS + layout_styles_1.LAYOUT_CSS + styles_inputs_1.INPUTS_CSS + styles_sheet_1.SHEET_CSS + styles_business_1.BUSINESS_CSS + styles_kinds_1.KINDS_CSS + styles_choices_1.CHOICES_CSS + styles_parts_1.PARTS_CSS;
824
956
  const STYLE_ID = 'fieldia-styles';
825
957
  /** Add Fieldia's stylesheet to a document, once. */
826
958
  function installStyles(document) {
@@ -1 +1 @@
1
- {"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../../../libs/widgets/src/lib/styles.ts"],"names":[],"mappings":";;;AA2zBA,sCAMC;AAj0BD,iDAA2C;AAC3C,qDAA+C;AAC/C,mDAA6C;AAC7C,iDAA2C;AAE3C;;;;;;;;;;;;GAYG;AACH,mDAA6C;AAE7C;;;;;GAKG;AACU,QAAA,WAAW,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAW,CAAC;AAEjE,+FAA+F;AAC/F,MAAM,SAAS,GAAG,SAAS,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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