@fieldia/widgets 0.9.2 → 0.11.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 (218) hide show
  1. package/README.md +2 -1
  2. package/package.json +2 -2
  3. package/src/index.d.mts +2 -0
  4. package/src/index.d.ts +2 -0
  5. package/src/index.js +4 -0
  6. package/src/index.js.map +1 -1
  7. package/src/index.mjs +2 -0
  8. package/src/index.mjs.map +1 -1
  9. package/src/lib/address.d.mts +4 -0
  10. package/src/lib/address.d.ts +4 -0
  11. package/src/lib/address.js +105 -0
  12. package/src/lib/address.js.map +1 -0
  13. package/src/lib/address.mjs +100 -0
  14. package/src/lib/address.mjs.map +1 -0
  15. package/src/lib/cards.d.mts +2 -0
  16. package/src/lib/cards.d.ts +2 -0
  17. package/src/lib/cards.js +152 -0
  18. package/src/lib/cards.js.map +1 -0
  19. package/src/lib/cards.mjs +148 -0
  20. package/src/lib/cards.mjs.map +1 -0
  21. package/src/lib/choice-images.d.mts +2 -0
  22. package/src/lib/choice-images.d.ts +2 -0
  23. package/src/lib/choice-images.js +99 -0
  24. package/src/lib/choice-images.js.map +1 -0
  25. package/src/lib/choice-images.mjs +95 -0
  26. package/src/lib/choice-images.mjs.map +1 -0
  27. package/src/lib/choice-rules.d.mts +22 -0
  28. package/src/lib/choice-rules.d.ts +22 -0
  29. package/src/lib/choice-rules.js +46 -0
  30. package/src/lib/choice-rules.js.map +1 -0
  31. package/src/lib/choice-rules.mjs +41 -0
  32. package/src/lib/choice-rules.mjs.map +1 -0
  33. package/src/lib/choice-tags.d.mts +17 -0
  34. package/src/lib/choice-tags.d.ts +17 -0
  35. package/src/lib/choice-tags.js +187 -0
  36. package/src/lib/choice-tags.js.map +1 -0
  37. package/src/lib/choice-tags.mjs +182 -0
  38. package/src/lib/choice-tags.mjs.map +1 -0
  39. package/src/lib/choices-from.d.mts +8 -0
  40. package/src/lib/choices-from.d.ts +8 -0
  41. package/src/lib/choices-from.js +63 -0
  42. package/src/lib/choices-from.js.map +1 -0
  43. package/src/lib/choices-from.mjs +60 -0
  44. package/src/lib/choices-from.mjs.map +1 -0
  45. package/src/lib/display.js +4 -3
  46. package/src/lib/display.js.map +1 -1
  47. package/src/lib/display.mjs +5 -4
  48. package/src/lib/display.mjs.map +1 -1
  49. package/src/lib/extras.js +8 -4
  50. package/src/lib/extras.js.map +1 -1
  51. package/src/lib/extras.mjs +8 -4
  52. package/src/lib/extras.mjs.map +1 -1
  53. package/src/lib/files.d.mts +2 -0
  54. package/src/lib/files.d.ts +2 -0
  55. package/src/lib/files.js +236 -78
  56. package/src/lib/files.js.map +1 -1
  57. package/src/lib/files.mjs +235 -78
  58. package/src/lib/files.mjs.map +1 -1
  59. package/src/lib/focus-trap.d.mts +7 -0
  60. package/src/lib/focus-trap.d.ts +7 -0
  61. package/src/lib/focus-trap.js +26 -0
  62. package/src/lib/focus-trap.js.map +1 -0
  63. package/src/lib/focus-trap.mjs +23 -0
  64. package/src/lib/focus-trap.mjs.map +1 -0
  65. package/src/lib/icons.js +1 -0
  66. package/src/lib/icons.js.map +1 -1
  67. package/src/lib/icons.mjs +1 -0
  68. package/src/lib/icons.mjs.map +1 -1
  69. package/src/lib/kind-parts.d.mts +56 -0
  70. package/src/lib/kind-parts.d.ts +56 -0
  71. package/src/lib/kind-parts.js +121 -0
  72. package/src/lib/kind-parts.js.map +1 -0
  73. package/src/lib/kind-parts.mjs +107 -0
  74. package/src/lib/kind-parts.mjs.map +1 -0
  75. package/src/lib/labels.d.mts +85 -0
  76. package/src/lib/labels.d.ts +85 -0
  77. package/src/lib/labels.js +111 -189
  78. package/src/lib/labels.js.map +1 -1
  79. package/src/lib/labels.mjs +111 -189
  80. package/src/lib/labels.mjs.map +1 -1
  81. package/src/lib/layout-styles.d.mts +11 -0
  82. package/src/lib/layout-styles.d.ts +11 -0
  83. package/src/lib/layout-styles.js +178 -0
  84. package/src/lib/layout-styles.js.map +1 -0
  85. package/src/lib/layout-styles.mjs +175 -0
  86. package/src/lib/layout-styles.mjs.map +1 -0
  87. package/src/lib/limits.d.mts +20 -0
  88. package/src/lib/limits.d.ts +20 -0
  89. package/src/lib/limits.js +71 -0
  90. package/src/lib/limits.js.map +1 -0
  91. package/src/lib/limits.mjs +66 -0
  92. package/src/lib/limits.mjs.map +1 -0
  93. package/src/lib/line-moves.d.mts +8 -0
  94. package/src/lib/line-moves.d.ts +8 -0
  95. package/src/lib/line-moves.js +20 -0
  96. package/src/lib/line-moves.js.map +1 -0
  97. package/src/lib/line-moves.mjs +17 -0
  98. package/src/lib/line-moves.mjs.map +1 -0
  99. package/src/lib/lines.js +85 -7
  100. package/src/lib/lines.js.map +1 -1
  101. package/src/lib/lines.mjs +86 -8
  102. package/src/lib/lines.mjs.map +1 -1
  103. package/src/lib/locales/all.d.mts +8 -0
  104. package/src/lib/locales/all.d.ts +8 -0
  105. package/src/lib/locales/all.js +13 -0
  106. package/src/lib/locales/all.js.map +1 -0
  107. package/src/lib/locales/all.mjs +10 -0
  108. package/src/lib/locales/all.mjs.map +1 -0
  109. package/src/lib/locales/ar.d.mts +3 -0
  110. package/src/lib/locales/ar.d.ts +3 -0
  111. package/src/lib/locales/ar.js +108 -0
  112. package/src/lib/locales/ar.js.map +1 -0
  113. package/src/lib/locales/ar.mjs +105 -0
  114. package/src/lib/locales/ar.mjs.map +1 -0
  115. package/src/lib/locales/de.d.mts +3 -0
  116. package/src/lib/locales/de.d.ts +3 -0
  117. package/src/lib/locales/de.js +108 -0
  118. package/src/lib/locales/de.js.map +1 -0
  119. package/src/lib/locales/de.mjs +105 -0
  120. package/src/lib/locales/de.mjs.map +1 -0
  121. package/src/lib/locales/fr.d.mts +3 -0
  122. package/src/lib/locales/fr.d.ts +3 -0
  123. package/src/lib/locales/fr.js +108 -0
  124. package/src/lib/locales/fr.js.map +1 -0
  125. package/src/lib/locales/fr.mjs +105 -0
  126. package/src/lib/locales/fr.mjs.map +1 -0
  127. package/src/lib/matrix.d.mts +10 -0
  128. package/src/lib/matrix.d.ts +10 -0
  129. package/src/lib/matrix.js +86 -0
  130. package/src/lib/matrix.js.map +1 -0
  131. package/src/lib/matrix.mjs +82 -0
  132. package/src/lib/matrix.mjs.map +1 -0
  133. package/src/lib/numbers.d.mts +7 -0
  134. package/src/lib/numbers.d.ts +7 -0
  135. package/src/lib/numbers.js +15 -0
  136. package/src/lib/numbers.js.map +1 -1
  137. package/src/lib/numbers.mjs +14 -0
  138. package/src/lib/numbers.mjs.map +1 -1
  139. package/src/lib/progress.js +8 -4
  140. package/src/lib/progress.js.map +1 -1
  141. package/src/lib/progress.mjs +8 -4
  142. package/src/lib/progress.mjs.map +1 -1
  143. package/src/lib/ranking.d.mts +2 -0
  144. package/src/lib/ranking.d.ts +2 -0
  145. package/src/lib/ranking.js +172 -0
  146. package/src/lib/ranking.js.map +1 -0
  147. package/src/lib/ranking.mjs +168 -0
  148. package/src/lib/ranking.mjs.map +1 -0
  149. package/src/lib/relations.d.mts +1 -1
  150. package/src/lib/relations.d.ts +1 -1
  151. package/src/lib/relations.js +43 -18
  152. package/src/lib/relations.js.map +1 -1
  153. package/src/lib/relations.mjs +43 -18
  154. package/src/lib/relations.mjs.map +1 -1
  155. package/src/lib/shuffle.d.mts +7 -0
  156. package/src/lib/shuffle.d.ts +7 -0
  157. package/src/lib/shuffle.js +60 -0
  158. package/src/lib/shuffle.js.map +1 -0
  159. package/src/lib/shuffle.mjs +57 -0
  160. package/src/lib/shuffle.mjs.map +1 -0
  161. package/src/lib/signature.d.mts +2 -0
  162. package/src/lib/signature.d.ts +2 -0
  163. package/src/lib/signature.js +223 -0
  164. package/src/lib/signature.js.map +1 -0
  165. package/src/lib/signature.mjs +219 -0
  166. package/src/lib/signature.mjs.map +1 -0
  167. package/src/lib/slider.d.mts +10 -0
  168. package/src/lib/slider.d.ts +10 -0
  169. package/src/lib/slider.js +57 -0
  170. package/src/lib/slider.js.map +1 -0
  171. package/src/lib/slider.mjs +53 -0
  172. package/src/lib/slider.mjs.map +1 -0
  173. package/src/lib/styles-choices.d.mts +7 -0
  174. package/src/lib/styles-choices.d.ts +7 -0
  175. package/src/lib/styles-choices.js +47 -0
  176. package/src/lib/styles-choices.js.map +1 -0
  177. package/src/lib/styles-choices.mjs +44 -0
  178. package/src/lib/styles-choices.mjs.map +1 -0
  179. package/src/lib/styles-inputs.d.mts +9 -0
  180. package/src/lib/styles-inputs.d.ts +9 -0
  181. package/src/lib/styles-inputs.js +41 -0
  182. package/src/lib/styles-inputs.js.map +1 -0
  183. package/src/lib/styles-inputs.mjs +38 -0
  184. package/src/lib/styles-inputs.mjs.map +1 -0
  185. package/src/lib/styles-kinds.d.mts +7 -0
  186. package/src/lib/styles-kinds.d.ts +7 -0
  187. package/src/lib/styles-kinds.js +119 -0
  188. package/src/lib/styles-kinds.js.map +1 -0
  189. package/src/lib/styles-kinds.mjs +116 -0
  190. package/src/lib/styles-kinds.mjs.map +1 -0
  191. package/src/lib/styles-parts.d.mts +16 -0
  192. package/src/lib/styles-parts.d.ts +16 -0
  193. package/src/lib/styles-parts.js +69 -0
  194. package/src/lib/styles-parts.js.map +1 -0
  195. package/src/lib/styles-parts.mjs +66 -0
  196. package/src/lib/styles-parts.mjs.map +1 -0
  197. package/src/lib/styles.d.mts +10 -12
  198. package/src/lib/styles.d.ts +10 -12
  199. package/src/lib/styles.js +259 -64
  200. package/src/lib/styles.js.map +1 -1
  201. package/src/lib/styles.mjs +258 -63
  202. package/src/lib/styles.mjs.map +1 -1
  203. package/src/lib/units.d.mts +10 -0
  204. package/src/lib/units.d.ts +10 -0
  205. package/src/lib/units.js +19 -0
  206. package/src/lib/units.js.map +1 -0
  207. package/src/lib/units.mjs +16 -0
  208. package/src/lib/units.mjs.map +1 -0
  209. package/src/lib/widgets.js +215 -57
  210. package/src/lib/widgets.js.map +1 -1
  211. package/src/lib/widgets.mjs +215 -57
  212. package/src/lib/widgets.mjs.map +1 -1
  213. package/src/lib/yes-no.d.mts +9 -0
  214. package/src/lib/yes-no.d.ts +9 -0
  215. package/src/lib/yes-no.js +58 -0
  216. package/src/lib/yes-no.js.map +1 -0
  217. package/src/lib/yes-no.mjs +54 -0
  218. package/src/lib/yes-no.mjs.map +1 -0
@@ -0,0 +1,7 @@
1
+ /**
2
+ * The choice kinds' details: options in columns or in a row, the words that
3
+ * say a limit is reached, pictures' sizes and fit, a ranking's top few, and a
4
+ * matrix whose rows become cards on a phone. A yes or no takes the points'
5
+ * look. Appended to Fieldia's stylesheet, with logical properties.
6
+ */
7
+ export declare const CHOICES_CSS = "\n.fd-yes-no button { min-width: 76px; }\n.fd-choices-columns { display: grid; grid-template-columns: repeat(var(--fd-choice-columns), minmax(0, 1fr)); }\n.fd-choices-row { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }\n.fd-choice-limit { grid-column: 1 / -1; flex-basis: 100%; font-size: 12.5px; color: var(--fd-muted); }\n.fd-choice-limit:empty { display: none; }\n.fd-image-choices[data-size=\"small\"] { --fd-card: 96px; }\n.fd-image-choices[data-size=\"large\"] { --fd-card: 210px; }\n.fd-image-choices[data-size] { grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--fd-card, 130px)), 1fr)); }\n.fd-image-choices[data-fit=\"whole\"] img { object-fit: contain; }\n.fd-image-choices-bare .fd-image-card-words { position: absolute; inset-block-start: 6px; inset-inline-start: 6px; padding: 0; font-size: 0; }\n/* A dropdown that searches: a chevron says it is one. */\n.fd-choice-search .fd-combo::after {\n content: \"\"; position: absolute; inset-inline-end: 12px; width: 6px; height: 6px; margin-block-start: -4px; pointer-events: none;\n border: solid var(--fd-muted); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg);\n}\n.fd-rank-pool { display: flex; flex-wrap: wrap; gap: 8px; margin-block: 6px 10px; }\n.fd-rank-pick {\n min-height: 32px; padding: 4px 12px; font: inherit; color: inherit; cursor: pointer;\n background: var(--fd-surface); border: 1px dashed var(--fd-border-strong); border-radius: 999px;\n}\n.fd-rank-pick:disabled { opacity: 0.5; cursor: default; }\n.fd-rank-list:empty { display: none; }\n.fd-rank-keep { margin-block-start: 8px; }\n.fd-matrix-pick { display: inline-flex; align-items: center; gap: 8px; }\n.fd-matrix-column { display: none; }\n@container (max-width: 520px) {\n .fd-choices-columns { grid-template-columns: minmax(0, 1fr); }\n .fd-image-choices.fd-image-choices { grid-auto-flow: row; grid-template-columns: repeat(auto-fill, minmax(min(100%, 130px), 1fr)); }\n .fd-matrix-table, .fd-matrix-table :is(tbody, tr, th, td) { display: block; }\n .fd-matrix-table thead { display: none; }\n .fd-matrix-table tr { padding: 10px 12px; margin-block-end: 10px; border: 1px solid var(--fd-border); border-radius: var(--fd-radius); }\n .fd-matrix-table :is(th, td) { padding: 2px 0; border: 0; text-align: start; }\n .fd-matrix-pick { min-height: 32px; }\n .fd-matrix-column { display: inline; }\n}\n";
@@ -0,0 +1,7 @@
1
+ /**
2
+ * The choice kinds' details: options in columns or in a row, the words that
3
+ * say a limit is reached, pictures' sizes and fit, a ranking's top few, and a
4
+ * matrix whose rows become cards on a phone. A yes or no takes the points'
5
+ * look. Appended to Fieldia's stylesheet, with logical properties.
6
+ */
7
+ export declare const CHOICES_CSS = "\n.fd-yes-no button { min-width: 76px; }\n.fd-choices-columns { display: grid; grid-template-columns: repeat(var(--fd-choice-columns), minmax(0, 1fr)); }\n.fd-choices-row { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }\n.fd-choice-limit { grid-column: 1 / -1; flex-basis: 100%; font-size: 12.5px; color: var(--fd-muted); }\n.fd-choice-limit:empty { display: none; }\n.fd-image-choices[data-size=\"small\"] { --fd-card: 96px; }\n.fd-image-choices[data-size=\"large\"] { --fd-card: 210px; }\n.fd-image-choices[data-size] { grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--fd-card, 130px)), 1fr)); }\n.fd-image-choices[data-fit=\"whole\"] img { object-fit: contain; }\n.fd-image-choices-bare .fd-image-card-words { position: absolute; inset-block-start: 6px; inset-inline-start: 6px; padding: 0; font-size: 0; }\n/* A dropdown that searches: a chevron says it is one. */\n.fd-choice-search .fd-combo::after {\n content: \"\"; position: absolute; inset-inline-end: 12px; width: 6px; height: 6px; margin-block-start: -4px; pointer-events: none;\n border: solid var(--fd-muted); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg);\n}\n.fd-rank-pool { display: flex; flex-wrap: wrap; gap: 8px; margin-block: 6px 10px; }\n.fd-rank-pick {\n min-height: 32px; padding: 4px 12px; font: inherit; color: inherit; cursor: pointer;\n background: var(--fd-surface); border: 1px dashed var(--fd-border-strong); border-radius: 999px;\n}\n.fd-rank-pick:disabled { opacity: 0.5; cursor: default; }\n.fd-rank-list:empty { display: none; }\n.fd-rank-keep { margin-block-start: 8px; }\n.fd-matrix-pick { display: inline-flex; align-items: center; gap: 8px; }\n.fd-matrix-column { display: none; }\n@container (max-width: 520px) {\n .fd-choices-columns { grid-template-columns: minmax(0, 1fr); }\n .fd-image-choices.fd-image-choices { grid-auto-flow: row; grid-template-columns: repeat(auto-fill, minmax(min(100%, 130px), 1fr)); }\n .fd-matrix-table, .fd-matrix-table :is(tbody, tr, th, td) { display: block; }\n .fd-matrix-table thead { display: none; }\n .fd-matrix-table tr { padding: 10px 12px; margin-block-end: 10px; border: 1px solid var(--fd-border); border-radius: var(--fd-radius); }\n .fd-matrix-table :is(th, td) { padding: 2px 0; border: 0; text-align: start; }\n .fd-matrix-pick { min-height: 32px; }\n .fd-matrix-column { display: inline; }\n}\n";
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CHOICES_CSS = void 0;
4
+ /**
5
+ * The choice kinds' details: options in columns or in a row, the words that
6
+ * say a limit is reached, pictures' sizes and fit, a ranking's top few, and a
7
+ * matrix whose rows become cards on a phone. A yes or no takes the points'
8
+ * look. Appended to Fieldia's stylesheet, with logical properties.
9
+ */
10
+ exports.CHOICES_CSS = `
11
+ .fd-yes-no button { min-width: 76px; }
12
+ .fd-choices-columns { display: grid; grid-template-columns: repeat(var(--fd-choice-columns), minmax(0, 1fr)); }
13
+ .fd-choices-row { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
14
+ .fd-choice-limit { grid-column: 1 / -1; flex-basis: 100%; font-size: 12.5px; color: var(--fd-muted); }
15
+ .fd-choice-limit:empty { display: none; }
16
+ .fd-image-choices[data-size="small"] { --fd-card: 96px; }
17
+ .fd-image-choices[data-size="large"] { --fd-card: 210px; }
18
+ .fd-image-choices[data-size] { grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--fd-card, 130px)), 1fr)); }
19
+ .fd-image-choices[data-fit="whole"] img { object-fit: contain; }
20
+ .fd-image-choices-bare .fd-image-card-words { position: absolute; inset-block-start: 6px; inset-inline-start: 6px; padding: 0; font-size: 0; }
21
+ /* A dropdown that searches: a chevron says it is one. */
22
+ .fd-choice-search .fd-combo::after {
23
+ content: ""; position: absolute; inset-inline-end: 12px; width: 6px; height: 6px; margin-block-start: -4px; pointer-events: none;
24
+ border: solid var(--fd-muted); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg);
25
+ }
26
+ .fd-rank-pool { display: flex; flex-wrap: wrap; gap: 8px; margin-block: 6px 10px; }
27
+ .fd-rank-pick {
28
+ min-height: 32px; padding: 4px 12px; font: inherit; color: inherit; cursor: pointer;
29
+ background: var(--fd-surface); border: 1px dashed var(--fd-border-strong); border-radius: 999px;
30
+ }
31
+ .fd-rank-pick:disabled { opacity: 0.5; cursor: default; }
32
+ .fd-rank-list:empty { display: none; }
33
+ .fd-rank-keep { margin-block-start: 8px; }
34
+ .fd-matrix-pick { display: inline-flex; align-items: center; gap: 8px; }
35
+ .fd-matrix-column { display: none; }
36
+ @container (max-width: 520px) {
37
+ .fd-choices-columns { grid-template-columns: minmax(0, 1fr); }
38
+ .fd-image-choices.fd-image-choices { grid-auto-flow: row; grid-template-columns: repeat(auto-fill, minmax(min(100%, 130px), 1fr)); }
39
+ .fd-matrix-table, .fd-matrix-table :is(tbody, tr, th, td) { display: block; }
40
+ .fd-matrix-table thead { display: none; }
41
+ .fd-matrix-table tr { padding: 10px 12px; margin-block-end: 10px; border: 1px solid var(--fd-border); border-radius: var(--fd-radius); }
42
+ .fd-matrix-table :is(th, td) { padding: 2px 0; border: 0; text-align: start; }
43
+ .fd-matrix-pick { min-height: 32px; }
44
+ .fd-matrix-column { display: inline; }
45
+ }
46
+ `;
47
+ //# sourceMappingURL=styles-choices.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles-choices.js","sourceRoot":"","sources":["../../../../../libs/widgets/src/lib/styles-choices.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACU,QAAA,WAAW,GAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoCpC,CAAC"}
@@ -0,0 +1,44 @@
1
+ /**
2
+ * The choice kinds' details: options in columns or in a row, the words that
3
+ * say a limit is reached, pictures' sizes and fit, a ranking's top few, and a
4
+ * matrix whose rows become cards on a phone. A yes or no takes the points'
5
+ * look. Appended to Fieldia's stylesheet, with logical properties.
6
+ */
7
+ export const CHOICES_CSS = /* css */ `
8
+ .fd-yes-no button { min-width: 76px; }
9
+ .fd-choices-columns { display: grid; grid-template-columns: repeat(var(--fd-choice-columns), minmax(0, 1fr)); }
10
+ .fd-choices-row { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
11
+ .fd-choice-limit { grid-column: 1 / -1; flex-basis: 100%; font-size: 12.5px; color: var(--fd-muted); }
12
+ .fd-choice-limit:empty { display: none; }
13
+ .fd-image-choices[data-size="small"] { --fd-card: 96px; }
14
+ .fd-image-choices[data-size="large"] { --fd-card: 210px; }
15
+ .fd-image-choices[data-size] { grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--fd-card, 130px)), 1fr)); }
16
+ .fd-image-choices[data-fit="whole"] img { object-fit: contain; }
17
+ .fd-image-choices-bare .fd-image-card-words { position: absolute; inset-block-start: 6px; inset-inline-start: 6px; padding: 0; font-size: 0; }
18
+ /* A dropdown that searches: a chevron says it is one. */
19
+ .fd-choice-search .fd-combo::after {
20
+ content: ""; position: absolute; inset-inline-end: 12px; width: 6px; height: 6px; margin-block-start: -4px; pointer-events: none;
21
+ border: solid var(--fd-muted); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg);
22
+ }
23
+ .fd-rank-pool { display: flex; flex-wrap: wrap; gap: 8px; margin-block: 6px 10px; }
24
+ .fd-rank-pick {
25
+ min-height: 32px; padding: 4px 12px; font: inherit; color: inherit; cursor: pointer;
26
+ background: var(--fd-surface); border: 1px dashed var(--fd-border-strong); border-radius: 999px;
27
+ }
28
+ .fd-rank-pick:disabled { opacity: 0.5; cursor: default; }
29
+ .fd-rank-list:empty { display: none; }
30
+ .fd-rank-keep { margin-block-start: 8px; }
31
+ .fd-matrix-pick { display: inline-flex; align-items: center; gap: 8px; }
32
+ .fd-matrix-column { display: none; }
33
+ @container (max-width: 520px) {
34
+ .fd-choices-columns { grid-template-columns: minmax(0, 1fr); }
35
+ .fd-image-choices.fd-image-choices { grid-auto-flow: row; grid-template-columns: repeat(auto-fill, minmax(min(100%, 130px), 1fr)); }
36
+ .fd-matrix-table, .fd-matrix-table :is(tbody, tr, th, td) { display: block; }
37
+ .fd-matrix-table thead { display: none; }
38
+ .fd-matrix-table tr { padding: 10px 12px; margin-block-end: 10px; border: 1px solid var(--fd-border); border-radius: var(--fd-radius); }
39
+ .fd-matrix-table :is(th, td) { padding: 2px 0; border: 0; text-align: start; }
40
+ .fd-matrix-pick { min-height: 32px; }
41
+ .fd-matrix-column { display: inline; }
42
+ }
43
+ `;
44
+ //# sourceMappingURL=styles-choices.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles-choices.mjs","sourceRoot":"","sources":["../../../../../libs/widgets/src/lib/styles-choices.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,SAAS,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoCpC,CAAC"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * The text, number and date inputs' part of the stylesheet: a count of
3
+ * characters under a box, a number's unit and an amount's currency inside
4
+ * its box, a rating's hearts and thumbs, words at a slider's ends, an NPS
5
+ * scale's colours. Scoped
6
+ * and written with logical properties as the rest of it is; it comes before
7
+ * the question kinds' part.
8
+ */
9
+ export declare const INPUTS_CSS = "\n/* ---- inputs' details ------------------------------------------------------- */\n.fd-counted { display: grid; gap: 2px; min-width: 0; }\n/* \"12 / 100\" reads so on a right-to-left page too. */\n.fd-count { justify-self: end; direction: ltr; unicode-bidi: isolate; font-size: 12px; color: var(--fd-muted); font-variant-numeric: tabular-nums; }\n.fd-count-near { color: var(--fd-warning); font-weight: 600; }\n/* A unit inside the number's box, at its start or end; the box keeps room for it. */\n.fd-number:not(.fd-currency-picked) { position: relative; display: block; }\n.fd-number > .fd-unit { position: absolute; inset-block: 0; display: flex; align-items: center; pointer-events: none; color: var(--fd-muted); }\n.fd-number > .fd-unit:first-child { inset-inline-start: var(--fd-pad-x); }\n.fd-number > .fd-unit:last-child { inset-inline-end: var(--fd-pad-x); }\n/* A rating of hearts or thumbs up: grey until picked, then filled. */\n.fd-rating-heart button.fd-on { color: #e5484d; }\n.fd-rating-thumb button.fd-on { color: var(--fd-accent); }\n.fd-rating .fd-icon { display: block; width: 1em; height: 1em; }\n.fd-rating .fd-on .fd-icon { fill: currentColor; }\n/* Words under a slider's ends, each under its own end. */\n.fd-slider-word { display: block; max-width: 12em; }\n.fd-slider-last { text-align: end; }\n/* An NPS scale: 0\u20136, 7\u20138 and 9\u201310 tinted red, amber and green in either scheme, and set apart by a gap. */\n.fd-nps [data-tone=\"low\"] { --fd-tone: var(--fd-error); --fd-tone-soft: var(--fd-error-soft); }\n.fd-nps [data-tone=\"mid\"] { --fd-tone: var(--fd-warning); --fd-tone-soft: var(--fd-warning-soft); }\n.fd-nps [data-tone=\"high\"] { --fd-tone: var(--fd-success); --fd-tone-soft: var(--fd-success-soft); }\n.fd-nps button { background: var(--fd-tone-soft); border-color: var(--fd-tone); color: var(--fd-tone); font-weight: 600; }\n.fd-nps button.fd-on { background: var(--fd-tone); border-color: var(--fd-tone); color: var(--fd-surface); }\n.fd-nps [data-value=\"7\"], .fd-nps [data-value=\"9\"] { margin-inline-start: 8px; }\n/* A rating's or a scale's end words under its first and last points, not the field's edges. */\n.fd-choices-box > .fd-scale-box { justify-self: start; }\n";
@@ -0,0 +1,9 @@
1
+ /**
2
+ * The text, number and date inputs' part of the stylesheet: a count of
3
+ * characters under a box, a number's unit and an amount's currency inside
4
+ * its box, a rating's hearts and thumbs, words at a slider's ends, an NPS
5
+ * scale's colours. Scoped
6
+ * and written with logical properties as the rest of it is; it comes before
7
+ * the question kinds' part.
8
+ */
9
+ export declare const INPUTS_CSS = "\n/* ---- inputs' details ------------------------------------------------------- */\n.fd-counted { display: grid; gap: 2px; min-width: 0; }\n/* \"12 / 100\" reads so on a right-to-left page too. */\n.fd-count { justify-self: end; direction: ltr; unicode-bidi: isolate; font-size: 12px; color: var(--fd-muted); font-variant-numeric: tabular-nums; }\n.fd-count-near { color: var(--fd-warning); font-weight: 600; }\n/* A unit inside the number's box, at its start or end; the box keeps room for it. */\n.fd-number:not(.fd-currency-picked) { position: relative; display: block; }\n.fd-number > .fd-unit { position: absolute; inset-block: 0; display: flex; align-items: center; pointer-events: none; color: var(--fd-muted); }\n.fd-number > .fd-unit:first-child { inset-inline-start: var(--fd-pad-x); }\n.fd-number > .fd-unit:last-child { inset-inline-end: var(--fd-pad-x); }\n/* A rating of hearts or thumbs up: grey until picked, then filled. */\n.fd-rating-heart button.fd-on { color: #e5484d; }\n.fd-rating-thumb button.fd-on { color: var(--fd-accent); }\n.fd-rating .fd-icon { display: block; width: 1em; height: 1em; }\n.fd-rating .fd-on .fd-icon { fill: currentColor; }\n/* Words under a slider's ends, each under its own end. */\n.fd-slider-word { display: block; max-width: 12em; }\n.fd-slider-last { text-align: end; }\n/* An NPS scale: 0\u20136, 7\u20138 and 9\u201310 tinted red, amber and green in either scheme, and set apart by a gap. */\n.fd-nps [data-tone=\"low\"] { --fd-tone: var(--fd-error); --fd-tone-soft: var(--fd-error-soft); }\n.fd-nps [data-tone=\"mid\"] { --fd-tone: var(--fd-warning); --fd-tone-soft: var(--fd-warning-soft); }\n.fd-nps [data-tone=\"high\"] { --fd-tone: var(--fd-success); --fd-tone-soft: var(--fd-success-soft); }\n.fd-nps button { background: var(--fd-tone-soft); border-color: var(--fd-tone); color: var(--fd-tone); font-weight: 600; }\n.fd-nps button.fd-on { background: var(--fd-tone); border-color: var(--fd-tone); color: var(--fd-surface); }\n.fd-nps [data-value=\"7\"], .fd-nps [data-value=\"9\"] { margin-inline-start: 8px; }\n/* A rating's or a scale's end words under its first and last points, not the field's edges. */\n.fd-choices-box > .fd-scale-box { justify-self: start; }\n";
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.INPUTS_CSS = void 0;
4
+ /**
5
+ * The text, number and date inputs' part of the stylesheet: a count of
6
+ * characters under a box, a number's unit and an amount's currency inside
7
+ * its box, a rating's hearts and thumbs, words at a slider's ends, an NPS
8
+ * scale's colours. Scoped
9
+ * and written with logical properties as the rest of it is; it comes before
10
+ * the question kinds' part.
11
+ */
12
+ exports.INPUTS_CSS = `
13
+ /* ---- inputs' details ------------------------------------------------------- */
14
+ .fd-counted { display: grid; gap: 2px; min-width: 0; }
15
+ /* "12 / 100" reads so on a right-to-left page too. */
16
+ .fd-count { justify-self: end; direction: ltr; unicode-bidi: isolate; font-size: 12px; color: var(--fd-muted); font-variant-numeric: tabular-nums; }
17
+ .fd-count-near { color: var(--fd-warning); font-weight: 600; }
18
+ /* A unit inside the number's box, at its start or end; the box keeps room for it. */
19
+ .fd-number:not(.fd-currency-picked) { position: relative; display: block; }
20
+ .fd-number > .fd-unit { position: absolute; inset-block: 0; display: flex; align-items: center; pointer-events: none; color: var(--fd-muted); }
21
+ .fd-number > .fd-unit:first-child { inset-inline-start: var(--fd-pad-x); }
22
+ .fd-number > .fd-unit:last-child { inset-inline-end: var(--fd-pad-x); }
23
+ /* A rating of hearts or thumbs up: grey until picked, then filled. */
24
+ .fd-rating-heart button.fd-on { color: #e5484d; }
25
+ .fd-rating-thumb button.fd-on { color: var(--fd-accent); }
26
+ .fd-rating .fd-icon { display: block; width: 1em; height: 1em; }
27
+ .fd-rating .fd-on .fd-icon { fill: currentColor; }
28
+ /* Words under a slider's ends, each under its own end. */
29
+ .fd-slider-word { display: block; max-width: 12em; }
30
+ .fd-slider-last { text-align: end; }
31
+ /* An NPS scale: 0–6, 7–8 and 9–10 tinted red, amber and green in either scheme, and set apart by a gap. */
32
+ .fd-nps [data-tone="low"] { --fd-tone: var(--fd-error); --fd-tone-soft: var(--fd-error-soft); }
33
+ .fd-nps [data-tone="mid"] { --fd-tone: var(--fd-warning); --fd-tone-soft: var(--fd-warning-soft); }
34
+ .fd-nps [data-tone="high"] { --fd-tone: var(--fd-success); --fd-tone-soft: var(--fd-success-soft); }
35
+ .fd-nps button { background: var(--fd-tone-soft); border-color: var(--fd-tone); color: var(--fd-tone); font-weight: 600; }
36
+ .fd-nps button.fd-on { background: var(--fd-tone); border-color: var(--fd-tone); color: var(--fd-surface); }
37
+ .fd-nps [data-value="7"], .fd-nps [data-value="9"] { margin-inline-start: 8px; }
38
+ /* A rating's or a scale's end words under its first and last points, not the field's edges. */
39
+ .fd-choices-box > .fd-scale-box { justify-self: start; }
40
+ `;
41
+ //# sourceMappingURL=styles-inputs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles-inputs.js","sourceRoot":"","sources":["../../../../../libs/widgets/src/lib/styles-inputs.ts"],"names":[],"mappings":";;;AAAA;;;;;;;GAOG;AACU,QAAA,UAAU,GAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4BnC,CAAC"}
@@ -0,0 +1,38 @@
1
+ /**
2
+ * The text, number and date inputs' part of the stylesheet: a count of
3
+ * characters under a box, a number's unit and an amount's currency inside
4
+ * its box, a rating's hearts and thumbs, words at a slider's ends, an NPS
5
+ * scale's colours. Scoped
6
+ * and written with logical properties as the rest of it is; it comes before
7
+ * the question kinds' part.
8
+ */
9
+ export const INPUTS_CSS = /* css */ `
10
+ /* ---- inputs' details ------------------------------------------------------- */
11
+ .fd-counted { display: grid; gap: 2px; min-width: 0; }
12
+ /* "12 / 100" reads so on a right-to-left page too. */
13
+ .fd-count { justify-self: end; direction: ltr; unicode-bidi: isolate; font-size: 12px; color: var(--fd-muted); font-variant-numeric: tabular-nums; }
14
+ .fd-count-near { color: var(--fd-warning); font-weight: 600; }
15
+ /* A unit inside the number's box, at its start or end; the box keeps room for it. */
16
+ .fd-number:not(.fd-currency-picked) { position: relative; display: block; }
17
+ .fd-number > .fd-unit { position: absolute; inset-block: 0; display: flex; align-items: center; pointer-events: none; color: var(--fd-muted); }
18
+ .fd-number > .fd-unit:first-child { inset-inline-start: var(--fd-pad-x); }
19
+ .fd-number > .fd-unit:last-child { inset-inline-end: var(--fd-pad-x); }
20
+ /* A rating of hearts or thumbs up: grey until picked, then filled. */
21
+ .fd-rating-heart button.fd-on { color: #e5484d; }
22
+ .fd-rating-thumb button.fd-on { color: var(--fd-accent); }
23
+ .fd-rating .fd-icon { display: block; width: 1em; height: 1em; }
24
+ .fd-rating .fd-on .fd-icon { fill: currentColor; }
25
+ /* Words under a slider's ends, each under its own end. */
26
+ .fd-slider-word { display: block; max-width: 12em; }
27
+ .fd-slider-last { text-align: end; }
28
+ /* An NPS scale: 0–6, 7–8 and 9–10 tinted red, amber and green in either scheme, and set apart by a gap. */
29
+ .fd-nps [data-tone="low"] { --fd-tone: var(--fd-error); --fd-tone-soft: var(--fd-error-soft); }
30
+ .fd-nps [data-tone="mid"] { --fd-tone: var(--fd-warning); --fd-tone-soft: var(--fd-warning-soft); }
31
+ .fd-nps [data-tone="high"] { --fd-tone: var(--fd-success); --fd-tone-soft: var(--fd-success-soft); }
32
+ .fd-nps button { background: var(--fd-tone-soft); border-color: var(--fd-tone); color: var(--fd-tone); font-weight: 600; }
33
+ .fd-nps button.fd-on { background: var(--fd-tone); border-color: var(--fd-tone); color: var(--fd-surface); }
34
+ .fd-nps [data-value="7"], .fd-nps [data-value="9"] { margin-inline-start: 8px; }
35
+ /* A rating's or a scale's end words under its first and last points, not the field's edges. */
36
+ .fd-choices-box > .fd-scale-box { justify-self: start; }
37
+ `;
38
+ //# sourceMappingURL=styles-inputs.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles-inputs.mjs","sourceRoot":"","sources":["../../../../../libs/widgets/src/lib/styles-inputs.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,SAAS,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4BnC,CAAC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * The question kinds' part of the stylesheet: a signature pad, a slider, tags
3
+ * from a list, pictures to choose from, a ranking, an address and a repeating
4
+ * group of cards. Appended to Fieldia's stylesheet, scoped and written with
5
+ * logical properties as the rest of it is.
6
+ */
7
+ export declare const KINDS_CSS = "\n/* ---- question kinds -------------------------------------------------------- */\n/* A signature: a pad with a line to sign on, a box to type a name in instead, and Clear. */\n.fd-signature { display: grid; gap: 8px; justify-items: start; width: 100%; max-width: 480px; min-width: 0; }\n.fd-signature-box {\n position: relative; width: 100%; aspect-ratio: 10 / 3; border: 1px dashed var(--fd-border-strong);\n border-radius: var(--fd-control-radius); background: #fff; overflow: hidden;\n}\n.fd-signature-box:has(.fd-signature-pad:not([hidden]):not(.fd-signature-locked)):hover { border-color: var(--fd-accent); }\n.fd-signature-pad, .fd-signature-image { display: block; width: 100%; height: 100%; }\n.fd-signature-pad { touch-action: none; cursor: crosshair; }\n.fd-signature-pad.fd-signature-locked { cursor: default; }\n.fd-signature-image { object-fit: contain; }\n.fd-signature-hint {\n position: absolute; inset-inline: 18px; inset-block-end: 16px; padding-block-start: 4px; pointer-events: none;\n border-block-start: 1px solid var(--fd-border-strong); color: var(--fd-muted); font-size: 12.5px;\n}\n.fd-signature-tools { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; width: 100%; }\n.fd-signature-typed { flex: 1 1 200px; min-width: 0; }\n.fd-signature-footer { margin-block-start: -4px; color: var(--fd-muted); font-size: 12.5px; }\n/* A slider: the value beside the track and its ends under it; dimmed until it is slid. */\n.fd-slider { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 14px; row-gap: 0; align-items: center; width: 100%; max-width: 440px; min-width: 0; }\n.fd-slider-track { display: contents; }\n.fd-slider-input { width: 100%; min-width: 0; height: 26px; margin: 0; accent-color: var(--fd-accent); cursor: pointer; }\n.fd-slider-input:disabled { cursor: default; }\n.fd-slider-value { min-width: 2.5em; text-align: start; font-variant-numeric: tabular-nums; font-weight: 600; }\n.fd-slider-ends { grid-column: 1; display: flex; justify-content: space-between; gap: 12px; font-size: 12.5px; color: var(--fd-muted); font-variant-numeric: tabular-nums; }\n/* Grey, not the accent: half filled in colour would read as an answer. */\n.fd-slider-empty .fd-slider-input { filter: grayscale(1); opacity: 0.55; }\n.fd-slider-empty .fd-slider-value { color: var(--fd-muted); font-weight: 400; }\n.fd-slider .fd-choice-clear { grid-column: 1 / -1; }\n/* Pictures to choose from: cards of a picture over its words, a ring or a box before the words, the card picked edged in the accent. */\n.fd-image-choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 130px), 1fr)); gap: 12px; width: 100%; min-width: 0; }\n.fd-image-card {\n position: relative; display: grid; grid-template-rows: auto 1fr; padding: 0; margin: 0; overflow: hidden; cursor: pointer;\n font: inherit; color: var(--fd-text); text-align: start; background: var(--fd-surface);\n border: 1px solid var(--fd-border); border-radius: max(var(--fd-control-radius), 6px);\n transition: border-color 0.15s ease, box-shadow 0.15s ease;\n}\n.fd-image-card:hover:not(:disabled) { border-color: var(--fd-accent); }\n.fd-image-card:disabled { cursor: default; }\n.fd-image-card:disabled:not([aria-checked=\"true\"]) { opacity: 0.6; }\n.fd-image-card[aria-checked=\"true\"] { border-color: var(--fd-accent); box-shadow: 0 0 0 1px var(--fd-accent); }\n.fd-image-card-picture { display: block; aspect-ratio: 4 / 3; background: var(--fd-page); border-block-end: 1px solid var(--fd-border); }\n.fd-image-card-picture img { display: block; width: 100%; height: 100%; object-fit: cover; }\n.fd-image-card-blank { display: grid; place-items: center; width: 100%; height: 100%; color: var(--fd-border-strong); }\n.fd-image-card-blank svg { width: 36%; height: 36%; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }\n.fd-image-card-words { display: flex; align-items: flex-start; gap: 8px; padding: 9px 10px; font-size: 13.5px; line-height: 1.35; }\n.fd-image-card-words::before {\n content: \"\"; flex: none; width: 16px; height: 16px; margin-block-start: 1px; box-sizing: border-box;\n border: 1.5px solid var(--fd-border-strong); border-radius: 50%; background: var(--fd-surface);\n}\n.fd-image-card[role=\"checkbox\"] .fd-image-card-words::before { border-radius: 4px; }\n.fd-image-card[aria-checked=\"true\"] .fd-image-card-words::before { border-color: var(--fd-accent); background: var(--fd-accent); box-shadow: inset 0 0 0 3px var(--fd-surface); }\n.fd-image-card[role=\"checkbox\"][aria-checked=\"true\"] .fd-image-card-words::before {\n box-shadow: none;\n background: var(--fd-accent) url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E\") center / 13px no-repeat;\n}\n.fd-image-choices + .fd-choice-clear { justify-self: end; }\n/* A ranking: numbered lines dragged by their grip, or moved with their arrows; the line being dragged lifts. */\n.fd-ranking { width: 100%; max-width: 480px; min-width: 0; }\n.fd-rank-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }\n.fd-rank-item {\n display: flex; align-items: center; gap: 10px; padding-block: 5px; padding-inline: 8px 5px; min-height: 40px;\n background: var(--fd-surface); border: 1px solid var(--fd-border); border-radius: var(--fd-control-radius);\n cursor: grab; user-select: none; -webkit-user-select: none;\n}\n.fd-rank-item.fd-rank-lifted { position: relative; z-index: 1; cursor: grabbing; border-color: var(--fd-accent); box-shadow: 0 6px 18px rgba(15, 20, 25, 0.16); }\n.fd-ranking-locked .fd-rank-item { cursor: default; }\n.fd-rank-grip { flex: none; width: 10px; height: 16px; touch-action: none; background: radial-gradient(circle, var(--fd-border-strong) 1.3px, transparent 1.7px) 0 0 / 5px 5.33px; }\n.fd-ranking-locked .fd-rank-grip { visibility: hidden; }\n.fd-rank-place {\n flex: none; display: grid; place-items: center; min-width: 24px; height: 24px; padding-inline: 4px; border-radius: 999px;\n background: var(--fd-accent-soft); color: var(--fd-accent); font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums;\n}\n.fd-rank-words { flex: 1; min-width: 0; overflow-wrap: anywhere; }\n.fd-rank-tools { flex: none; display: inline-flex; gap: 2px; }\n.fd-rank-move {\n width: 30px; height: 30px; padding: 0; font: inherit; font-size: 15px; line-height: 1; color: var(--fd-muted);\n background: none; border: 1px solid transparent; border-radius: 4px; cursor: pointer;\n}\n.fd-rank-move:hover:not(:disabled) { background: var(--fd-page); border-color: var(--fd-border); color: var(--fd-text); }\n.fd-rank-move:disabled { opacity: 0.3; cursor: default; }\n/* An address: its parts in two columns, the street across both, each named above its box; one column when narrow. */\n.fd-address { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; width: 100%; max-width: 560px; min-width: 0; }\n.fd-address-part { display: grid; gap: 3px; min-width: 0; align-content: start; }\n.fd-address-street, .fd-address-line2 { grid-column: 1 / -1; }\n.fd-address-part.fd-required > .fd-address-label::after { content: \" *\"; color: var(--fd-error); }\n.fd-address-label { font-size: 12.5px; color: var(--fd-muted); }\n@container (max-width: 420px) { .fd-address { grid-template-columns: minmax(0, 1fr); } }\n/* A repeating group: each line a card of its fields under its numbered title, \u00D7 at its end; \"Add another\" under the cards. */\n.fd-repeat { display: grid; gap: 10px; justify-items: start; width: 100%; min-width: 0; }\n.fd-repeat-list { display: grid; gap: 10px; width: 100%; min-width: 0; }\n.fd-repeat-list:empty { display: none; }\n.fd-repeat-card {\n display: grid; gap: 8px; min-width: 0; padding: 10px 14px 14px;\n background: var(--fd-surface); border: 1px solid var(--fd-border); border-radius: max(var(--fd-radius), 6px);\n}\n.fd-repeat-head { display: flex; align-items: center; gap: 2px; min-height: 28px; }\n.fd-repeat-title { font-weight: 600; font-size: 13.5px; margin-inline-end: auto; }\n.fd-repeat-remove, .fd-repeat-tool { border: none; background: none; cursor: pointer; color: var(--fd-muted); font-size: 18px; line-height: 1; padding: 4px 8px; border-radius: 4px; }\n.fd-repeat-remove:hover { color: var(--fd-error); background: var(--fd-error-soft); }\n.fd-repeat-tool { font-size: 15px; }\n.fd-repeat-tool:hover { color: var(--fd-accent); background: var(--fd-accent-soft); }\n.fd-repeat-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 10px 14px; }\n.fd-repeat-field { display: grid; gap: 3px; min-width: 0; align-content: start; }\n.fd-repeat-label { font-size: 12.5px; color: var(--fd-muted); }\n.fd-repeat-add { border-style: dashed; }\n";
@@ -0,0 +1,7 @@
1
+ /**
2
+ * The question kinds' part of the stylesheet: a signature pad, a slider, tags
3
+ * from a list, pictures to choose from, a ranking, an address and a repeating
4
+ * group of cards. Appended to Fieldia's stylesheet, scoped and written with
5
+ * logical properties as the rest of it is.
6
+ */
7
+ export declare const KINDS_CSS = "\n/* ---- question kinds -------------------------------------------------------- */\n/* A signature: a pad with a line to sign on, a box to type a name in instead, and Clear. */\n.fd-signature { display: grid; gap: 8px; justify-items: start; width: 100%; max-width: 480px; min-width: 0; }\n.fd-signature-box {\n position: relative; width: 100%; aspect-ratio: 10 / 3; border: 1px dashed var(--fd-border-strong);\n border-radius: var(--fd-control-radius); background: #fff; overflow: hidden;\n}\n.fd-signature-box:has(.fd-signature-pad:not([hidden]):not(.fd-signature-locked)):hover { border-color: var(--fd-accent); }\n.fd-signature-pad, .fd-signature-image { display: block; width: 100%; height: 100%; }\n.fd-signature-pad { touch-action: none; cursor: crosshair; }\n.fd-signature-pad.fd-signature-locked { cursor: default; }\n.fd-signature-image { object-fit: contain; }\n.fd-signature-hint {\n position: absolute; inset-inline: 18px; inset-block-end: 16px; padding-block-start: 4px; pointer-events: none;\n border-block-start: 1px solid var(--fd-border-strong); color: var(--fd-muted); font-size: 12.5px;\n}\n.fd-signature-tools { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; width: 100%; }\n.fd-signature-typed { flex: 1 1 200px; min-width: 0; }\n.fd-signature-footer { margin-block-start: -4px; color: var(--fd-muted); font-size: 12.5px; }\n/* A slider: the value beside the track and its ends under it; dimmed until it is slid. */\n.fd-slider { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 14px; row-gap: 0; align-items: center; width: 100%; max-width: 440px; min-width: 0; }\n.fd-slider-track { display: contents; }\n.fd-slider-input { width: 100%; min-width: 0; height: 26px; margin: 0; accent-color: var(--fd-accent); cursor: pointer; }\n.fd-slider-input:disabled { cursor: default; }\n.fd-slider-value { min-width: 2.5em; text-align: start; font-variant-numeric: tabular-nums; font-weight: 600; }\n.fd-slider-ends { grid-column: 1; display: flex; justify-content: space-between; gap: 12px; font-size: 12.5px; color: var(--fd-muted); font-variant-numeric: tabular-nums; }\n/* Grey, not the accent: half filled in colour would read as an answer. */\n.fd-slider-empty .fd-slider-input { filter: grayscale(1); opacity: 0.55; }\n.fd-slider-empty .fd-slider-value { color: var(--fd-muted); font-weight: 400; }\n.fd-slider .fd-choice-clear { grid-column: 1 / -1; }\n/* Pictures to choose from: cards of a picture over its words, a ring or a box before the words, the card picked edged in the accent. */\n.fd-image-choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 130px), 1fr)); gap: 12px; width: 100%; min-width: 0; }\n.fd-image-card {\n position: relative; display: grid; grid-template-rows: auto 1fr; padding: 0; margin: 0; overflow: hidden; cursor: pointer;\n font: inherit; color: var(--fd-text); text-align: start; background: var(--fd-surface);\n border: 1px solid var(--fd-border); border-radius: max(var(--fd-control-radius), 6px);\n transition: border-color 0.15s ease, box-shadow 0.15s ease;\n}\n.fd-image-card:hover:not(:disabled) { border-color: var(--fd-accent); }\n.fd-image-card:disabled { cursor: default; }\n.fd-image-card:disabled:not([aria-checked=\"true\"]) { opacity: 0.6; }\n.fd-image-card[aria-checked=\"true\"] { border-color: var(--fd-accent); box-shadow: 0 0 0 1px var(--fd-accent); }\n.fd-image-card-picture { display: block; aspect-ratio: 4 / 3; background: var(--fd-page); border-block-end: 1px solid var(--fd-border); }\n.fd-image-card-picture img { display: block; width: 100%; height: 100%; object-fit: cover; }\n.fd-image-card-blank { display: grid; place-items: center; width: 100%; height: 100%; color: var(--fd-border-strong); }\n.fd-image-card-blank svg { width: 36%; height: 36%; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }\n.fd-image-card-words { display: flex; align-items: flex-start; gap: 8px; padding: 9px 10px; font-size: 13.5px; line-height: 1.35; }\n.fd-image-card-words::before {\n content: \"\"; flex: none; width: 16px; height: 16px; margin-block-start: 1px; box-sizing: border-box;\n border: 1.5px solid var(--fd-border-strong); border-radius: 50%; background: var(--fd-surface);\n}\n.fd-image-card[role=\"checkbox\"] .fd-image-card-words::before { border-radius: 4px; }\n.fd-image-card[aria-checked=\"true\"] .fd-image-card-words::before { border-color: var(--fd-accent); background: var(--fd-accent); box-shadow: inset 0 0 0 3px var(--fd-surface); }\n.fd-image-card[role=\"checkbox\"][aria-checked=\"true\"] .fd-image-card-words::before {\n box-shadow: none;\n background: var(--fd-accent) url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E\") center / 13px no-repeat;\n}\n.fd-image-choices + .fd-choice-clear { justify-self: end; }\n/* A ranking: numbered lines dragged by their grip, or moved with their arrows; the line being dragged lifts. */\n.fd-ranking { width: 100%; max-width: 480px; min-width: 0; }\n.fd-rank-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }\n.fd-rank-item {\n display: flex; align-items: center; gap: 10px; padding-block: 5px; padding-inline: 8px 5px; min-height: 40px;\n background: var(--fd-surface); border: 1px solid var(--fd-border); border-radius: var(--fd-control-radius);\n cursor: grab; user-select: none; -webkit-user-select: none;\n}\n.fd-rank-item.fd-rank-lifted { position: relative; z-index: 1; cursor: grabbing; border-color: var(--fd-accent); box-shadow: 0 6px 18px rgba(15, 20, 25, 0.16); }\n.fd-ranking-locked .fd-rank-item { cursor: default; }\n.fd-rank-grip { flex: none; width: 10px; height: 16px; touch-action: none; background: radial-gradient(circle, var(--fd-border-strong) 1.3px, transparent 1.7px) 0 0 / 5px 5.33px; }\n.fd-ranking-locked .fd-rank-grip { visibility: hidden; }\n.fd-rank-place {\n flex: none; display: grid; place-items: center; min-width: 24px; height: 24px; padding-inline: 4px; border-radius: 999px;\n background: var(--fd-accent-soft); color: var(--fd-accent); font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums;\n}\n.fd-rank-words { flex: 1; min-width: 0; overflow-wrap: anywhere; }\n.fd-rank-tools { flex: none; display: inline-flex; gap: 2px; }\n.fd-rank-move {\n width: 30px; height: 30px; padding: 0; font: inherit; font-size: 15px; line-height: 1; color: var(--fd-muted);\n background: none; border: 1px solid transparent; border-radius: 4px; cursor: pointer;\n}\n.fd-rank-move:hover:not(:disabled) { background: var(--fd-page); border-color: var(--fd-border); color: var(--fd-text); }\n.fd-rank-move:disabled { opacity: 0.3; cursor: default; }\n/* An address: its parts in two columns, the street across both, each named above its box; one column when narrow. */\n.fd-address { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; width: 100%; max-width: 560px; min-width: 0; }\n.fd-address-part { display: grid; gap: 3px; min-width: 0; align-content: start; }\n.fd-address-street, .fd-address-line2 { grid-column: 1 / -1; }\n.fd-address-part.fd-required > .fd-address-label::after { content: \" *\"; color: var(--fd-error); }\n.fd-address-label { font-size: 12.5px; color: var(--fd-muted); }\n@container (max-width: 420px) { .fd-address { grid-template-columns: minmax(0, 1fr); } }\n/* A repeating group: each line a card of its fields under its numbered title, \u00D7 at its end; \"Add another\" under the cards. */\n.fd-repeat { display: grid; gap: 10px; justify-items: start; width: 100%; min-width: 0; }\n.fd-repeat-list { display: grid; gap: 10px; width: 100%; min-width: 0; }\n.fd-repeat-list:empty { display: none; }\n.fd-repeat-card {\n display: grid; gap: 8px; min-width: 0; padding: 10px 14px 14px;\n background: var(--fd-surface); border: 1px solid var(--fd-border); border-radius: max(var(--fd-radius), 6px);\n}\n.fd-repeat-head { display: flex; align-items: center; gap: 2px; min-height: 28px; }\n.fd-repeat-title { font-weight: 600; font-size: 13.5px; margin-inline-end: auto; }\n.fd-repeat-remove, .fd-repeat-tool { border: none; background: none; cursor: pointer; color: var(--fd-muted); font-size: 18px; line-height: 1; padding: 4px 8px; border-radius: 4px; }\n.fd-repeat-remove:hover { color: var(--fd-error); background: var(--fd-error-soft); }\n.fd-repeat-tool { font-size: 15px; }\n.fd-repeat-tool:hover { color: var(--fd-accent); background: var(--fd-accent-soft); }\n.fd-repeat-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 10px 14px; }\n.fd-repeat-field { display: grid; gap: 3px; min-width: 0; align-content: start; }\n.fd-repeat-label { font-size: 12.5px; color: var(--fd-muted); }\n.fd-repeat-add { border-style: dashed; }\n";
@@ -0,0 +1,119 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.KINDS_CSS = void 0;
4
+ /**
5
+ * The question kinds' part of the stylesheet: a signature pad, a slider, tags
6
+ * from a list, pictures to choose from, a ranking, an address and a repeating
7
+ * group of cards. Appended to Fieldia's stylesheet, scoped and written with
8
+ * logical properties as the rest of it is.
9
+ */
10
+ exports.KINDS_CSS = `
11
+ /* ---- question kinds -------------------------------------------------------- */
12
+ /* A signature: a pad with a line to sign on, a box to type a name in instead, and Clear. */
13
+ .fd-signature { display: grid; gap: 8px; justify-items: start; width: 100%; max-width: 480px; min-width: 0; }
14
+ .fd-signature-box {
15
+ position: relative; width: 100%; aspect-ratio: 10 / 3; border: 1px dashed var(--fd-border-strong);
16
+ border-radius: var(--fd-control-radius); background: #fff; overflow: hidden;
17
+ }
18
+ .fd-signature-box:has(.fd-signature-pad:not([hidden]):not(.fd-signature-locked)):hover { border-color: var(--fd-accent); }
19
+ .fd-signature-pad, .fd-signature-image { display: block; width: 100%; height: 100%; }
20
+ .fd-signature-pad { touch-action: none; cursor: crosshair; }
21
+ .fd-signature-pad.fd-signature-locked { cursor: default; }
22
+ .fd-signature-image { object-fit: contain; }
23
+ .fd-signature-hint {
24
+ position: absolute; inset-inline: 18px; inset-block-end: 16px; padding-block-start: 4px; pointer-events: none;
25
+ border-block-start: 1px solid var(--fd-border-strong); color: var(--fd-muted); font-size: 12.5px;
26
+ }
27
+ .fd-signature-tools { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; width: 100%; }
28
+ .fd-signature-typed { flex: 1 1 200px; min-width: 0; }
29
+ .fd-signature-footer { margin-block-start: -4px; color: var(--fd-muted); font-size: 12.5px; }
30
+ /* A slider: the value beside the track and its ends under it; dimmed until it is slid. */
31
+ .fd-slider { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 14px; row-gap: 0; align-items: center; width: 100%; max-width: 440px; min-width: 0; }
32
+ .fd-slider-track { display: contents; }
33
+ .fd-slider-input { width: 100%; min-width: 0; height: 26px; margin: 0; accent-color: var(--fd-accent); cursor: pointer; }
34
+ .fd-slider-input:disabled { cursor: default; }
35
+ .fd-slider-value { min-width: 2.5em; text-align: start; font-variant-numeric: tabular-nums; font-weight: 600; }
36
+ .fd-slider-ends { grid-column: 1; display: flex; justify-content: space-between; gap: 12px; font-size: 12.5px; color: var(--fd-muted); font-variant-numeric: tabular-nums; }
37
+ /* Grey, not the accent: half filled in colour would read as an answer. */
38
+ .fd-slider-empty .fd-slider-input { filter: grayscale(1); opacity: 0.55; }
39
+ .fd-slider-empty .fd-slider-value { color: var(--fd-muted); font-weight: 400; }
40
+ .fd-slider .fd-choice-clear { grid-column: 1 / -1; }
41
+ /* Pictures to choose from: cards of a picture over its words, a ring or a box before the words, the card picked edged in the accent. */
42
+ .fd-image-choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 130px), 1fr)); gap: 12px; width: 100%; min-width: 0; }
43
+ .fd-image-card {
44
+ position: relative; display: grid; grid-template-rows: auto 1fr; padding: 0; margin: 0; overflow: hidden; cursor: pointer;
45
+ font: inherit; color: var(--fd-text); text-align: start; background: var(--fd-surface);
46
+ border: 1px solid var(--fd-border); border-radius: max(var(--fd-control-radius), 6px);
47
+ transition: border-color 0.15s ease, box-shadow 0.15s ease;
48
+ }
49
+ .fd-image-card:hover:not(:disabled) { border-color: var(--fd-accent); }
50
+ .fd-image-card:disabled { cursor: default; }
51
+ .fd-image-card:disabled:not([aria-checked="true"]) { opacity: 0.6; }
52
+ .fd-image-card[aria-checked="true"] { border-color: var(--fd-accent); box-shadow: 0 0 0 1px var(--fd-accent); }
53
+ .fd-image-card-picture { display: block; aspect-ratio: 4 / 3; background: var(--fd-page); border-block-end: 1px solid var(--fd-border); }
54
+ .fd-image-card-picture img { display: block; width: 100%; height: 100%; object-fit: cover; }
55
+ .fd-image-card-blank { display: grid; place-items: center; width: 100%; height: 100%; color: var(--fd-border-strong); }
56
+ .fd-image-card-blank svg { width: 36%; height: 36%; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
57
+ .fd-image-card-words { display: flex; align-items: flex-start; gap: 8px; padding: 9px 10px; font-size: 13.5px; line-height: 1.35; }
58
+ .fd-image-card-words::before {
59
+ content: ""; flex: none; width: 16px; height: 16px; margin-block-start: 1px; box-sizing: border-box;
60
+ border: 1.5px solid var(--fd-border-strong); border-radius: 50%; background: var(--fd-surface);
61
+ }
62
+ .fd-image-card[role="checkbox"] .fd-image-card-words::before { border-radius: 4px; }
63
+ .fd-image-card[aria-checked="true"] .fd-image-card-words::before { border-color: var(--fd-accent); background: var(--fd-accent); box-shadow: inset 0 0 0 3px var(--fd-surface); }
64
+ .fd-image-card[role="checkbox"][aria-checked="true"] .fd-image-card-words::before {
65
+ box-shadow: none;
66
+ background: var(--fd-accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 13px no-repeat;
67
+ }
68
+ .fd-image-choices + .fd-choice-clear { justify-self: end; }
69
+ /* A ranking: numbered lines dragged by their grip, or moved with their arrows; the line being dragged lifts. */
70
+ .fd-ranking { width: 100%; max-width: 480px; min-width: 0; }
71
+ .fd-rank-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
72
+ .fd-rank-item {
73
+ display: flex; align-items: center; gap: 10px; padding-block: 5px; padding-inline: 8px 5px; min-height: 40px;
74
+ background: var(--fd-surface); border: 1px solid var(--fd-border); border-radius: var(--fd-control-radius);
75
+ cursor: grab; user-select: none; -webkit-user-select: none;
76
+ }
77
+ .fd-rank-item.fd-rank-lifted { position: relative; z-index: 1; cursor: grabbing; border-color: var(--fd-accent); box-shadow: 0 6px 18px rgba(15, 20, 25, 0.16); }
78
+ .fd-ranking-locked .fd-rank-item { cursor: default; }
79
+ .fd-rank-grip { flex: none; width: 10px; height: 16px; touch-action: none; background: radial-gradient(circle, var(--fd-border-strong) 1.3px, transparent 1.7px) 0 0 / 5px 5.33px; }
80
+ .fd-ranking-locked .fd-rank-grip { visibility: hidden; }
81
+ .fd-rank-place {
82
+ flex: none; display: grid; place-items: center; min-width: 24px; height: 24px; padding-inline: 4px; border-radius: 999px;
83
+ background: var(--fd-accent-soft); color: var(--fd-accent); font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums;
84
+ }
85
+ .fd-rank-words { flex: 1; min-width: 0; overflow-wrap: anywhere; }
86
+ .fd-rank-tools { flex: none; display: inline-flex; gap: 2px; }
87
+ .fd-rank-move {
88
+ width: 30px; height: 30px; padding: 0; font: inherit; font-size: 15px; line-height: 1; color: var(--fd-muted);
89
+ background: none; border: 1px solid transparent; border-radius: 4px; cursor: pointer;
90
+ }
91
+ .fd-rank-move:hover:not(:disabled) { background: var(--fd-page); border-color: var(--fd-border); color: var(--fd-text); }
92
+ .fd-rank-move:disabled { opacity: 0.3; cursor: default; }
93
+ /* An address: its parts in two columns, the street across both, each named above its box; one column when narrow. */
94
+ .fd-address { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; width: 100%; max-width: 560px; min-width: 0; }
95
+ .fd-address-part { display: grid; gap: 3px; min-width: 0; align-content: start; }
96
+ .fd-address-street, .fd-address-line2 { grid-column: 1 / -1; }
97
+ .fd-address-part.fd-required > .fd-address-label::after { content: " *"; color: var(--fd-error); }
98
+ .fd-address-label { font-size: 12.5px; color: var(--fd-muted); }
99
+ @container (max-width: 420px) { .fd-address { grid-template-columns: minmax(0, 1fr); } }
100
+ /* A repeating group: each line a card of its fields under its numbered title, × at its end; "Add another" under the cards. */
101
+ .fd-repeat { display: grid; gap: 10px; justify-items: start; width: 100%; min-width: 0; }
102
+ .fd-repeat-list { display: grid; gap: 10px; width: 100%; min-width: 0; }
103
+ .fd-repeat-list:empty { display: none; }
104
+ .fd-repeat-card {
105
+ display: grid; gap: 8px; min-width: 0; padding: 10px 14px 14px;
106
+ background: var(--fd-surface); border: 1px solid var(--fd-border); border-radius: max(var(--fd-radius), 6px);
107
+ }
108
+ .fd-repeat-head { display: flex; align-items: center; gap: 2px; min-height: 28px; }
109
+ .fd-repeat-title { font-weight: 600; font-size: 13.5px; margin-inline-end: auto; }
110
+ .fd-repeat-remove, .fd-repeat-tool { border: none; background: none; cursor: pointer; color: var(--fd-muted); font-size: 18px; line-height: 1; padding: 4px 8px; border-radius: 4px; }
111
+ .fd-repeat-remove:hover { color: var(--fd-error); background: var(--fd-error-soft); }
112
+ .fd-repeat-tool { font-size: 15px; }
113
+ .fd-repeat-tool:hover { color: var(--fd-accent); background: var(--fd-accent-soft); }
114
+ .fd-repeat-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 10px 14px; }
115
+ .fd-repeat-field { display: grid; gap: 3px; min-width: 0; align-content: start; }
116
+ .fd-repeat-label { font-size: 12.5px; color: var(--fd-muted); }
117
+ .fd-repeat-add { border-style: dashed; }
118
+ `;
119
+ //# sourceMappingURL=styles-kinds.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles-kinds.js","sourceRoot":"","sources":["../../../../../libs/widgets/src/lib/styles-kinds.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACU,QAAA,SAAS,GAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4GlC,CAAC"}
@@ -0,0 +1,116 @@
1
+ /**
2
+ * The question kinds' part of the stylesheet: a signature pad, a slider, tags
3
+ * from a list, pictures to choose from, a ranking, an address and a repeating
4
+ * group of cards. Appended to Fieldia's stylesheet, scoped and written with
5
+ * logical properties as the rest of it is.
6
+ */
7
+ export const KINDS_CSS = /* css */ `
8
+ /* ---- question kinds -------------------------------------------------------- */
9
+ /* A signature: a pad with a line to sign on, a box to type a name in instead, and Clear. */
10
+ .fd-signature { display: grid; gap: 8px; justify-items: start; width: 100%; max-width: 480px; min-width: 0; }
11
+ .fd-signature-box {
12
+ position: relative; width: 100%; aspect-ratio: 10 / 3; border: 1px dashed var(--fd-border-strong);
13
+ border-radius: var(--fd-control-radius); background: #fff; overflow: hidden;
14
+ }
15
+ .fd-signature-box:has(.fd-signature-pad:not([hidden]):not(.fd-signature-locked)):hover { border-color: var(--fd-accent); }
16
+ .fd-signature-pad, .fd-signature-image { display: block; width: 100%; height: 100%; }
17
+ .fd-signature-pad { touch-action: none; cursor: crosshair; }
18
+ .fd-signature-pad.fd-signature-locked { cursor: default; }
19
+ .fd-signature-image { object-fit: contain; }
20
+ .fd-signature-hint {
21
+ position: absolute; inset-inline: 18px; inset-block-end: 16px; padding-block-start: 4px; pointer-events: none;
22
+ border-block-start: 1px solid var(--fd-border-strong); color: var(--fd-muted); font-size: 12.5px;
23
+ }
24
+ .fd-signature-tools { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; width: 100%; }
25
+ .fd-signature-typed { flex: 1 1 200px; min-width: 0; }
26
+ .fd-signature-footer { margin-block-start: -4px; color: var(--fd-muted); font-size: 12.5px; }
27
+ /* A slider: the value beside the track and its ends under it; dimmed until it is slid. */
28
+ .fd-slider { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 14px; row-gap: 0; align-items: center; width: 100%; max-width: 440px; min-width: 0; }
29
+ .fd-slider-track { display: contents; }
30
+ .fd-slider-input { width: 100%; min-width: 0; height: 26px; margin: 0; accent-color: var(--fd-accent); cursor: pointer; }
31
+ .fd-slider-input:disabled { cursor: default; }
32
+ .fd-slider-value { min-width: 2.5em; text-align: start; font-variant-numeric: tabular-nums; font-weight: 600; }
33
+ .fd-slider-ends { grid-column: 1; display: flex; justify-content: space-between; gap: 12px; font-size: 12.5px; color: var(--fd-muted); font-variant-numeric: tabular-nums; }
34
+ /* Grey, not the accent: half filled in colour would read as an answer. */
35
+ .fd-slider-empty .fd-slider-input { filter: grayscale(1); opacity: 0.55; }
36
+ .fd-slider-empty .fd-slider-value { color: var(--fd-muted); font-weight: 400; }
37
+ .fd-slider .fd-choice-clear { grid-column: 1 / -1; }
38
+ /* Pictures to choose from: cards of a picture over its words, a ring or a box before the words, the card picked edged in the accent. */
39
+ .fd-image-choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 130px), 1fr)); gap: 12px; width: 100%; min-width: 0; }
40
+ .fd-image-card {
41
+ position: relative; display: grid; grid-template-rows: auto 1fr; padding: 0; margin: 0; overflow: hidden; cursor: pointer;
42
+ font: inherit; color: var(--fd-text); text-align: start; background: var(--fd-surface);
43
+ border: 1px solid var(--fd-border); border-radius: max(var(--fd-control-radius), 6px);
44
+ transition: border-color 0.15s ease, box-shadow 0.15s ease;
45
+ }
46
+ .fd-image-card:hover:not(:disabled) { border-color: var(--fd-accent); }
47
+ .fd-image-card:disabled { cursor: default; }
48
+ .fd-image-card:disabled:not([aria-checked="true"]) { opacity: 0.6; }
49
+ .fd-image-card[aria-checked="true"] { border-color: var(--fd-accent); box-shadow: 0 0 0 1px var(--fd-accent); }
50
+ .fd-image-card-picture { display: block; aspect-ratio: 4 / 3; background: var(--fd-page); border-block-end: 1px solid var(--fd-border); }
51
+ .fd-image-card-picture img { display: block; width: 100%; height: 100%; object-fit: cover; }
52
+ .fd-image-card-blank { display: grid; place-items: center; width: 100%; height: 100%; color: var(--fd-border-strong); }
53
+ .fd-image-card-blank svg { width: 36%; height: 36%; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
54
+ .fd-image-card-words { display: flex; align-items: flex-start; gap: 8px; padding: 9px 10px; font-size: 13.5px; line-height: 1.35; }
55
+ .fd-image-card-words::before {
56
+ content: ""; flex: none; width: 16px; height: 16px; margin-block-start: 1px; box-sizing: border-box;
57
+ border: 1.5px solid var(--fd-border-strong); border-radius: 50%; background: var(--fd-surface);
58
+ }
59
+ .fd-image-card[role="checkbox"] .fd-image-card-words::before { border-radius: 4px; }
60
+ .fd-image-card[aria-checked="true"] .fd-image-card-words::before { border-color: var(--fd-accent); background: var(--fd-accent); box-shadow: inset 0 0 0 3px var(--fd-surface); }
61
+ .fd-image-card[role="checkbox"][aria-checked="true"] .fd-image-card-words::before {
62
+ box-shadow: none;
63
+ background: var(--fd-accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 13px no-repeat;
64
+ }
65
+ .fd-image-choices + .fd-choice-clear { justify-self: end; }
66
+ /* A ranking: numbered lines dragged by their grip, or moved with their arrows; the line being dragged lifts. */
67
+ .fd-ranking { width: 100%; max-width: 480px; min-width: 0; }
68
+ .fd-rank-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
69
+ .fd-rank-item {
70
+ display: flex; align-items: center; gap: 10px; padding-block: 5px; padding-inline: 8px 5px; min-height: 40px;
71
+ background: var(--fd-surface); border: 1px solid var(--fd-border); border-radius: var(--fd-control-radius);
72
+ cursor: grab; user-select: none; -webkit-user-select: none;
73
+ }
74
+ .fd-rank-item.fd-rank-lifted { position: relative; z-index: 1; cursor: grabbing; border-color: var(--fd-accent); box-shadow: 0 6px 18px rgba(15, 20, 25, 0.16); }
75
+ .fd-ranking-locked .fd-rank-item { cursor: default; }
76
+ .fd-rank-grip { flex: none; width: 10px; height: 16px; touch-action: none; background: radial-gradient(circle, var(--fd-border-strong) 1.3px, transparent 1.7px) 0 0 / 5px 5.33px; }
77
+ .fd-ranking-locked .fd-rank-grip { visibility: hidden; }
78
+ .fd-rank-place {
79
+ flex: none; display: grid; place-items: center; min-width: 24px; height: 24px; padding-inline: 4px; border-radius: 999px;
80
+ background: var(--fd-accent-soft); color: var(--fd-accent); font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums;
81
+ }
82
+ .fd-rank-words { flex: 1; min-width: 0; overflow-wrap: anywhere; }
83
+ .fd-rank-tools { flex: none; display: inline-flex; gap: 2px; }
84
+ .fd-rank-move {
85
+ width: 30px; height: 30px; padding: 0; font: inherit; font-size: 15px; line-height: 1; color: var(--fd-muted);
86
+ background: none; border: 1px solid transparent; border-radius: 4px; cursor: pointer;
87
+ }
88
+ .fd-rank-move:hover:not(:disabled) { background: var(--fd-page); border-color: var(--fd-border); color: var(--fd-text); }
89
+ .fd-rank-move:disabled { opacity: 0.3; cursor: default; }
90
+ /* An address: its parts in two columns, the street across both, each named above its box; one column when narrow. */
91
+ .fd-address { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; width: 100%; max-width: 560px; min-width: 0; }
92
+ .fd-address-part { display: grid; gap: 3px; min-width: 0; align-content: start; }
93
+ .fd-address-street, .fd-address-line2 { grid-column: 1 / -1; }
94
+ .fd-address-part.fd-required > .fd-address-label::after { content: " *"; color: var(--fd-error); }
95
+ .fd-address-label { font-size: 12.5px; color: var(--fd-muted); }
96
+ @container (max-width: 420px) { .fd-address { grid-template-columns: minmax(0, 1fr); } }
97
+ /* A repeating group: each line a card of its fields under its numbered title, × at its end; "Add another" under the cards. */
98
+ .fd-repeat { display: grid; gap: 10px; justify-items: start; width: 100%; min-width: 0; }
99
+ .fd-repeat-list { display: grid; gap: 10px; width: 100%; min-width: 0; }
100
+ .fd-repeat-list:empty { display: none; }
101
+ .fd-repeat-card {
102
+ display: grid; gap: 8px; min-width: 0; padding: 10px 14px 14px;
103
+ background: var(--fd-surface); border: 1px solid var(--fd-border); border-radius: max(var(--fd-radius), 6px);
104
+ }
105
+ .fd-repeat-head { display: flex; align-items: center; gap: 2px; min-height: 28px; }
106
+ .fd-repeat-title { font-weight: 600; font-size: 13.5px; margin-inline-end: auto; }
107
+ .fd-repeat-remove, .fd-repeat-tool { border: none; background: none; cursor: pointer; color: var(--fd-muted); font-size: 18px; line-height: 1; padding: 4px 8px; border-radius: 4px; }
108
+ .fd-repeat-remove:hover { color: var(--fd-error); background: var(--fd-error-soft); }
109
+ .fd-repeat-tool { font-size: 15px; }
110
+ .fd-repeat-tool:hover { color: var(--fd-accent); background: var(--fd-accent-soft); }
111
+ .fd-repeat-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 10px 14px; }
112
+ .fd-repeat-field { display: grid; gap: 3px; min-width: 0; align-content: start; }
113
+ .fd-repeat-label { font-size: 12.5px; color: var(--fd-muted); }
114
+ .fd-repeat-add { border-style: dashed; }
115
+ `;
116
+ //# sourceMappingURL=styles-kinds.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles-kinds.mjs","sourceRoot":"","sources":["../../../../../libs/widgets/src/lib/styles-kinds.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,SAAS,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4GlC,CAAC"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * A look for each kind of part, over the page's: what a page sets for its text
3
+ * boxes, choices, groups, buttons and tables. The viewer names what is set on
4
+ * the form (`data-inputs="bg radius"`, …) and hands each value over as a token
5
+ * of that kind (`--fd-inputs-bg`, …), worked out already for the page's scheme:
6
+ * a ground light enough, or dark enough, for the page's words to read on it,
7
+ * an accent moved until words in it and on it read (see `look.ts` in
8
+ * @fieldia/viewer). Each is worn by its own kind of part alone, in either skin.
9
+ *
10
+ * Where a part's own rules draw it from a token (its edge, its corners), the
11
+ * token is set on the part; where a skin draws it otherwise (the underline
12
+ * skin's boxes have no ground), the setting is drawn outright. Last in the
13
+ * stylesheet, so it wins where it speaks; colours and sizes only, so right to
14
+ * left needs nothing of its own.
15
+ */
16
+ export declare const PARTS_CSS = "\n/* ---- each kind of part's own look ---------------------------------------------- */\n/* Boxes typed in or picked from: text, numbers, dates, dropdowns, and a date's calendar button. */\n.fd-form[data-inputs~=bg] :is(.fd-input:not([readonly]), .fd-calendar-button) { background: var(--fd-inputs-bg); }\n.fd-form[data-inputs~=border] :is(.fd-input, .fd-calendar-button) { --fd-border: var(--fd-inputs-border); --fd-border-strong: var(--fd-inputs-border); }\n.fd-form[data-inputs~=radius] :is(.fd-input, .fd-calendar-button) { --fd-control-radius: var(--fd-inputs-radius); }\n/* A record's title keeps its own big words. */\n.fd-form[data-inputs~=size] :where(.fd-input) { font-size: var(--fd-inputs-size); }\n/* The edge of the box being typed in and its glow (the underline skin draws its own line instead), the option and the day picked. */\n.fd-form[data-inputs~=accent] :is(.fd-input, .fd-combo, .fd-tags, .fd-date-pick) {\n --fd-accent: var(--fd-inputs-accent); --fd-accent-text: var(--fd-inputs-accent-text); --fd-focus: var(--fd-accent);\n --fd-accent-soft: color-mix(in srgb, var(--fd-accent) 12%, var(--fd-surface));\n --fd-focus-ring: 0 0 0 2px color-mix(in srgb, var(--fd-accent) 22%, transparent);\n}\n\n/* Options picked: rings and ticks take the accent; a scale's points, Yes and No, pictures and a ranking's lines are boxes too. */\n.fd-form[data-choices~=accent] :is(.fd-choices, .fd-points, .fd-image-choices, .fd-ranking, .fd-checkbox, .fd-switch, .fd-matrix-table, .fd-slider) {\n --fd-accent: var(--fd-choices-accent); --fd-accent-text: var(--fd-choices-accent-text); --fd-focus: var(--fd-accent);\n --fd-accent-soft: color-mix(in srgb, var(--fd-accent) 12%, var(--fd-surface));\n}\n.fd-form[data-choices~=bg] :is(.fd-points button, .fd-image-card, .fd-rank-item) { --fd-surface: var(--fd-choices-bg); }\n.fd-form[data-choices~=border] :is(.fd-points button, .fd-image-card, .fd-rank-item) { --fd-border: var(--fd-choices-border); }\n.fd-form[data-choices~=radius] :is(.fd-points button, .fd-image-card, .fd-rank-item) { --fd-control-radius: var(--fd-choices-radius); }\n.fd-form[data-choices~=size] :is(.fd-choices, .fd-points, .fd-image-card-words, .fd-rank-list) { font-size: var(--fd-choices-size); }\n\n/* Groups drawn as a card or a frame: a section, a record's sheet, a repeating group's cards. In the\n underline skin, which draws no card round a section, one given a ground or an edge becomes a card. */\n.fd-form[data-groups~=bg] :is(.fd-sections > .fd-section:not([data-style]), .fd-section[data-style=card][data-on-page], .fd-section[data-style=framed], .fd-card, .fd-repeat-card) {\n background: var(--fd-groups-bg); --fd-ground: var(--fd-groups-bg);\n}\n.fd-form[data-groups~=border] :is(.fd-sections > .fd-section:not([data-style]), .fd-section[data-style=card][data-on-page], .fd-section[data-style=framed], .fd-card, .fd-repeat-card) { border: 1px solid var(--fd-groups-border); }\n.fd-form[data-groups~=radius] :is(.fd-sections > .fd-section:not([data-style]), .fd-section[data-style=card][data-on-page], .fd-section[data-style=framed], .fd-card, .fd-repeat-card) { border-radius: var(--fd-groups-radius); }\n.fd-form[data-fd-skin=underline]:is([data-groups~=bg], [data-groups~=border]) :is(.fd-sections > .fd-section:not([data-style]), .fd-section[data-style=card][data-on-page]) {\n padding: var(--fd-group-pad, 18px 22px); border-radius: var(--fd-groups-radius, var(--fd-radius));\n}\n\n/* Buttons: Send, Next, Save, Add another \u2014 in a form, and in a dialog it opens. */\n:is(.fd-form, .fd-form-dialog)[data-buttons~=accent] .fd-button {\n --fd-accent: var(--fd-buttons-accent); --fd-accent-text: var(--fd-buttons-accent-text); --fd-focus: var(--fd-accent);\n --fd-accent-hover: color-mix(in srgb, var(--fd-accent) 84%, var(--fd-text));\n}\n:is(.fd-form, .fd-form-dialog)[data-buttons~=accent] .fd-button-primary:hover { filter: none; background: var(--fd-accent-hover); border-color: var(--fd-accent-hover); }\n:is(.fd-form, .fd-form-dialog)[data-buttons~=radius] .fd-button { border-radius: var(--fd-buttons-radius); }\n:is(.fd-form, .fd-form-dialog)[data-buttons~=size] .fd-button { font-size: var(--fd-buttons-size); }\n\n/* Tables of lines and a matrix's grid: the ground of their heading row, their lines, their words. */\n.fd-form[data-tables~=bg] :is(.fd-lines-table, .fd-matrix-table) thead th { background: var(--fd-tables-bg); }\n.fd-form[data-tables~=border] :is(.fd-lines-table, .fd-matrix-table) :is(th, td) { border-color: var(--fd-tables-border); }\n.fd-form[data-tables~=size] :is(.fd-lines-table, .fd-matrix-table) :is(th, td) { font-size: var(--fd-tables-size); }\n";
@@ -0,0 +1,16 @@
1
+ /**
2
+ * A look for each kind of part, over the page's: what a page sets for its text
3
+ * boxes, choices, groups, buttons and tables. The viewer names what is set on
4
+ * the form (`data-inputs="bg radius"`, …) and hands each value over as a token
5
+ * of that kind (`--fd-inputs-bg`, …), worked out already for the page's scheme:
6
+ * a ground light enough, or dark enough, for the page's words to read on it,
7
+ * an accent moved until words in it and on it read (see `look.ts` in
8
+ * @fieldia/viewer). Each is worn by its own kind of part alone, in either skin.
9
+ *
10
+ * Where a part's own rules draw it from a token (its edge, its corners), the
11
+ * token is set on the part; where a skin draws it otherwise (the underline
12
+ * skin's boxes have no ground), the setting is drawn outright. Last in the
13
+ * stylesheet, so it wins where it speaks; colours and sizes only, so right to
14
+ * left needs nothing of its own.
15
+ */
16
+ export declare const PARTS_CSS = "\n/* ---- each kind of part's own look ---------------------------------------------- */\n/* Boxes typed in or picked from: text, numbers, dates, dropdowns, and a date's calendar button. */\n.fd-form[data-inputs~=bg] :is(.fd-input:not([readonly]), .fd-calendar-button) { background: var(--fd-inputs-bg); }\n.fd-form[data-inputs~=border] :is(.fd-input, .fd-calendar-button) { --fd-border: var(--fd-inputs-border); --fd-border-strong: var(--fd-inputs-border); }\n.fd-form[data-inputs~=radius] :is(.fd-input, .fd-calendar-button) { --fd-control-radius: var(--fd-inputs-radius); }\n/* A record's title keeps its own big words. */\n.fd-form[data-inputs~=size] :where(.fd-input) { font-size: var(--fd-inputs-size); }\n/* The edge of the box being typed in and its glow (the underline skin draws its own line instead), the option and the day picked. */\n.fd-form[data-inputs~=accent] :is(.fd-input, .fd-combo, .fd-tags, .fd-date-pick) {\n --fd-accent: var(--fd-inputs-accent); --fd-accent-text: var(--fd-inputs-accent-text); --fd-focus: var(--fd-accent);\n --fd-accent-soft: color-mix(in srgb, var(--fd-accent) 12%, var(--fd-surface));\n --fd-focus-ring: 0 0 0 2px color-mix(in srgb, var(--fd-accent) 22%, transparent);\n}\n\n/* Options picked: rings and ticks take the accent; a scale's points, Yes and No, pictures and a ranking's lines are boxes too. */\n.fd-form[data-choices~=accent] :is(.fd-choices, .fd-points, .fd-image-choices, .fd-ranking, .fd-checkbox, .fd-switch, .fd-matrix-table, .fd-slider) {\n --fd-accent: var(--fd-choices-accent); --fd-accent-text: var(--fd-choices-accent-text); --fd-focus: var(--fd-accent);\n --fd-accent-soft: color-mix(in srgb, var(--fd-accent) 12%, var(--fd-surface));\n}\n.fd-form[data-choices~=bg] :is(.fd-points button, .fd-image-card, .fd-rank-item) { --fd-surface: var(--fd-choices-bg); }\n.fd-form[data-choices~=border] :is(.fd-points button, .fd-image-card, .fd-rank-item) { --fd-border: var(--fd-choices-border); }\n.fd-form[data-choices~=radius] :is(.fd-points button, .fd-image-card, .fd-rank-item) { --fd-control-radius: var(--fd-choices-radius); }\n.fd-form[data-choices~=size] :is(.fd-choices, .fd-points, .fd-image-card-words, .fd-rank-list) { font-size: var(--fd-choices-size); }\n\n/* Groups drawn as a card or a frame: a section, a record's sheet, a repeating group's cards. In the\n underline skin, which draws no card round a section, one given a ground or an edge becomes a card. */\n.fd-form[data-groups~=bg] :is(.fd-sections > .fd-section:not([data-style]), .fd-section[data-style=card][data-on-page], .fd-section[data-style=framed], .fd-card, .fd-repeat-card) {\n background: var(--fd-groups-bg); --fd-ground: var(--fd-groups-bg);\n}\n.fd-form[data-groups~=border] :is(.fd-sections > .fd-section:not([data-style]), .fd-section[data-style=card][data-on-page], .fd-section[data-style=framed], .fd-card, .fd-repeat-card) { border: 1px solid var(--fd-groups-border); }\n.fd-form[data-groups~=radius] :is(.fd-sections > .fd-section:not([data-style]), .fd-section[data-style=card][data-on-page], .fd-section[data-style=framed], .fd-card, .fd-repeat-card) { border-radius: var(--fd-groups-radius); }\n.fd-form[data-fd-skin=underline]:is([data-groups~=bg], [data-groups~=border]) :is(.fd-sections > .fd-section:not([data-style]), .fd-section[data-style=card][data-on-page]) {\n padding: var(--fd-group-pad, 18px 22px); border-radius: var(--fd-groups-radius, var(--fd-radius));\n}\n\n/* Buttons: Send, Next, Save, Add another \u2014 in a form, and in a dialog it opens. */\n:is(.fd-form, .fd-form-dialog)[data-buttons~=accent] .fd-button {\n --fd-accent: var(--fd-buttons-accent); --fd-accent-text: var(--fd-buttons-accent-text); --fd-focus: var(--fd-accent);\n --fd-accent-hover: color-mix(in srgb, var(--fd-accent) 84%, var(--fd-text));\n}\n:is(.fd-form, .fd-form-dialog)[data-buttons~=accent] .fd-button-primary:hover { filter: none; background: var(--fd-accent-hover); border-color: var(--fd-accent-hover); }\n:is(.fd-form, .fd-form-dialog)[data-buttons~=radius] .fd-button { border-radius: var(--fd-buttons-radius); }\n:is(.fd-form, .fd-form-dialog)[data-buttons~=size] .fd-button { font-size: var(--fd-buttons-size); }\n\n/* Tables of lines and a matrix's grid: the ground of their heading row, their lines, their words. */\n.fd-form[data-tables~=bg] :is(.fd-lines-table, .fd-matrix-table) thead th { background: var(--fd-tables-bg); }\n.fd-form[data-tables~=border] :is(.fd-lines-table, .fd-matrix-table) :is(th, td) { border-color: var(--fd-tables-border); }\n.fd-form[data-tables~=size] :is(.fd-lines-table, .fd-matrix-table) :is(th, td) { font-size: var(--fd-tables-size); }\n";