@fieldia/widgets 0.9.1 → 0.10.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 (211) 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 +4 -0
  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/address.d.mts +4 -0
  9. package/src/lib/address.d.ts +4 -0
  10. package/src/lib/address.js +105 -0
  11. package/src/lib/address.js.map +1 -0
  12. package/src/lib/address.mjs +100 -0
  13. package/src/lib/address.mjs.map +1 -0
  14. package/src/lib/cards.d.mts +2 -0
  15. package/src/lib/cards.d.ts +2 -0
  16. package/src/lib/cards.js +152 -0
  17. package/src/lib/cards.js.map +1 -0
  18. package/src/lib/cards.mjs +148 -0
  19. package/src/lib/cards.mjs.map +1 -0
  20. package/src/lib/choice-images.d.mts +2 -0
  21. package/src/lib/choice-images.d.ts +2 -0
  22. package/src/lib/choice-images.js +99 -0
  23. package/src/lib/choice-images.js.map +1 -0
  24. package/src/lib/choice-images.mjs +95 -0
  25. package/src/lib/choice-images.mjs.map +1 -0
  26. package/src/lib/choice-rules.d.mts +22 -0
  27. package/src/lib/choice-rules.d.ts +22 -0
  28. package/src/lib/choice-rules.js +46 -0
  29. package/src/lib/choice-rules.js.map +1 -0
  30. package/src/lib/choice-rules.mjs +41 -0
  31. package/src/lib/choice-rules.mjs.map +1 -0
  32. package/src/lib/choice-tags.d.mts +17 -0
  33. package/src/lib/choice-tags.d.ts +17 -0
  34. package/src/lib/choice-tags.js +187 -0
  35. package/src/lib/choice-tags.js.map +1 -0
  36. package/src/lib/choice-tags.mjs +182 -0
  37. package/src/lib/choice-tags.mjs.map +1 -0
  38. package/src/lib/choices-from.d.mts +8 -0
  39. package/src/lib/choices-from.d.ts +8 -0
  40. package/src/lib/choices-from.js +63 -0
  41. package/src/lib/choices-from.js.map +1 -0
  42. package/src/lib/choices-from.mjs +60 -0
  43. package/src/lib/choices-from.mjs.map +1 -0
  44. package/src/lib/display.js +4 -3
  45. package/src/lib/display.js.map +1 -1
  46. package/src/lib/display.mjs +5 -4
  47. package/src/lib/display.mjs.map +1 -1
  48. package/src/lib/extras.js +8 -4
  49. package/src/lib/extras.js.map +1 -1
  50. package/src/lib/extras.mjs +8 -4
  51. package/src/lib/extras.mjs.map +1 -1
  52. package/src/lib/files.d.mts +2 -0
  53. package/src/lib/files.d.ts +2 -0
  54. package/src/lib/files.js +180 -80
  55. package/src/lib/files.js.map +1 -1
  56. package/src/lib/files.mjs +179 -80
  57. package/src/lib/files.mjs.map +1 -1
  58. package/src/lib/focus-trap.d.mts +7 -0
  59. package/src/lib/focus-trap.d.ts +7 -0
  60. package/src/lib/focus-trap.js +26 -0
  61. package/src/lib/focus-trap.js.map +1 -0
  62. package/src/lib/focus-trap.mjs +23 -0
  63. package/src/lib/focus-trap.mjs.map +1 -0
  64. package/src/lib/icons.js +1 -0
  65. package/src/lib/icons.js.map +1 -1
  66. package/src/lib/icons.mjs +1 -0
  67. package/src/lib/icons.mjs.map +1 -1
  68. package/src/lib/kind-parts.d.mts +56 -0
  69. package/src/lib/kind-parts.d.ts +56 -0
  70. package/src/lib/kind-parts.js +121 -0
  71. package/src/lib/kind-parts.js.map +1 -0
  72. package/src/lib/kind-parts.mjs +107 -0
  73. package/src/lib/kind-parts.mjs.map +1 -0
  74. package/src/lib/labels.d.mts +80 -0
  75. package/src/lib/labels.d.ts +80 -0
  76. package/src/lib/labels.js +107 -189
  77. package/src/lib/labels.js.map +1 -1
  78. package/src/lib/labels.mjs +107 -189
  79. package/src/lib/labels.mjs.map +1 -1
  80. package/src/lib/layout-styles.d.mts +11 -0
  81. package/src/lib/layout-styles.d.ts +11 -0
  82. package/src/lib/layout-styles.js +176 -0
  83. package/src/lib/layout-styles.js.map +1 -0
  84. package/src/lib/layout-styles.mjs +173 -0
  85. package/src/lib/layout-styles.mjs.map +1 -0
  86. package/src/lib/limits.d.mts +20 -0
  87. package/src/lib/limits.d.ts +20 -0
  88. package/src/lib/limits.js +71 -0
  89. package/src/lib/limits.js.map +1 -0
  90. package/src/lib/limits.mjs +66 -0
  91. package/src/lib/limits.mjs.map +1 -0
  92. package/src/lib/line-moves.d.mts +8 -0
  93. package/src/lib/line-moves.d.ts +8 -0
  94. package/src/lib/line-moves.js +20 -0
  95. package/src/lib/line-moves.js.map +1 -0
  96. package/src/lib/line-moves.mjs +17 -0
  97. package/src/lib/line-moves.mjs.map +1 -0
  98. package/src/lib/lines.js +85 -7
  99. package/src/lib/lines.js.map +1 -1
  100. package/src/lib/lines.mjs +86 -8
  101. package/src/lib/lines.mjs.map +1 -1
  102. package/src/lib/locales/all.d.mts +8 -0
  103. package/src/lib/locales/all.d.ts +8 -0
  104. package/src/lib/locales/all.js +13 -0
  105. package/src/lib/locales/all.js.map +1 -0
  106. package/src/lib/locales/all.mjs +10 -0
  107. package/src/lib/locales/all.mjs.map +1 -0
  108. package/src/lib/locales/ar.d.mts +3 -0
  109. package/src/lib/locales/ar.d.ts +3 -0
  110. package/src/lib/locales/ar.js +104 -0
  111. package/src/lib/locales/ar.js.map +1 -0
  112. package/src/lib/locales/ar.mjs +101 -0
  113. package/src/lib/locales/ar.mjs.map +1 -0
  114. package/src/lib/locales/de.d.mts +3 -0
  115. package/src/lib/locales/de.d.ts +3 -0
  116. package/src/lib/locales/de.js +104 -0
  117. package/src/lib/locales/de.js.map +1 -0
  118. package/src/lib/locales/de.mjs +101 -0
  119. package/src/lib/locales/de.mjs.map +1 -0
  120. package/src/lib/locales/fr.d.mts +3 -0
  121. package/src/lib/locales/fr.d.ts +3 -0
  122. package/src/lib/locales/fr.js +104 -0
  123. package/src/lib/locales/fr.js.map +1 -0
  124. package/src/lib/locales/fr.mjs +101 -0
  125. package/src/lib/locales/fr.mjs.map +1 -0
  126. package/src/lib/matrix.d.mts +10 -0
  127. package/src/lib/matrix.d.ts +10 -0
  128. package/src/lib/matrix.js +86 -0
  129. package/src/lib/matrix.js.map +1 -0
  130. package/src/lib/matrix.mjs +82 -0
  131. package/src/lib/matrix.mjs.map +1 -0
  132. package/src/lib/numbers.d.mts +7 -0
  133. package/src/lib/numbers.d.ts +7 -0
  134. package/src/lib/numbers.js +15 -0
  135. package/src/lib/numbers.js.map +1 -1
  136. package/src/lib/numbers.mjs +14 -0
  137. package/src/lib/numbers.mjs.map +1 -1
  138. package/src/lib/progress.js +8 -4
  139. package/src/lib/progress.js.map +1 -1
  140. package/src/lib/progress.mjs +8 -4
  141. package/src/lib/progress.mjs.map +1 -1
  142. package/src/lib/ranking.d.mts +2 -0
  143. package/src/lib/ranking.d.ts +2 -0
  144. package/src/lib/ranking.js +172 -0
  145. package/src/lib/ranking.js.map +1 -0
  146. package/src/lib/ranking.mjs +168 -0
  147. package/src/lib/ranking.mjs.map +1 -0
  148. package/src/lib/relations.d.mts +1 -1
  149. package/src/lib/relations.d.ts +1 -1
  150. package/src/lib/relations.js +43 -18
  151. package/src/lib/relations.js.map +1 -1
  152. package/src/lib/relations.mjs +43 -18
  153. package/src/lib/relations.mjs.map +1 -1
  154. package/src/lib/shuffle.d.mts +7 -0
  155. package/src/lib/shuffle.d.ts +7 -0
  156. package/src/lib/shuffle.js +60 -0
  157. package/src/lib/shuffle.js.map +1 -0
  158. package/src/lib/shuffle.mjs +57 -0
  159. package/src/lib/shuffle.mjs.map +1 -0
  160. package/src/lib/signature.d.mts +2 -0
  161. package/src/lib/signature.d.ts +2 -0
  162. package/src/lib/signature.js +223 -0
  163. package/src/lib/signature.js.map +1 -0
  164. package/src/lib/signature.mjs +219 -0
  165. package/src/lib/signature.mjs.map +1 -0
  166. package/src/lib/slider.d.mts +10 -0
  167. package/src/lib/slider.d.ts +10 -0
  168. package/src/lib/slider.js +57 -0
  169. package/src/lib/slider.js.map +1 -0
  170. package/src/lib/slider.mjs +53 -0
  171. package/src/lib/slider.mjs.map +1 -0
  172. package/src/lib/styles-choices.d.mts +7 -0
  173. package/src/lib/styles-choices.d.ts +7 -0
  174. package/src/lib/styles-choices.js +47 -0
  175. package/src/lib/styles-choices.js.map +1 -0
  176. package/src/lib/styles-choices.mjs +44 -0
  177. package/src/lib/styles-choices.mjs.map +1 -0
  178. package/src/lib/styles-inputs.d.mts +9 -0
  179. package/src/lib/styles-inputs.d.ts +9 -0
  180. package/src/lib/styles-inputs.js +41 -0
  181. package/src/lib/styles-inputs.js.map +1 -0
  182. package/src/lib/styles-inputs.mjs +38 -0
  183. package/src/lib/styles-inputs.mjs.map +1 -0
  184. package/src/lib/styles-kinds.d.mts +7 -0
  185. package/src/lib/styles-kinds.d.ts +7 -0
  186. package/src/lib/styles-kinds.js +119 -0
  187. package/src/lib/styles-kinds.js.map +1 -0
  188. package/src/lib/styles-kinds.mjs +116 -0
  189. package/src/lib/styles-kinds.mjs.map +1 -0
  190. package/src/lib/styles.d.mts +2 -14
  191. package/src/lib/styles.d.ts +2 -14
  192. package/src/lib/styles.js +180 -66
  193. package/src/lib/styles.js.map +1 -1
  194. package/src/lib/styles.mjs +180 -66
  195. package/src/lib/styles.mjs.map +1 -1
  196. package/src/lib/units.d.mts +10 -0
  197. package/src/lib/units.d.ts +10 -0
  198. package/src/lib/units.js +19 -0
  199. package/src/lib/units.js.map +1 -0
  200. package/src/lib/units.mjs +16 -0
  201. package/src/lib/units.mjs.map +1 -0
  202. package/src/lib/widgets.js +215 -57
  203. package/src/lib/widgets.js.map +1 -1
  204. package/src/lib/widgets.mjs +215 -57
  205. package/src/lib/widgets.mjs.map +1 -1
  206. package/src/lib/yes-no.d.mts +9 -0
  207. package/src/lib/yes-no.d.ts +9 -0
  208. package/src/lib/yes-no.js +58 -0
  209. package/src/lib/yes-no.js.map +1 -0
  210. package/src/lib/yes-no.mjs +54 -0
  211. package/src/lib/yes-no.mjs.map +1 -0
@@ -1 +1 @@
1
- {"version":3,"file":"labels.mjs","sourceRoot":"","sources":["../../../../../libs/widgets/src/lib/labels.ts"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,GAAiC,EAAE,EAAE,EAAE,GAAG,SAAS,EAAE,CAAC"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * The layout on top of the skins: arrangements on their grid's columns, how
3
+ * each group is drawn, where labels sit, and the page's own look — accent,
4
+ * font, room, corners, light or dark. The viewer hands these over as
5
+ * attributes and tokens on the form (see `place.ts` and `look.ts` in
6
+ * @fieldia/viewer); this stylesheet comes after the skins, so it wins where it
7
+ * speaks and leaves everything else as the skin draws it.
8
+ *
9
+ * Logical properties throughout, so right to left mirrors on its own.
10
+ */
11
+ export declare const LAYOUT_CSS = "\n/* ---- arrangements: parts side by side or one under another, nothing drawn round them ---- */\n/* On its grid's columns: the grid's own tracks and gaps, so its parts line up with everything above and below. */\n.fd-grid > .fd-section[data-place=\"tracks\"] {\n /* The columns it covers: its span, never more than its grid has at this width. */\n --fd-tracks: min(var(--fd-span, 1), var(--fd-cols));\n grid-template-columns: subgrid;\n column-gap: var(--fd-gap-x);\n}\n.fd-form .fd-section[data-place=\"tracks\"] > .fd-grid { --fd-cols: var(--fd-tracks); grid-column: 1 / -1; grid-template-columns: subgrid; }\n.fd-section[data-place] > .fd-section-description { grid-column: 1 / -1; }\n/* Parts sharing one cell, side by side; one under the other where the cell is too narrow for that. */\n.fd-grid > .fd-section[data-place=\"shared\"] { container-type: inline-size; }\n.fd-form .fd-section[data-place=\"shared\"] > .fd-grid { --fd-cols: var(--fd-columns, 1); }\n@container (max-width: 330px) {\n .fd-form .fd-section[data-place=\"shared\"] > .fd-grid { --fd-cols: 1; }\n}\n\n/* ---- how a group is drawn: a card, plain, a line under its title, or a frame round it ---- */\n/* A group of its own paints the ground it stands on, so nothing of the grid round it shows through. */\n.fd-form { --fd-ground: transparent; }\n.fd-card, .fd-form[data-fd-skin=\"outlined\"] .fd-section[data-style=\"card\"][data-on-page] { --fd-ground: var(--fd-surface); }\nfieldset.fd-section[data-style] { background-color: var(--fd-ground); }\n.fd-form .fd-section[data-style=\"line\"] > .fd-section-title { border-block-end: 1px solid var(--fd-border); padding-block-end: 8px; }\n.fd-form .fd-section[data-style=\"plain\"] > .fd-section-title { border-block-end: 0; padding-block-end: 0; }\n.fd-form .fd-section[data-style=\"framed\"] {\n border: 1px solid var(--fd-border); border-radius: var(--fd-control-radius); padding: 6px 18px 18px;\n}\n/* The title sits on the frame, as a fieldset's legend does: the frame breaks round it. */\n.fd-form .fd-section[data-style=\"framed\"] > .fd-section-title {\n float: none; width: auto; max-width: 100%; padding: 0 6px; margin-inline-start: -6px; border: 0;\n}\n\n/* ---- where labels sit: as the page, a group or the field itself says (data-labels), in either skin ---- */\n.fd-form .fd-field[data-labels] { grid-template-columns: minmax(0, 1fr); }\n.fd-form .fd-field[data-labels] > * { grid-column: 1 / -1; }\n/* Beside: the label in a column of its own while the field has room for both. In a cell narrower\n than that the label goes back above its box, so the box is never crushed. */\n.fd-form .fd-field[data-labels=\"beside\"] {\n container-type: inline-size;\n grid-template-columns: minmax(0, var(--fd-label-width, 140px)) minmax(0, 1fr);\n column-gap: 14px;\n}\n@container (min-width: 300px) {\n .fd-form .fd-field[data-labels=\"beside\"] > .fd-label {\n grid-column: 1; align-self: start; padding-block-start: max(0px, calc((var(--fd-control-height, 30px) - 1.45em) / 2));\n }\n .fd-form .fd-field[data-labels=\"beside\"] > :not(.fd-label) { grid-column: 2; }\n}\n/* Hidden: out of sight, still the box's name for a screen reader; the empty box shows it instead. */\n.fd-form .fd-field[data-labels=\"hidden\"] > .fd-label {\n position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;\n}\n/* After: a tick box, then its words on the same line, as a sentence; its help and messages under the words. They\n drop to sit level with the boxes beside them in a row, by margins: the field's own padding is left to whoever\n draws round it (a designer's canvas rings a part there). */\n.fd-form .fd-field[data-labels=\"after\"] {\n grid-template-columns: auto minmax(0, 1fr); column-gap: 9px; align-items: start;\n --fd-tick-drop: max(0px, calc((var(--fd-control-height, 30px) - 1.45em) / 2));\n}\n/* The box, or what holds it (a designer's canvas wraps each answer box). */\n.fd-form .fd-field[data-labels=\"after\"] > :is(.fd-tick, :has(> .fd-tick)) { grid-column: 1; grid-row: 1; display: flex; margin-block-start: calc(var(--fd-tick-drop) + (1.45em - 17px) / 2); }\n.fd-form .fd-field[data-labels=\"after\"] .fd-tick { width: 17px; height: 17px; }\n.fd-form .fd-field[data-labels=\"after\"] > :not(.fd-tick, :has(> .fd-tick)) { grid-column: 2; }\n.fd-form .fd-field[data-labels=\"after\"] > .fd-label { grid-row: 1; margin-block-start: var(--fd-tick-drop); font-weight: inherit; line-height: 1.45; cursor: pointer; }\n/* A field or a cell that measures itself is drawn over its neighbours while it is worked in: its lists and calendars open over them. */\n.fd-form .fd-field[data-labels=\"beside\"]:focus-within, .fd-grid > .fd-section[data-place=\"shared\"]:focus-within { z-index: 3; }\n\n/* ---- widths for tabs, words and buttons: they span columns like fields; a button stays as wide as its words ---- */\n:is(.fd-grid, .fd-sections) > .fd-button { justify-self: start; }\n/* A note: words set apart in a soft panel, a shade off whatever it stands on \u2014 a card, the page, or the dark. */\n.fd-form .fd-text-note { background: color-mix(in srgb, var(--fd-text) 6%, transparent); color: var(--fd-text); border-radius: var(--fd-control-radius, 6px); padding: 10px 12px; }\n\n/* ---- the page's look: worn by the form, and by a dialog it opens (its box and the page in it) ---- */\n:is(.fd-form, .fd-form-dialog)[data-font=\"serif\"] { --fd-font: \"Source Serif 4\", Georgia, serif; }\n:is(.fd-form, .fd-form-dialog)[data-font=\"rounded\"] { --fd-font: Nunito, \"Varela Round\", system-ui; }\n/* Room between and inside parts: gaps, the height of a box, a group's padding, the space between groups. */\n:is(.fd-form, .fd-form-dialog)[data-density=\"compact\"] { --fd-gap-y: 10px; --fd-gap-x: 16px; --fd-control-height: 30px; --fd-gap-block: 16px; --fd-group-pad: 14px 16px; }\n:is(.fd-form, .fd-form-dialog)[data-density=\"comfortable\"] { --fd-gap-y: 16px; --fd-gap-x: 20px; --fd-control-height: 36px; --fd-gap-block: 22px; --fd-group-pad: 18px 22px; }\n:is(.fd-form, .fd-form-dialog)[data-density=\"roomy\"] { --fd-gap-y: 22px; --fd-gap-x: 28px; --fd-control-height: 42px; --fd-gap-block: 30px; --fd-group-pad: 24px 30px; }\n:is(.fd-form, .fd-form-dialog)[data-corners=\"square\"] { --fd-radius: 0px; --fd-control-radius: 0px; }\n:is(.fd-form, .fd-form-dialog)[data-corners=\"soft\"] { --fd-radius: 10px; --fd-control-radius: 6px; }\n:is(.fd-form, .fd-form-dialog)[data-corners=\"round\"] { --fd-radius: 16px; --fd-control-radius: 12px; }\n\n/* Light or dark: a page that names its scheme paints its own ground, so it reads the same on any page round it. */\n.fd-form[data-scheme] { color-scheme: light; background: var(--fd-page); color: var(--fd-text); border-radius: var(--fd-radius); --fd-ground: var(--fd-page); }\n.fd-form[data-scheme] > .fd-content:not(:has(> .fd-sheet-page)) { padding: 20px; }\n/* A page in a dialog paints no ground of its own and adds no room: the dialog is its ground. */\n.fd-form-dialog-body > .fd-form[data-scheme] { background: none; border-radius: 0; }\n.fd-form-dialog-body > .fd-form[data-scheme] > .fd-content:not(:has(> .fd-sheet-page)) { padding: 0; }\n:is(.fd-form, .fd-form-dialog)[data-scheme=\"dark\"] {\n color-scheme: dark;\n --fd-text: #e8eaed;\n --fd-muted: #a3a9b2;\n --fd-page: #16191e;\n --fd-surface: #1f2329;\n --fd-border: #3a4048;\n --fd-border-strong: #59616c;\n --fd-accent: #5aa2ff;\n --fd-accent-text: #0b1220;\n --fd-accent-soft: rgba(90, 162, 255, 0.16);\n --fd-focus: #5aa2ff;\n --fd-error: #ff8a7a;\n --fd-error-soft: rgba(255, 138, 122, 0.13);\n --fd-success: #6fd08e;\n --fd-success-soft: rgba(111, 208, 142, 0.14);\n --fd-warning: #f2b55c;\n --fd-warning-soft: rgba(242, 181, 92, 0.13);\n --fd-info: #7db7ff;\n --fd-info-soft: rgba(90, 162, 255, 0.14);\n}\n/* Auto follows the reader's system: the same dark tokens, when it is dark. */\n@media (prefers-color-scheme: dark) {\n :is(.fd-form, .fd-form-dialog)[data-scheme=\"auto\"] {\n color-scheme: dark;\n --fd-text: #e8eaed;\n --fd-muted: #a3a9b2;\n --fd-page: #16191e;\n --fd-surface: #1f2329;\n --fd-border: #3a4048;\n --fd-border-strong: #59616c;\n --fd-accent: #5aa2ff;\n --fd-accent-text: #0b1220;\n --fd-accent-soft: rgba(90, 162, 255, 0.16);\n --fd-focus: #5aa2ff;\n --fd-error: #ff8a7a;\n --fd-error-soft: rgba(255, 138, 122, 0.13);\n --fd-success: #6fd08e;\n --fd-success-soft: rgba(111, 208, 142, 0.14);\n --fd-warning: #f2b55c;\n --fd-warning-soft: rgba(242, 181, 92, 0.13);\n --fd-info: #7db7ff;\n --fd-info-soft: rgba(90, 162, 255, 0.14);\n }\n}\n\n/* The page's accent, and the softer and hover shades mixed from it on whatever surface the scheme has. */\n:is(.fd-form, .fd-form-dialog)[data-accent] {\n --fd-accent: var(--fd-look-accent);\n --fd-accent-text: var(--fd-look-accent-text);\n --fd-focus: var(--fd-look-accent);\n --fd-accent-soft: color-mix(in srgb, var(--fd-accent) 12%, var(--fd-surface));\n --fd-accent-hover: color-mix(in srgb, var(--fd-accent) 84%, var(--fd-text));\n}\n/* On a dark page, the accent the viewer lightened, when it had to be, so it still reads there. */\n:is(.fd-form, .fd-form-dialog)[data-scheme=\"dark\"][data-accent] {\n --fd-accent: var(--fd-look-accent-dark);\n --fd-accent-text: var(--fd-look-accent-dark-text);\n --fd-focus: var(--fd-look-accent-dark);\n}\n@media (prefers-color-scheme: dark) {\n :is(.fd-form, .fd-form-dialog)[data-scheme=\"auto\"][data-accent] {\n --fd-accent: var(--fd-look-accent-dark);\n --fd-accent-text: var(--fd-look-accent-dark-text);\n --fd-focus: var(--fd-look-accent-dark);\n }\n}\n:is(.fd-form, .fd-form-dialog)[data-fd-skin=\"outlined\"][data-accent] { --fd-focus-ring: 0 0 0 2px color-mix(in srgb, var(--fd-accent) 22%, transparent); }\n:is(.fd-form, .fd-form-dialog)[data-accent] .fd-button-primary:hover { filter: none; background: var(--fd-accent-hover); border-color: var(--fd-accent-hover); }\n/* A band of the accent under the page's title. */\n.fd-form[data-accent] .fd-page-head { border-block-end: 3px solid var(--fd-accent); padding-block-end: 14px; }\n";
@@ -0,0 +1,11 @@
1
+ /**
2
+ * The layout on top of the skins: arrangements on their grid's columns, how
3
+ * each group is drawn, where labels sit, and the page's own look — accent,
4
+ * font, room, corners, light or dark. The viewer hands these over as
5
+ * attributes and tokens on the form (see `place.ts` and `look.ts` in
6
+ * @fieldia/viewer); this stylesheet comes after the skins, so it wins where it
7
+ * speaks and leaves everything else as the skin draws it.
8
+ *
9
+ * Logical properties throughout, so right to left mirrors on its own.
10
+ */
11
+ export declare const LAYOUT_CSS = "\n/* ---- arrangements: parts side by side or one under another, nothing drawn round them ---- */\n/* On its grid's columns: the grid's own tracks and gaps, so its parts line up with everything above and below. */\n.fd-grid > .fd-section[data-place=\"tracks\"] {\n /* The columns it covers: its span, never more than its grid has at this width. */\n --fd-tracks: min(var(--fd-span, 1), var(--fd-cols));\n grid-template-columns: subgrid;\n column-gap: var(--fd-gap-x);\n}\n.fd-form .fd-section[data-place=\"tracks\"] > .fd-grid { --fd-cols: var(--fd-tracks); grid-column: 1 / -1; grid-template-columns: subgrid; }\n.fd-section[data-place] > .fd-section-description { grid-column: 1 / -1; }\n/* Parts sharing one cell, side by side; one under the other where the cell is too narrow for that. */\n.fd-grid > .fd-section[data-place=\"shared\"] { container-type: inline-size; }\n.fd-form .fd-section[data-place=\"shared\"] > .fd-grid { --fd-cols: var(--fd-columns, 1); }\n@container (max-width: 330px) {\n .fd-form .fd-section[data-place=\"shared\"] > .fd-grid { --fd-cols: 1; }\n}\n\n/* ---- how a group is drawn: a card, plain, a line under its title, or a frame round it ---- */\n/* A group of its own paints the ground it stands on, so nothing of the grid round it shows through. */\n.fd-form { --fd-ground: transparent; }\n.fd-card, .fd-form[data-fd-skin=\"outlined\"] .fd-section[data-style=\"card\"][data-on-page] { --fd-ground: var(--fd-surface); }\nfieldset.fd-section[data-style] { background-color: var(--fd-ground); }\n.fd-form .fd-section[data-style=\"line\"] > .fd-section-title { border-block-end: 1px solid var(--fd-border); padding-block-end: 8px; }\n.fd-form .fd-section[data-style=\"plain\"] > .fd-section-title { border-block-end: 0; padding-block-end: 0; }\n.fd-form .fd-section[data-style=\"framed\"] {\n border: 1px solid var(--fd-border); border-radius: var(--fd-control-radius); padding: 6px 18px 18px;\n}\n/* The title sits on the frame, as a fieldset's legend does: the frame breaks round it. */\n.fd-form .fd-section[data-style=\"framed\"] > .fd-section-title {\n float: none; width: auto; max-width: 100%; padding: 0 6px; margin-inline-start: -6px; border: 0;\n}\n\n/* ---- where labels sit: as the page, a group or the field itself says (data-labels), in either skin ---- */\n.fd-form .fd-field[data-labels] { grid-template-columns: minmax(0, 1fr); }\n.fd-form .fd-field[data-labels] > * { grid-column: 1 / -1; }\n/* Beside: the label in a column of its own while the field has room for both. In a cell narrower\n than that the label goes back above its box, so the box is never crushed. */\n.fd-form .fd-field[data-labels=\"beside\"] {\n container-type: inline-size;\n grid-template-columns: minmax(0, var(--fd-label-width, 140px)) minmax(0, 1fr);\n column-gap: 14px;\n}\n@container (min-width: 300px) {\n .fd-form .fd-field[data-labels=\"beside\"] > .fd-label {\n grid-column: 1; align-self: start; padding-block-start: max(0px, calc((var(--fd-control-height, 30px) - 1.45em) / 2));\n }\n .fd-form .fd-field[data-labels=\"beside\"] > :not(.fd-label) { grid-column: 2; }\n}\n/* Hidden: out of sight, still the box's name for a screen reader; the empty box shows it instead. */\n.fd-form .fd-field[data-labels=\"hidden\"] > .fd-label {\n position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;\n}\n/* After: a tick box, then its words on the same line, as a sentence; its help and messages under the words. They\n drop to sit level with the boxes beside them in a row, by margins: the field's own padding is left to whoever\n draws round it (a designer's canvas rings a part there). */\n.fd-form .fd-field[data-labels=\"after\"] {\n grid-template-columns: auto minmax(0, 1fr); column-gap: 9px; align-items: start;\n --fd-tick-drop: max(0px, calc((var(--fd-control-height, 30px) - 1.45em) / 2));\n}\n/* The box, or what holds it (a designer's canvas wraps each answer box). */\n.fd-form .fd-field[data-labels=\"after\"] > :is(.fd-tick, :has(> .fd-tick)) { grid-column: 1; grid-row: 1; display: flex; margin-block-start: calc(var(--fd-tick-drop) + (1.45em - 17px) / 2); }\n.fd-form .fd-field[data-labels=\"after\"] .fd-tick { width: 17px; height: 17px; }\n.fd-form .fd-field[data-labels=\"after\"] > :not(.fd-tick, :has(> .fd-tick)) { grid-column: 2; }\n.fd-form .fd-field[data-labels=\"after\"] > .fd-label { grid-row: 1; margin-block-start: var(--fd-tick-drop); font-weight: inherit; line-height: 1.45; cursor: pointer; }\n/* A field or a cell that measures itself is drawn over its neighbours while it is worked in: its lists and calendars open over them. */\n.fd-form .fd-field[data-labels=\"beside\"]:focus-within, .fd-grid > .fd-section[data-place=\"shared\"]:focus-within { z-index: 3; }\n\n/* ---- widths for tabs, words and buttons: they span columns like fields; a button stays as wide as its words ---- */\n:is(.fd-grid, .fd-sections) > .fd-button { justify-self: start; }\n/* A note: words set apart in a soft panel, a shade off whatever it stands on \u2014 a card, the page, or the dark. */\n.fd-form .fd-text-note { background: color-mix(in srgb, var(--fd-text) 6%, transparent); color: var(--fd-text); border-radius: var(--fd-control-radius, 6px); padding: 10px 12px; }\n\n/* ---- the page's look: worn by the form, and by a dialog it opens (its box and the page in it) ---- */\n:is(.fd-form, .fd-form-dialog)[data-font=\"serif\"] { --fd-font: \"Source Serif 4\", Georgia, serif; }\n:is(.fd-form, .fd-form-dialog)[data-font=\"rounded\"] { --fd-font: Nunito, \"Varela Round\", system-ui; }\n/* Room between and inside parts: gaps, the height of a box, a group's padding, the space between groups. */\n:is(.fd-form, .fd-form-dialog)[data-density=\"compact\"] { --fd-gap-y: 10px; --fd-gap-x: 16px; --fd-control-height: 30px; --fd-gap-block: 16px; --fd-group-pad: 14px 16px; }\n:is(.fd-form, .fd-form-dialog)[data-density=\"comfortable\"] { --fd-gap-y: 16px; --fd-gap-x: 20px; --fd-control-height: 36px; --fd-gap-block: 22px; --fd-group-pad: 18px 22px; }\n:is(.fd-form, .fd-form-dialog)[data-density=\"roomy\"] { --fd-gap-y: 22px; --fd-gap-x: 28px; --fd-control-height: 42px; --fd-gap-block: 30px; --fd-group-pad: 24px 30px; }\n:is(.fd-form, .fd-form-dialog)[data-corners=\"square\"] { --fd-radius: 0px; --fd-control-radius: 0px; }\n:is(.fd-form, .fd-form-dialog)[data-corners=\"soft\"] { --fd-radius: 10px; --fd-control-radius: 6px; }\n:is(.fd-form, .fd-form-dialog)[data-corners=\"round\"] { --fd-radius: 16px; --fd-control-radius: 12px; }\n\n/* Light or dark: a page that names its scheme paints its own ground, so it reads the same on any page round it. */\n.fd-form[data-scheme] { color-scheme: light; background: var(--fd-page); color: var(--fd-text); border-radius: var(--fd-radius); --fd-ground: var(--fd-page); }\n.fd-form[data-scheme] > .fd-content:not(:has(> .fd-sheet-page)) { padding: 20px; }\n/* A page in a dialog paints no ground of its own and adds no room: the dialog is its ground. */\n.fd-form-dialog-body > .fd-form[data-scheme] { background: none; border-radius: 0; }\n.fd-form-dialog-body > .fd-form[data-scheme] > .fd-content:not(:has(> .fd-sheet-page)) { padding: 0; }\n:is(.fd-form, .fd-form-dialog)[data-scheme=\"dark\"] {\n color-scheme: dark;\n --fd-text: #e8eaed;\n --fd-muted: #a3a9b2;\n --fd-page: #16191e;\n --fd-surface: #1f2329;\n --fd-border: #3a4048;\n --fd-border-strong: #59616c;\n --fd-accent: #5aa2ff;\n --fd-accent-text: #0b1220;\n --fd-accent-soft: rgba(90, 162, 255, 0.16);\n --fd-focus: #5aa2ff;\n --fd-error: #ff8a7a;\n --fd-error-soft: rgba(255, 138, 122, 0.13);\n --fd-success: #6fd08e;\n --fd-success-soft: rgba(111, 208, 142, 0.14);\n --fd-warning: #f2b55c;\n --fd-warning-soft: rgba(242, 181, 92, 0.13);\n --fd-info: #7db7ff;\n --fd-info-soft: rgba(90, 162, 255, 0.14);\n}\n/* Auto follows the reader's system: the same dark tokens, when it is dark. */\n@media (prefers-color-scheme: dark) {\n :is(.fd-form, .fd-form-dialog)[data-scheme=\"auto\"] {\n color-scheme: dark;\n --fd-text: #e8eaed;\n --fd-muted: #a3a9b2;\n --fd-page: #16191e;\n --fd-surface: #1f2329;\n --fd-border: #3a4048;\n --fd-border-strong: #59616c;\n --fd-accent: #5aa2ff;\n --fd-accent-text: #0b1220;\n --fd-accent-soft: rgba(90, 162, 255, 0.16);\n --fd-focus: #5aa2ff;\n --fd-error: #ff8a7a;\n --fd-error-soft: rgba(255, 138, 122, 0.13);\n --fd-success: #6fd08e;\n --fd-success-soft: rgba(111, 208, 142, 0.14);\n --fd-warning: #f2b55c;\n --fd-warning-soft: rgba(242, 181, 92, 0.13);\n --fd-info: #7db7ff;\n --fd-info-soft: rgba(90, 162, 255, 0.14);\n }\n}\n\n/* The page's accent, and the softer and hover shades mixed from it on whatever surface the scheme has. */\n:is(.fd-form, .fd-form-dialog)[data-accent] {\n --fd-accent: var(--fd-look-accent);\n --fd-accent-text: var(--fd-look-accent-text);\n --fd-focus: var(--fd-look-accent);\n --fd-accent-soft: color-mix(in srgb, var(--fd-accent) 12%, var(--fd-surface));\n --fd-accent-hover: color-mix(in srgb, var(--fd-accent) 84%, var(--fd-text));\n}\n/* On a dark page, the accent the viewer lightened, when it had to be, so it still reads there. */\n:is(.fd-form, .fd-form-dialog)[data-scheme=\"dark\"][data-accent] {\n --fd-accent: var(--fd-look-accent-dark);\n --fd-accent-text: var(--fd-look-accent-dark-text);\n --fd-focus: var(--fd-look-accent-dark);\n}\n@media (prefers-color-scheme: dark) {\n :is(.fd-form, .fd-form-dialog)[data-scheme=\"auto\"][data-accent] {\n --fd-accent: var(--fd-look-accent-dark);\n --fd-accent-text: var(--fd-look-accent-dark-text);\n --fd-focus: var(--fd-look-accent-dark);\n }\n}\n:is(.fd-form, .fd-form-dialog)[data-fd-skin=\"outlined\"][data-accent] { --fd-focus-ring: 0 0 0 2px color-mix(in srgb, var(--fd-accent) 22%, transparent); }\n:is(.fd-form, .fd-form-dialog)[data-accent] .fd-button-primary:hover { filter: none; background: var(--fd-accent-hover); border-color: var(--fd-accent-hover); }\n/* A band of the accent under the page's title. */\n.fd-form[data-accent] .fd-page-head { border-block-end: 3px solid var(--fd-accent); padding-block-end: 14px; }\n";
@@ -0,0 +1,176 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LAYOUT_CSS = void 0;
4
+ /**
5
+ * The layout on top of the skins: arrangements on their grid's columns, how
6
+ * each group is drawn, where labels sit, and the page's own look — accent,
7
+ * font, room, corners, light or dark. The viewer hands these over as
8
+ * attributes and tokens on the form (see `place.ts` and `look.ts` in
9
+ * @fieldia/viewer); this stylesheet comes after the skins, so it wins where it
10
+ * speaks and leaves everything else as the skin draws it.
11
+ *
12
+ * Logical properties throughout, so right to left mirrors on its own.
13
+ */
14
+ exports.LAYOUT_CSS = `
15
+ /* ---- arrangements: parts side by side or one under another, nothing drawn round them ---- */
16
+ /* On its grid's columns: the grid's own tracks and gaps, so its parts line up with everything above and below. */
17
+ .fd-grid > .fd-section[data-place="tracks"] {
18
+ /* The columns it covers: its span, never more than its grid has at this width. */
19
+ --fd-tracks: min(var(--fd-span, 1), var(--fd-cols));
20
+ grid-template-columns: subgrid;
21
+ column-gap: var(--fd-gap-x);
22
+ }
23
+ .fd-form .fd-section[data-place="tracks"] > .fd-grid { --fd-cols: var(--fd-tracks); grid-column: 1 / -1; grid-template-columns: subgrid; }
24
+ .fd-section[data-place] > .fd-section-description { grid-column: 1 / -1; }
25
+ /* Parts sharing one cell, side by side; one under the other where the cell is too narrow for that. */
26
+ .fd-grid > .fd-section[data-place="shared"] { container-type: inline-size; }
27
+ .fd-form .fd-section[data-place="shared"] > .fd-grid { --fd-cols: var(--fd-columns, 1); }
28
+ @container (max-width: 330px) {
29
+ .fd-form .fd-section[data-place="shared"] > .fd-grid { --fd-cols: 1; }
30
+ }
31
+
32
+ /* ---- how a group is drawn: a card, plain, a line under its title, or a frame round it ---- */
33
+ /* A group of its own paints the ground it stands on, so nothing of the grid round it shows through. */
34
+ .fd-form { --fd-ground: transparent; }
35
+ .fd-card, .fd-form[data-fd-skin="outlined"] .fd-section[data-style="card"][data-on-page] { --fd-ground: var(--fd-surface); }
36
+ fieldset.fd-section[data-style] { background-color: var(--fd-ground); }
37
+ .fd-form .fd-section[data-style="line"] > .fd-section-title { border-block-end: 1px solid var(--fd-border); padding-block-end: 8px; }
38
+ .fd-form .fd-section[data-style="plain"] > .fd-section-title { border-block-end: 0; padding-block-end: 0; }
39
+ .fd-form .fd-section[data-style="framed"] {
40
+ border: 1px solid var(--fd-border); border-radius: var(--fd-control-radius); padding: 6px 18px 18px;
41
+ }
42
+ /* The title sits on the frame, as a fieldset's legend does: the frame breaks round it. */
43
+ .fd-form .fd-section[data-style="framed"] > .fd-section-title {
44
+ float: none; width: auto; max-width: 100%; padding: 0 6px; margin-inline-start: -6px; border: 0;
45
+ }
46
+
47
+ /* ---- where labels sit: as the page, a group or the field itself says (data-labels), in either skin ---- */
48
+ .fd-form .fd-field[data-labels] { grid-template-columns: minmax(0, 1fr); }
49
+ .fd-form .fd-field[data-labels] > * { grid-column: 1 / -1; }
50
+ /* Beside: the label in a column of its own while the field has room for both. In a cell narrower
51
+ than that the label goes back above its box, so the box is never crushed. */
52
+ .fd-form .fd-field[data-labels="beside"] {
53
+ container-type: inline-size;
54
+ grid-template-columns: minmax(0, var(--fd-label-width, 140px)) minmax(0, 1fr);
55
+ column-gap: 14px;
56
+ }
57
+ @container (min-width: 300px) {
58
+ .fd-form .fd-field[data-labels="beside"] > .fd-label {
59
+ grid-column: 1; align-self: start; padding-block-start: max(0px, calc((var(--fd-control-height, 30px) - 1.45em) / 2));
60
+ }
61
+ .fd-form .fd-field[data-labels="beside"] > :not(.fd-label) { grid-column: 2; }
62
+ }
63
+ /* Hidden: out of sight, still the box's name for a screen reader; the empty box shows it instead. */
64
+ .fd-form .fd-field[data-labels="hidden"] > .fd-label {
65
+ position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
66
+ }
67
+ /* After: a tick box, then its words on the same line, as a sentence; its help and messages under the words. They
68
+ drop to sit level with the boxes beside them in a row, by margins: the field's own padding is left to whoever
69
+ draws round it (a designer's canvas rings a part there). */
70
+ .fd-form .fd-field[data-labels="after"] {
71
+ grid-template-columns: auto minmax(0, 1fr); column-gap: 9px; align-items: start;
72
+ --fd-tick-drop: max(0px, calc((var(--fd-control-height, 30px) - 1.45em) / 2));
73
+ }
74
+ /* The box, or what holds it (a designer's canvas wraps each answer box). */
75
+ .fd-form .fd-field[data-labels="after"] > :is(.fd-tick, :has(> .fd-tick)) { grid-column: 1; grid-row: 1; display: flex; margin-block-start: calc(var(--fd-tick-drop) + (1.45em - 17px) / 2); }
76
+ .fd-form .fd-field[data-labels="after"] .fd-tick { width: 17px; height: 17px; }
77
+ .fd-form .fd-field[data-labels="after"] > :not(.fd-tick, :has(> .fd-tick)) { grid-column: 2; }
78
+ .fd-form .fd-field[data-labels="after"] > .fd-label { grid-row: 1; margin-block-start: var(--fd-tick-drop); font-weight: inherit; line-height: 1.45; cursor: pointer; }
79
+ /* A field or a cell that measures itself is drawn over its neighbours while it is worked in: its lists and calendars open over them. */
80
+ .fd-form .fd-field[data-labels="beside"]:focus-within, .fd-grid > .fd-section[data-place="shared"]:focus-within { z-index: 3; }
81
+
82
+ /* ---- widths for tabs, words and buttons: they span columns like fields; a button stays as wide as its words ---- */
83
+ :is(.fd-grid, .fd-sections) > .fd-button { justify-self: start; }
84
+ /* A note: words set apart in a soft panel, a shade off whatever it stands on — a card, the page, or the dark. */
85
+ .fd-form .fd-text-note { background: color-mix(in srgb, var(--fd-text) 6%, transparent); color: var(--fd-text); border-radius: var(--fd-control-radius, 6px); padding: 10px 12px; }
86
+
87
+ /* ---- the page's look: worn by the form, and by a dialog it opens (its box and the page in it) ---- */
88
+ :is(.fd-form, .fd-form-dialog)[data-font="serif"] { --fd-font: "Source Serif 4", Georgia, serif; }
89
+ :is(.fd-form, .fd-form-dialog)[data-font="rounded"] { --fd-font: Nunito, "Varela Round", system-ui; }
90
+ /* Room between and inside parts: gaps, the height of a box, a group's padding, the space between groups. */
91
+ :is(.fd-form, .fd-form-dialog)[data-density="compact"] { --fd-gap-y: 10px; --fd-gap-x: 16px; --fd-control-height: 30px; --fd-gap-block: 16px; --fd-group-pad: 14px 16px; }
92
+ :is(.fd-form, .fd-form-dialog)[data-density="comfortable"] { --fd-gap-y: 16px; --fd-gap-x: 20px; --fd-control-height: 36px; --fd-gap-block: 22px; --fd-group-pad: 18px 22px; }
93
+ :is(.fd-form, .fd-form-dialog)[data-density="roomy"] { --fd-gap-y: 22px; --fd-gap-x: 28px; --fd-control-height: 42px; --fd-gap-block: 30px; --fd-group-pad: 24px 30px; }
94
+ :is(.fd-form, .fd-form-dialog)[data-corners="square"] { --fd-radius: 0px; --fd-control-radius: 0px; }
95
+ :is(.fd-form, .fd-form-dialog)[data-corners="soft"] { --fd-radius: 10px; --fd-control-radius: 6px; }
96
+ :is(.fd-form, .fd-form-dialog)[data-corners="round"] { --fd-radius: 16px; --fd-control-radius: 12px; }
97
+
98
+ /* Light or dark: a page that names its scheme paints its own ground, so it reads the same on any page round it. */
99
+ .fd-form[data-scheme] { color-scheme: light; background: var(--fd-page); color: var(--fd-text); border-radius: var(--fd-radius); --fd-ground: var(--fd-page); }
100
+ .fd-form[data-scheme] > .fd-content:not(:has(> .fd-sheet-page)) { padding: 20px; }
101
+ /* A page in a dialog paints no ground of its own and adds no room: the dialog is its ground. */
102
+ .fd-form-dialog-body > .fd-form[data-scheme] { background: none; border-radius: 0; }
103
+ .fd-form-dialog-body > .fd-form[data-scheme] > .fd-content:not(:has(> .fd-sheet-page)) { padding: 0; }
104
+ :is(.fd-form, .fd-form-dialog)[data-scheme="dark"] {
105
+ color-scheme: dark;
106
+ --fd-text: #e8eaed;
107
+ --fd-muted: #a3a9b2;
108
+ --fd-page: #16191e;
109
+ --fd-surface: #1f2329;
110
+ --fd-border: #3a4048;
111
+ --fd-border-strong: #59616c;
112
+ --fd-accent: #5aa2ff;
113
+ --fd-accent-text: #0b1220;
114
+ --fd-accent-soft: rgba(90, 162, 255, 0.16);
115
+ --fd-focus: #5aa2ff;
116
+ --fd-error: #ff8a7a;
117
+ --fd-error-soft: rgba(255, 138, 122, 0.13);
118
+ --fd-success: #6fd08e;
119
+ --fd-success-soft: rgba(111, 208, 142, 0.14);
120
+ --fd-warning: #f2b55c;
121
+ --fd-warning-soft: rgba(242, 181, 92, 0.13);
122
+ --fd-info: #7db7ff;
123
+ --fd-info-soft: rgba(90, 162, 255, 0.14);
124
+ }
125
+ /* Auto follows the reader's system: the same dark tokens, when it is dark. */
126
+ @media (prefers-color-scheme: dark) {
127
+ :is(.fd-form, .fd-form-dialog)[data-scheme="auto"] {
128
+ color-scheme: dark;
129
+ --fd-text: #e8eaed;
130
+ --fd-muted: #a3a9b2;
131
+ --fd-page: #16191e;
132
+ --fd-surface: #1f2329;
133
+ --fd-border: #3a4048;
134
+ --fd-border-strong: #59616c;
135
+ --fd-accent: #5aa2ff;
136
+ --fd-accent-text: #0b1220;
137
+ --fd-accent-soft: rgba(90, 162, 255, 0.16);
138
+ --fd-focus: #5aa2ff;
139
+ --fd-error: #ff8a7a;
140
+ --fd-error-soft: rgba(255, 138, 122, 0.13);
141
+ --fd-success: #6fd08e;
142
+ --fd-success-soft: rgba(111, 208, 142, 0.14);
143
+ --fd-warning: #f2b55c;
144
+ --fd-warning-soft: rgba(242, 181, 92, 0.13);
145
+ --fd-info: #7db7ff;
146
+ --fd-info-soft: rgba(90, 162, 255, 0.14);
147
+ }
148
+ }
149
+
150
+ /* The page's accent, and the softer and hover shades mixed from it on whatever surface the scheme has. */
151
+ :is(.fd-form, .fd-form-dialog)[data-accent] {
152
+ --fd-accent: var(--fd-look-accent);
153
+ --fd-accent-text: var(--fd-look-accent-text);
154
+ --fd-focus: var(--fd-look-accent);
155
+ --fd-accent-soft: color-mix(in srgb, var(--fd-accent) 12%, var(--fd-surface));
156
+ --fd-accent-hover: color-mix(in srgb, var(--fd-accent) 84%, var(--fd-text));
157
+ }
158
+ /* On a dark page, the accent the viewer lightened, when it had to be, so it still reads there. */
159
+ :is(.fd-form, .fd-form-dialog)[data-scheme="dark"][data-accent] {
160
+ --fd-accent: var(--fd-look-accent-dark);
161
+ --fd-accent-text: var(--fd-look-accent-dark-text);
162
+ --fd-focus: var(--fd-look-accent-dark);
163
+ }
164
+ @media (prefers-color-scheme: dark) {
165
+ :is(.fd-form, .fd-form-dialog)[data-scheme="auto"][data-accent] {
166
+ --fd-accent: var(--fd-look-accent-dark);
167
+ --fd-accent-text: var(--fd-look-accent-dark-text);
168
+ --fd-focus: var(--fd-look-accent-dark);
169
+ }
170
+ }
171
+ :is(.fd-form, .fd-form-dialog)[data-fd-skin="outlined"][data-accent] { --fd-focus-ring: 0 0 0 2px color-mix(in srgb, var(--fd-accent) 22%, transparent); }
172
+ :is(.fd-form, .fd-form-dialog)[data-accent] .fd-button-primary:hover { filter: none; background: var(--fd-accent-hover); border-color: var(--fd-accent-hover); }
173
+ /* A band of the accent under the page's title. */
174
+ .fd-form[data-accent] .fd-page-head { border-block-end: 3px solid var(--fd-accent); padding-block-end: 14px; }
175
+ `;
176
+ //# sourceMappingURL=layout-styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"layout-styles.js","sourceRoot":"","sources":["../../../../../libs/widgets/src/lib/layout-styles.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;GASG;AACU,QAAA,UAAU,GAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiKnC,CAAC"}
@@ -0,0 +1,173 @@
1
+ /**
2
+ * The layout on top of the skins: arrangements on their grid's columns, how
3
+ * each group is drawn, where labels sit, and the page's own look — accent,
4
+ * font, room, corners, light or dark. The viewer hands these over as
5
+ * attributes and tokens on the form (see `place.ts` and `look.ts` in
6
+ * @fieldia/viewer); this stylesheet comes after the skins, so it wins where it
7
+ * speaks and leaves everything else as the skin draws it.
8
+ *
9
+ * Logical properties throughout, so right to left mirrors on its own.
10
+ */
11
+ export const LAYOUT_CSS = /* css */ `
12
+ /* ---- arrangements: parts side by side or one under another, nothing drawn round them ---- */
13
+ /* On its grid's columns: the grid's own tracks and gaps, so its parts line up with everything above and below. */
14
+ .fd-grid > .fd-section[data-place="tracks"] {
15
+ /* The columns it covers: its span, never more than its grid has at this width. */
16
+ --fd-tracks: min(var(--fd-span, 1), var(--fd-cols));
17
+ grid-template-columns: subgrid;
18
+ column-gap: var(--fd-gap-x);
19
+ }
20
+ .fd-form .fd-section[data-place="tracks"] > .fd-grid { --fd-cols: var(--fd-tracks); grid-column: 1 / -1; grid-template-columns: subgrid; }
21
+ .fd-section[data-place] > .fd-section-description { grid-column: 1 / -1; }
22
+ /* Parts sharing one cell, side by side; one under the other where the cell is too narrow for that. */
23
+ .fd-grid > .fd-section[data-place="shared"] { container-type: inline-size; }
24
+ .fd-form .fd-section[data-place="shared"] > .fd-grid { --fd-cols: var(--fd-columns, 1); }
25
+ @container (max-width: 330px) {
26
+ .fd-form .fd-section[data-place="shared"] > .fd-grid { --fd-cols: 1; }
27
+ }
28
+
29
+ /* ---- how a group is drawn: a card, plain, a line under its title, or a frame round it ---- */
30
+ /* A group of its own paints the ground it stands on, so nothing of the grid round it shows through. */
31
+ .fd-form { --fd-ground: transparent; }
32
+ .fd-card, .fd-form[data-fd-skin="outlined"] .fd-section[data-style="card"][data-on-page] { --fd-ground: var(--fd-surface); }
33
+ fieldset.fd-section[data-style] { background-color: var(--fd-ground); }
34
+ .fd-form .fd-section[data-style="line"] > .fd-section-title { border-block-end: 1px solid var(--fd-border); padding-block-end: 8px; }
35
+ .fd-form .fd-section[data-style="plain"] > .fd-section-title { border-block-end: 0; padding-block-end: 0; }
36
+ .fd-form .fd-section[data-style="framed"] {
37
+ border: 1px solid var(--fd-border); border-radius: var(--fd-control-radius); padding: 6px 18px 18px;
38
+ }
39
+ /* The title sits on the frame, as a fieldset's legend does: the frame breaks round it. */
40
+ .fd-form .fd-section[data-style="framed"] > .fd-section-title {
41
+ float: none; width: auto; max-width: 100%; padding: 0 6px; margin-inline-start: -6px; border: 0;
42
+ }
43
+
44
+ /* ---- where labels sit: as the page, a group or the field itself says (data-labels), in either skin ---- */
45
+ .fd-form .fd-field[data-labels] { grid-template-columns: minmax(0, 1fr); }
46
+ .fd-form .fd-field[data-labels] > * { grid-column: 1 / -1; }
47
+ /* Beside: the label in a column of its own while the field has room for both. In a cell narrower
48
+ than that the label goes back above its box, so the box is never crushed. */
49
+ .fd-form .fd-field[data-labels="beside"] {
50
+ container-type: inline-size;
51
+ grid-template-columns: minmax(0, var(--fd-label-width, 140px)) minmax(0, 1fr);
52
+ column-gap: 14px;
53
+ }
54
+ @container (min-width: 300px) {
55
+ .fd-form .fd-field[data-labels="beside"] > .fd-label {
56
+ grid-column: 1; align-self: start; padding-block-start: max(0px, calc((var(--fd-control-height, 30px) - 1.45em) / 2));
57
+ }
58
+ .fd-form .fd-field[data-labels="beside"] > :not(.fd-label) { grid-column: 2; }
59
+ }
60
+ /* Hidden: out of sight, still the box's name for a screen reader; the empty box shows it instead. */
61
+ .fd-form .fd-field[data-labels="hidden"] > .fd-label {
62
+ position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
63
+ }
64
+ /* After: a tick box, then its words on the same line, as a sentence; its help and messages under the words. They
65
+ drop to sit level with the boxes beside them in a row, by margins: the field's own padding is left to whoever
66
+ draws round it (a designer's canvas rings a part there). */
67
+ .fd-form .fd-field[data-labels="after"] {
68
+ grid-template-columns: auto minmax(0, 1fr); column-gap: 9px; align-items: start;
69
+ --fd-tick-drop: max(0px, calc((var(--fd-control-height, 30px) - 1.45em) / 2));
70
+ }
71
+ /* The box, or what holds it (a designer's canvas wraps each answer box). */
72
+ .fd-form .fd-field[data-labels="after"] > :is(.fd-tick, :has(> .fd-tick)) { grid-column: 1; grid-row: 1; display: flex; margin-block-start: calc(var(--fd-tick-drop) + (1.45em - 17px) / 2); }
73
+ .fd-form .fd-field[data-labels="after"] .fd-tick { width: 17px; height: 17px; }
74
+ .fd-form .fd-field[data-labels="after"] > :not(.fd-tick, :has(> .fd-tick)) { grid-column: 2; }
75
+ .fd-form .fd-field[data-labels="after"] > .fd-label { grid-row: 1; margin-block-start: var(--fd-tick-drop); font-weight: inherit; line-height: 1.45; cursor: pointer; }
76
+ /* A field or a cell that measures itself is drawn over its neighbours while it is worked in: its lists and calendars open over them. */
77
+ .fd-form .fd-field[data-labels="beside"]:focus-within, .fd-grid > .fd-section[data-place="shared"]:focus-within { z-index: 3; }
78
+
79
+ /* ---- widths for tabs, words and buttons: they span columns like fields; a button stays as wide as its words ---- */
80
+ :is(.fd-grid, .fd-sections) > .fd-button { justify-self: start; }
81
+ /* A note: words set apart in a soft panel, a shade off whatever it stands on — a card, the page, or the dark. */
82
+ .fd-form .fd-text-note { background: color-mix(in srgb, var(--fd-text) 6%, transparent); color: var(--fd-text); border-radius: var(--fd-control-radius, 6px); padding: 10px 12px; }
83
+
84
+ /* ---- the page's look: worn by the form, and by a dialog it opens (its box and the page in it) ---- */
85
+ :is(.fd-form, .fd-form-dialog)[data-font="serif"] { --fd-font: "Source Serif 4", Georgia, serif; }
86
+ :is(.fd-form, .fd-form-dialog)[data-font="rounded"] { --fd-font: Nunito, "Varela Round", system-ui; }
87
+ /* Room between and inside parts: gaps, the height of a box, a group's padding, the space between groups. */
88
+ :is(.fd-form, .fd-form-dialog)[data-density="compact"] { --fd-gap-y: 10px; --fd-gap-x: 16px; --fd-control-height: 30px; --fd-gap-block: 16px; --fd-group-pad: 14px 16px; }
89
+ :is(.fd-form, .fd-form-dialog)[data-density="comfortable"] { --fd-gap-y: 16px; --fd-gap-x: 20px; --fd-control-height: 36px; --fd-gap-block: 22px; --fd-group-pad: 18px 22px; }
90
+ :is(.fd-form, .fd-form-dialog)[data-density="roomy"] { --fd-gap-y: 22px; --fd-gap-x: 28px; --fd-control-height: 42px; --fd-gap-block: 30px; --fd-group-pad: 24px 30px; }
91
+ :is(.fd-form, .fd-form-dialog)[data-corners="square"] { --fd-radius: 0px; --fd-control-radius: 0px; }
92
+ :is(.fd-form, .fd-form-dialog)[data-corners="soft"] { --fd-radius: 10px; --fd-control-radius: 6px; }
93
+ :is(.fd-form, .fd-form-dialog)[data-corners="round"] { --fd-radius: 16px; --fd-control-radius: 12px; }
94
+
95
+ /* Light or dark: a page that names its scheme paints its own ground, so it reads the same on any page round it. */
96
+ .fd-form[data-scheme] { color-scheme: light; background: var(--fd-page); color: var(--fd-text); border-radius: var(--fd-radius); --fd-ground: var(--fd-page); }
97
+ .fd-form[data-scheme] > .fd-content:not(:has(> .fd-sheet-page)) { padding: 20px; }
98
+ /* A page in a dialog paints no ground of its own and adds no room: the dialog is its ground. */
99
+ .fd-form-dialog-body > .fd-form[data-scheme] { background: none; border-radius: 0; }
100
+ .fd-form-dialog-body > .fd-form[data-scheme] > .fd-content:not(:has(> .fd-sheet-page)) { padding: 0; }
101
+ :is(.fd-form, .fd-form-dialog)[data-scheme="dark"] {
102
+ color-scheme: dark;
103
+ --fd-text: #e8eaed;
104
+ --fd-muted: #a3a9b2;
105
+ --fd-page: #16191e;
106
+ --fd-surface: #1f2329;
107
+ --fd-border: #3a4048;
108
+ --fd-border-strong: #59616c;
109
+ --fd-accent: #5aa2ff;
110
+ --fd-accent-text: #0b1220;
111
+ --fd-accent-soft: rgba(90, 162, 255, 0.16);
112
+ --fd-focus: #5aa2ff;
113
+ --fd-error: #ff8a7a;
114
+ --fd-error-soft: rgba(255, 138, 122, 0.13);
115
+ --fd-success: #6fd08e;
116
+ --fd-success-soft: rgba(111, 208, 142, 0.14);
117
+ --fd-warning: #f2b55c;
118
+ --fd-warning-soft: rgba(242, 181, 92, 0.13);
119
+ --fd-info: #7db7ff;
120
+ --fd-info-soft: rgba(90, 162, 255, 0.14);
121
+ }
122
+ /* Auto follows the reader's system: the same dark tokens, when it is dark. */
123
+ @media (prefers-color-scheme: dark) {
124
+ :is(.fd-form, .fd-form-dialog)[data-scheme="auto"] {
125
+ color-scheme: dark;
126
+ --fd-text: #e8eaed;
127
+ --fd-muted: #a3a9b2;
128
+ --fd-page: #16191e;
129
+ --fd-surface: #1f2329;
130
+ --fd-border: #3a4048;
131
+ --fd-border-strong: #59616c;
132
+ --fd-accent: #5aa2ff;
133
+ --fd-accent-text: #0b1220;
134
+ --fd-accent-soft: rgba(90, 162, 255, 0.16);
135
+ --fd-focus: #5aa2ff;
136
+ --fd-error: #ff8a7a;
137
+ --fd-error-soft: rgba(255, 138, 122, 0.13);
138
+ --fd-success: #6fd08e;
139
+ --fd-success-soft: rgba(111, 208, 142, 0.14);
140
+ --fd-warning: #f2b55c;
141
+ --fd-warning-soft: rgba(242, 181, 92, 0.13);
142
+ --fd-info: #7db7ff;
143
+ --fd-info-soft: rgba(90, 162, 255, 0.14);
144
+ }
145
+ }
146
+
147
+ /* The page's accent, and the softer and hover shades mixed from it on whatever surface the scheme has. */
148
+ :is(.fd-form, .fd-form-dialog)[data-accent] {
149
+ --fd-accent: var(--fd-look-accent);
150
+ --fd-accent-text: var(--fd-look-accent-text);
151
+ --fd-focus: var(--fd-look-accent);
152
+ --fd-accent-soft: color-mix(in srgb, var(--fd-accent) 12%, var(--fd-surface));
153
+ --fd-accent-hover: color-mix(in srgb, var(--fd-accent) 84%, var(--fd-text));
154
+ }
155
+ /* On a dark page, the accent the viewer lightened, when it had to be, so it still reads there. */
156
+ :is(.fd-form, .fd-form-dialog)[data-scheme="dark"][data-accent] {
157
+ --fd-accent: var(--fd-look-accent-dark);
158
+ --fd-accent-text: var(--fd-look-accent-dark-text);
159
+ --fd-focus: var(--fd-look-accent-dark);
160
+ }
161
+ @media (prefers-color-scheme: dark) {
162
+ :is(.fd-form, .fd-form-dialog)[data-scheme="auto"][data-accent] {
163
+ --fd-accent: var(--fd-look-accent-dark);
164
+ --fd-accent-text: var(--fd-look-accent-dark-text);
165
+ --fd-focus: var(--fd-look-accent-dark);
166
+ }
167
+ }
168
+ :is(.fd-form, .fd-form-dialog)[data-fd-skin="outlined"][data-accent] { --fd-focus-ring: 0 0 0 2px color-mix(in srgb, var(--fd-accent) 22%, transparent); }
169
+ :is(.fd-form, .fd-form-dialog)[data-accent] .fd-button-primary:hover { filter: none; background: var(--fd-accent-hover); border-color: var(--fd-accent-hover); }
170
+ /* A band of the accent under the page's title. */
171
+ .fd-form[data-accent] .fd-page-head { border-block-end: 3px solid var(--fd-accent); padding-block-end: 14px; }
172
+ `;
173
+ //# sourceMappingURL=layout-styles.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"layout-styles.mjs","sourceRoot":"","sources":["../../../../../libs/widgets/src/lib/layout-styles.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,SAAS,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiKnC,CAAC"}
@@ -0,0 +1,20 @@
1
+ import { type Field, type FieldNode } from '@fieldia/core';
2
+ import type { Widget, WidgetContext } from './widgets.mjs';
3
+ /**
4
+ * What a text box shows of its limits: a count of the characters typed
5
+ * against its field's most, under it — "12 / 100", in the warning colour from
6
+ * nine tenths on, and how many are left said to a screen reader once typing
7
+ * pauses — for a page's own field, not a table's cell; and a paragraph's rows,
8
+ * growing as people type unless the page says not to (`autoGrow: false`);
9
+ * a date's, a date and time's or a time's earliest and latest on its input.
10
+ */
11
+ export declare function counted(widget: Widget, { form, name, field, document, labels, locale }: WidgetContext, box: HTMLInputElement | HTMLTextAreaElement): Widget;
12
+ /** A paragraph's rows (`options.rows`), and a way to grow it to what it holds — nothing when it keeps its height. */
13
+ export declare function grower(area: HTMLTextAreaElement, node: FieldNode): () => void;
14
+ /**
15
+ * A date's or a date and time's earliest and latest day (the field's `min`
16
+ * and `max`, counted from today where they say so), or a time's (the node's
17
+ * `min` and `max`, "09:00"), on its input for the browser's picker to keep;
18
+ * and the node's `step` in minutes.
19
+ */
20
+ export declare function bounds(input: HTMLInputElement, field: Field, node: FieldNode): void;
@@ -0,0 +1,20 @@
1
+ import { type Field, type FieldNode } from '@fieldia/core';
2
+ import type { Widget, WidgetContext } from './widgets';
3
+ /**
4
+ * What a text box shows of its limits: a count of the characters typed
5
+ * against its field's most, under it — "12 / 100", in the warning colour from
6
+ * nine tenths on, and how many are left said to a screen reader once typing
7
+ * pauses — for a page's own field, not a table's cell; and a paragraph's rows,
8
+ * growing as people type unless the page says not to (`autoGrow: false`);
9
+ * a date's, a date and time's or a time's earliest and latest on its input.
10
+ */
11
+ export declare function counted(widget: Widget, { form, name, field, document, labels, locale }: WidgetContext, box: HTMLInputElement | HTMLTextAreaElement): Widget;
12
+ /** A paragraph's rows (`options.rows`), and a way to grow it to what it holds — nothing when it keeps its height. */
13
+ export declare function grower(area: HTMLTextAreaElement, node: FieldNode): () => void;
14
+ /**
15
+ * A date's or a date and time's earliest and latest day (the field's `min`
16
+ * and `max`, counted from today where they say so), or a time's (the node's
17
+ * `min` and `max`, "09:00"), on its input for the browser's picker to keep;
18
+ * and the node's `step` in minutes.
19
+ */
20
+ export declare function bounds(input: HTMLInputElement, field: Field, node: FieldNode): void;
@@ -0,0 +1,71 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.counted = counted;
4
+ exports.grower = grower;
5
+ exports.bounds = bounds;
6
+ const core_1 = require("@fieldia/core");
7
+ const kind_parts_1 = require("./kind-parts");
8
+ /**
9
+ * What a text box shows of its limits: a count of the characters typed
10
+ * against its field's most, under it — "12 / 100", in the warning colour from
11
+ * nine tenths on, and how many are left said to a screen reader once typing
12
+ * pauses — for a page's own field, not a table's cell; and a paragraph's rows,
13
+ * growing as people type unless the page says not to (`autoGrow: false`);
14
+ * a date's, a date and time's or a time's earliest and latest on its input.
15
+ */
16
+ function counted(widget, { form, name, field, document, labels, locale }, box) {
17
+ const size = field.type === 'char' || field.type === 'text' ? field.size : undefined;
18
+ if (!size || form.page.fields[name] !== field)
19
+ return widget;
20
+ const make = (0, kind_parts_1.maker)(document);
21
+ const shown = make('div', { class: 'fd-count', 'aria-hidden': 'true' });
22
+ const said = make('div', { class: 'fd-sr-only', 'aria-live': 'polite' });
23
+ let pause;
24
+ return {
25
+ ...widget,
26
+ element: make('div', { class: 'fd-counted' }, widget.element, shown, said),
27
+ update(state) {
28
+ widget.update(state);
29
+ const n = box.value.length;
30
+ (0, kind_parts_1.setText)(shown, `${n} / ${size}`);
31
+ shown.classList.toggle('fd-count-near', n >= size * 0.9);
32
+ (0, kind_parts_1.setHidden)(shown, state.readonly);
33
+ if (document.activeElement !== box)
34
+ return;
35
+ clearTimeout(pause);
36
+ pause = setTimeout(() => (0, kind_parts_1.setText)(said, (0, kind_parts_1.fillIn)((0, kind_parts_1.wordsFor)(labels, locale).charactersLeft, { n: size - n })), 700);
37
+ },
38
+ };
39
+ }
40
+ /** A paragraph's rows (`options.rows`), and a way to grow it to what it holds — nothing when it keeps its height. */
41
+ function grower(area, node) {
42
+ const rows = node.options?.['rows'];
43
+ if (typeof rows === 'number')
44
+ area.rows = rows;
45
+ if (node.options?.['autoGrow'] === false)
46
+ return () => undefined;
47
+ return () => {
48
+ area.style.height = '';
49
+ // Its height takes its borders too: what scrolls, and the borders round it.
50
+ if (area.scrollHeight)
51
+ area.style.height = `${area.scrollHeight + area.offsetHeight - area.clientHeight}px`;
52
+ };
53
+ }
54
+ /**
55
+ * A date's or a date and time's earliest and latest day (the field's `min`
56
+ * and `max`, counted from today where they say so), or a time's (the node's
57
+ * `min` and `max`, "09:00"), on its input for the browser's picker to keep;
58
+ * and the node's `step` in minutes.
59
+ */
60
+ function bounds(input, field, node) {
61
+ const options = node.options ?? {};
62
+ const time = field.type === 'char';
63
+ const limits = time ? [options['min'], options['max']] : 'min' in field ? [field.min, field.max] : [];
64
+ limits.forEach((limit, i) => {
65
+ if (typeof limit === 'string')
66
+ input[i ? 'max' : 'min'] = time ? limit : (0, core_1.dayOf)(limit) + (field.type === 'datetime' ? (i ? 'T23:59' : 'T00:00') : '');
67
+ });
68
+ if (typeof options['step'] === 'number')
69
+ input.step = String(options['step'] * 60);
70
+ }
71
+ //# sourceMappingURL=limits.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"limits.js","sourceRoot":"","sources":["../../../../../libs/widgets/src/lib/limits.ts"],"names":[],"mappings":";;AAYA,0BAqBC;AAGD,wBASC;AAQD,wBAQC;AA7DD,wCAAkE;AAClE,6CAA2E;AAG3E;;;;;;;GAOG;AACH,SAAgB,OAAO,CAAC,MAAc,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAiB,EAAE,GAA2C;IACjJ,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,KAAK,MAAM,IAAI,KAAK,CAAC,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC;IACrF,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,KAAK;QAAE,OAAO,MAAM,CAAC;IAC7D,MAAM,IAAI,GAAG,IAAA,kBAAK,EAAC,QAAQ,CAAC,CAAC;IAC7B,MAAM,KAAK,GAAG,IAAI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