@kerfjs/ui 5.0.0-beta.110 → 5.0.0-beta.112

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/README.md +3 -0
  2. package/ai/component-catalog.json +161 -8
  3. package/ai/component-composition.json +119 -2
  4. package/ai/components/README.md +2 -0
  5. package/ai/components/backdrop-image.md +1 -0
  6. package/ai/components/button.md +5 -2
  7. package/ai/components/content-item.md +1 -0
  8. package/ai/components/editor-frame.md +80 -0
  9. package/ai/components/summary-row.md +5 -2
  10. package/ai/components/surface-scaffold.md +3 -0
  11. package/ai/components/value-preview.md +75 -0
  12. package/ai/public-api-signatures-v1.md +207 -50
  13. package/ai/skill.md +17 -0
  14. package/ai/webawesome-jsx-signatures-v1.md +1 -1
  15. package/dist/backdrop-image.d.ts +11 -0
  16. package/dist/backdrop-image.js +1 -1
  17. package/dist/browser/content-item.js +1 -0
  18. package/dist/browser/editor-frame.js +3 -0
  19. package/dist/browser/value-preview.js +3 -0
  20. package/dist/button.d.ts +4 -2
  21. package/dist/button.js +1 -1
  22. package/dist/catalog-resources.d.ts +2 -1
  23. package/dist/catalog.d.ts +2 -1
  24. package/dist/catalog.js +6 -4
  25. package/dist/catalog.js.map +1 -1
  26. package/dist/{chunk-JCCN3U6X.js → chunk-2J7XKAZX.js} +3 -2
  27. package/dist/chunk-2J7XKAZX.js.map +1 -0
  28. package/dist/chunk-3KFMLOTH.js +201 -0
  29. package/dist/chunk-3KFMLOTH.js.map +1 -0
  30. package/dist/{chunk-ATGAJVZ6.js → chunk-3OP66VXU.js} +64 -4
  31. package/dist/chunk-3OP66VXU.js.map +1 -0
  32. package/dist/{chunk-ZNROKDSZ.js → chunk-3V4OCDTL.js} +2 -8
  33. package/dist/chunk-3V4OCDTL.js.map +1 -0
  34. package/dist/{chunk-3GLYIIFR.js → chunk-3WWX2O4G.js} +3 -2
  35. package/dist/chunk-3WWX2O4G.js.map +1 -0
  36. package/dist/{chunk-SCDWURBO.js → chunk-5CLMV5YU.js} +21 -3
  37. package/dist/chunk-5CLMV5YU.js.map +1 -0
  38. package/dist/{chunk-P7EJ4CAD.js → chunk-ETFP7HAR.js} +2 -2
  39. package/dist/{chunk-P7EJ4CAD.js.map → chunk-ETFP7HAR.js.map} +1 -1
  40. package/dist/chunk-F653O57X.js +41 -0
  41. package/dist/chunk-F653O57X.js.map +1 -0
  42. package/dist/{chunk-SOFPUW3O.js → chunk-IIQ2XIMU.js} +4 -3
  43. package/dist/chunk-IIQ2XIMU.js.map +1 -0
  44. package/dist/chunk-IRC5N7FA.js +16 -0
  45. package/dist/chunk-IRC5N7FA.js.map +1 -0
  46. package/dist/{chunk-SQ5DH66U.js → chunk-ITENVZ6Q.js} +2 -15
  47. package/dist/chunk-ITENVZ6Q.js.map +1 -0
  48. package/dist/{chunk-4UB5Z3ZZ.js → chunk-K67XBCHG.js} +8 -4
  49. package/dist/chunk-K67XBCHG.js.map +1 -0
  50. package/dist/chunk-OK7FUK7U.js +9 -0
  51. package/dist/chunk-OK7FUK7U.js.map +1 -0
  52. package/dist/{chunk-WSEJ2FDE.js → chunk-OUCHU7JB.js} +2 -2
  53. package/dist/{chunk-WSEJ2FDE.js.map → chunk-OUCHU7JB.js.map} +1 -1
  54. package/dist/{chunk-KPINJHIC.js → chunk-PS24PVR6.js} +3 -1
  55. package/dist/chunk-PS24PVR6.js.map +1 -0
  56. package/dist/{chunk-6CDILXF4.js → chunk-S3DCRI2M.js} +31 -5
  57. package/dist/chunk-S3DCRI2M.js.map +1 -0
  58. package/dist/chunk-V6N3YLTM.js +56 -0
  59. package/dist/chunk-V6N3YLTM.js.map +1 -0
  60. package/dist/{chunk-HQZG3OFL.js → chunk-XRZSK2WC.js} +3 -2
  61. package/dist/chunk-XRZSK2WC.js.map +1 -0
  62. package/dist/{chunk-CPSGUGAY.js → chunk-YPAQFBMN.js} +4 -4
  63. package/dist/{chunk-CPSGUGAY.js.map → chunk-YPAQFBMN.js.map} +1 -1
  64. package/dist/collapsible-panel.d.ts +1 -0
  65. package/dist/collapsible-panel.js +3 -2
  66. package/dist/collapsible-panel.js.map +1 -1
  67. package/dist/content-item.d.ts +46 -2
  68. package/dist/content-item.js +4 -1
  69. package/dist/editor-frame.d.ts +41 -0
  70. package/dist/editor-frame.js +3 -0
  71. package/dist/editor-frame.js.map +1 -0
  72. package/dist/index.d.ts +5 -2
  73. package/dist/index.js +27 -23
  74. package/dist/list-action-row.js +2 -1
  75. package/dist/list-detail-dialog.d.ts +2 -1
  76. package/dist/list-detail-dialog.js +5 -4
  77. package/dist/list-detail-dialog.js.map +1 -1
  78. package/dist/list-item.js +2 -1
  79. package/dist/{nav-stack-CU_0dKtI.d.ts → nav-stack-CrZF95VO.d.ts} +2 -1
  80. package/dist/nav-stack.d.ts +2 -1
  81. package/dist/nav-stack.js +2 -1
  82. package/dist/pane.d.ts +3 -23
  83. package/dist/pane.js +2 -1
  84. package/dist/split-view.d.ts +2 -1
  85. package/dist/split-view.js +2 -1
  86. package/dist/styles/backdrop-image.css +24 -1
  87. package/dist/styles/components/actions/popup-menu/popup-menu.css +1 -1
  88. package/dist/styles/components/collections/summary-row/summary-row.css +7 -3
  89. package/dist/styles/components/data-display/value-preview/value-preview.css +18 -0
  90. package/dist/styles/components/surfaces/backdrop-image/backdrop-image.css +24 -1
  91. package/dist/styles/components/surfaces/content-item/content-item.css +52 -0
  92. package/dist/styles/components/surfaces/editor-frame/editor-frame.css +121 -0
  93. package/dist/styles/components/surfaces/surface-scaffold/surface-scaffold.css +25 -1
  94. package/dist/styles/content-item.css +3 -168
  95. package/dist/styles/editor-frame.css +121 -0
  96. package/dist/styles/foundation.css +9 -4
  97. package/dist/styles/popup-menu.css +1 -1
  98. package/dist/styles/styles.css +2 -0
  99. package/dist/styles/summary-row.css +7 -3
  100. package/dist/styles/surface-scaffold.css +25 -1
  101. package/dist/styles/value-preview.css +18 -0
  102. package/dist/styles/webawesome.css +2 -2
  103. package/dist/summary-row.d.ts +20 -11
  104. package/dist/summary-row.js +2 -1
  105. package/dist/surface-scaffold-register.js +1 -1
  106. package/dist/surface-scaffold.d.ts +30 -2
  107. package/dist/surface-scaffold.js +2 -2
  108. package/dist/surface-tint-DQgYCaP9.d.ts +25 -0
  109. package/dist/tab-navigator.d.ts +2 -1
  110. package/dist/tab-navigator.js +2 -1
  111. package/dist/tab-navigator.js.map +1 -1
  112. package/dist/toolbar.d.ts +1 -0
  113. package/dist/value-preview.d.ts +21 -0
  114. package/dist/value-preview.js +3 -0
  115. package/dist/value-preview.js.map +1 -0
  116. package/dist/wire-catalog.d.ts +2 -1
  117. package/dist/wire-catalog.js +1 -1
  118. package/dist/wire-content-items.js +88 -0
  119. package/dist/wire-content-items.js.map +1 -1
  120. package/dist/workbench-dialog.d.ts +2 -1
  121. package/dist/workbench-dialog.js +4 -3
  122. package/dist/workbench-dialog.js.map +1 -1
  123. package/dist/workbench.d.ts +2 -1
  124. package/dist/workbench.js +2 -1
  125. package/docs/accessibility.md +6 -0
  126. package/docs/backdrop-image.md +4 -0
  127. package/docs/button.md +15 -0
  128. package/docs/component-contract.md +34 -4
  129. package/docs/component-selection.md +16 -1
  130. package/docs/design/templates/button/emphasis-dark.svg +1 -1
  131. package/docs/design/templates/button-dark.svg +1 -1
  132. package/docs/design/templates/checkbox/error-dark.svg +1 -1
  133. package/docs/design/templates/checkbox/states.svg +1 -1
  134. package/docs/design/templates/checkbox-dark.svg +1 -1
  135. package/docs/design/templates/checkbox-group/horizontal-dark.svg +1 -1
  136. package/docs/design/templates/checkbox-group/vertical.svg +1 -1
  137. package/docs/design/templates/checkbox-group-dark.svg +1 -1
  138. package/docs/design/templates/checkbox-group.svg +1 -1
  139. package/docs/design/templates/checkbox.svg +1 -1
  140. package/docs/design/templates/choice-chips/color-palette-dark.svg +1 -1
  141. package/docs/design/templates/choice-chips-dark.svg +1 -1
  142. package/docs/design/templates/color-field/error-dark.svg +1 -1
  143. package/docs/design/templates/color-field/hint.svg +1 -1
  144. package/docs/design/templates/color-field-dark.svg +1 -1
  145. package/docs/design/templates/color-field.svg +1 -1
  146. package/docs/design/templates/color-picker/gray.svg +1 -1
  147. package/docs/design/templates/color-picker/hsb.svg +1 -1
  148. package/docs/design/templates/color-picker/rgb.svg +1 -1
  149. package/docs/design/templates/color-picker.svg +1 -1
  150. package/docs/design/templates/color-swatches/palette-dark.svg +1 -1
  151. package/docs/design/templates/color-swatches-dark.svg +1 -1
  152. package/docs/design/templates/disclosure/embedded.svg +1 -1
  153. package/docs/design/templates/disclosure/framed-sunken.svg +1 -1
  154. package/docs/design/templates/disclosure/plain.svg +1 -1
  155. package/docs/design/templates/disclosure.svg +1 -1
  156. package/docs/design/templates/message-composer/chat.svg +1 -1
  157. package/docs/design/templates/message-composer.svg +1 -1
  158. package/docs/design/templates/progress-bar/determinate.svg +1 -1
  159. package/docs/design/templates/progress-bar/tones.svg +1 -1
  160. package/docs/design/templates/progress-bar.svg +1 -1
  161. package/docs/design/templates/radio-group/horizontal-dark.svg +1 -1
  162. package/docs/design/templates/radio-group/vertical.svg +1 -1
  163. package/docs/design/templates/radio-group-dark.svg +1 -1
  164. package/docs/design/templates/radio-group.svg +1 -1
  165. package/docs/design/templates/search-field/empty.svg +1 -1
  166. package/docs/design/templates/search-field/tokens.svg +1 -1
  167. package/docs/design/templates/search-field.svg +1 -1
  168. package/docs/design/templates/select/form.svg +1 -1
  169. package/docs/design/templates/select.svg +1 -1
  170. package/docs/design/templates/slider/compact.svg +1 -1
  171. package/docs/design/templates/slider/readout.svg +1 -1
  172. package/docs/design/templates/slider/ticks.svg +1 -1
  173. package/docs/design/templates/slider.svg +1 -1
  174. package/docs/design/templates/switch/states.svg +1 -1
  175. package/docs/design/templates/switch.svg +1 -1
  176. package/docs/design/templates/tag-field/error-dark.svg +1 -1
  177. package/docs/design/templates/tag-field/error.svg +1 -1
  178. package/docs/design/templates/tag-field/tags.svg +1 -1
  179. package/docs/design/templates/tag-field-dark.svg +1 -1
  180. package/docs/design/templates/tag-field.svg +1 -1
  181. package/docs/design/templates/text-field/error-dark.svg +1 -1
  182. package/docs/design/templates/text-field/labeled.svg +1 -1
  183. package/docs/design/templates/text-field/multiline.svg +1 -1
  184. package/docs/design/templates/text-field/search.svg +1 -1
  185. package/docs/design/templates/text-field-dark.svg +1 -1
  186. package/docs/design/templates/text-field.svg +1 -1
  187. package/docs/design/templates/toolbar-control-group/icon-tile-danger-dark.svg +1 -1
  188. package/docs/design/templates/toolbar-control-group-dark.svg +1 -1
  189. package/docs/design/templates.md +3 -1
  190. package/docs/editor-frame.md +47 -0
  191. package/docs/investigations/content-item-media-scroll-performance.md +26 -0
  192. package/docs/layout.md +34 -0
  193. package/docs/manual-test-plan.md +27 -1
  194. package/docs/recipes.md +9 -0
  195. package/docs/surface-scaffold.md +50 -1
  196. package/docs/value-preview.md +16 -0
  197. package/llms.txt +10 -1
  198. package/package.json +13 -1
  199. package/dist/chunk-3GLYIIFR.js.map +0 -1
  200. package/dist/chunk-4UB5Z3ZZ.js.map +0 -1
  201. package/dist/chunk-5USKCWGL.js +0 -113
  202. package/dist/chunk-5USKCWGL.js.map +0 -1
  203. package/dist/chunk-6CDILXF4.js.map +0 -1
  204. package/dist/chunk-ATGAJVZ6.js.map +0 -1
  205. package/dist/chunk-HQZG3OFL.js.map +0 -1
  206. package/dist/chunk-JCCN3U6X.js.map +0 -1
  207. package/dist/chunk-KPINJHIC.js.map +0 -1
  208. package/dist/chunk-SCDWURBO.js.map +0 -1
  209. package/dist/chunk-SOFPUW3O.js.map +0 -1
  210. package/dist/chunk-SQ5DH66U.js.map +0 -1
  211. package/dist/chunk-ZNROKDSZ.js.map +0 -1
@@ -27,6 +27,11 @@
27
27
  isolation: isolate;
28
28
  }
29
29
 
30
+ .kui-backdrop-image[data-inline-bleed="false"] {
31
+ --_kui-backdrop-image-inset-start: 0px;
32
+ --_kui-backdrop-image-inset-end: 0px;
33
+ }
34
+
30
35
  /* `underChrome`: the block runs up beneath the scroller's block-start inset
31
36
  (overlay or clear chrome clearance plus the top safe area, as the Pane
32
37
  publishes it) and the hero grows by the same amount, so the visible image
@@ -60,6 +65,17 @@
60
65
  view-timeline: --kui-backdrop-image block;
61
66
  }
62
67
 
68
+ /* Dense feeds can skip offscreen image painting without changing the height
69
+ reserved by the hero's aspect ratio or the containing card body. */
70
+ .kui-backdrop-image[data-defer-offscreen="true"] .kui-backdrop-image__hero {
71
+ content-visibility: auto;
72
+ }
73
+
74
+ .kui-backdrop-image[data-aspect-ratio="true"] .kui-backdrop-image__hero {
75
+ min-height: 0;
76
+ aspect-ratio: var(--_kui-backdrop-image-ratio);
77
+ }
78
+
63
79
  .kui-backdrop-image__backdrop {
64
80
  position: absolute;
65
81
  inset: 0;
@@ -89,6 +105,10 @@
89
105
  background-position: var(--_kui-backdrop-image-position);
90
106
  }
91
107
 
108
+ .kui-backdrop-image__blurred[data-image-error="true"] {
109
+ display: none;
110
+ }
111
+
92
112
  /* Progressive blur: a copy over the sharp image, blurred once and hidden
93
113
  until the scroll timeline fades it in. A filtered copy overhangs the block
94
114
  by its radius on every side, so the blur's transparent fringe falls outside
@@ -208,7 +228,10 @@
208
228
  animation: none;
209
229
  }
210
230
 
211
- @media (update: slow) {
231
+ @media (update: slow),
232
+ (prefers-reduced-transparency: reduce),
233
+ (prefers-contrast: more),
234
+ (forced-colors: active) {
212
235
  .kui-backdrop-image[data-parallax="scroll"] .kui-backdrop-image__layers,
213
236
  .kui-backdrop-image[data-blur]
214
237
  :is(.kui-backdrop-image__blurred, .kui-backdrop-image__dim) {
@@ -402,7 +402,7 @@
402
402
  > .kui-popup-menu {
403
403
  margin: -2px;
404
404
  }
405
- .kui-toolbar-control-group:is([data-single="true"], [data-content="mixed"])
405
+ .kui-toolbar-control-group[data-content="mixed"]
406
406
  > .kui-popup-menu
407
407
  > .kui-popup-menu__trigger {
408
408
  min-width: max-content;
@@ -1,4 +1,4 @@
1
- /* A selectable summary: a full-width option on the base surface, a container
1
+ /* A summary surface: a full-width option or static group on the base surface, a container
2
2
  for its own compaction, with a hairline divider below each list row. */
3
3
  .kui-summary-row {
4
4
  --_kui-summary-row-rail: transparent;
@@ -18,7 +18,7 @@
18
18
  border-radius: 0;
19
19
  color: var(--kui-color-text);
20
20
  background: var(--kui-color-surface);
21
- cursor: pointer;
21
+ cursor: default;
22
22
  outline: none;
23
23
  container-type: inline-size;
24
24
  user-select: none;
@@ -47,7 +47,11 @@
47
47
  contain-intrinsic-size: auto 4.5rem;
48
48
  }
49
49
 
50
- .kui-summary-row:hover {
50
+ .kui-summary-row[role="option"] {
51
+ cursor: pointer;
52
+ }
53
+
54
+ .kui-summary-row[role="option"]:hover {
51
55
  border-color: var(--kui-color-brand-border-normal);
52
56
  }
53
57
 
@@ -0,0 +1,18 @@
1
+ .kui-value-preview {
2
+ display: block;
3
+ box-sizing: border-box;
4
+ min-width: 0;
5
+ min-height: var(--_kui-value-preview-min-height, 3rem);
6
+ max-height: var(--_kui-value-preview-max-height, 6rem);
7
+ overflow: auto;
8
+ color: var(--kui-color-text);
9
+ font-size: var(--kui-font-xs);
10
+ line-height: 1.4;
11
+ white-space: pre-wrap;
12
+ overflow-wrap: anywhere;
13
+ }
14
+
15
+ .kui-value-preview:focus-visible {
16
+ outline: var(--kui-focus-ring);
17
+ outline-offset: -2px;
18
+ }
@@ -27,6 +27,11 @@
27
27
  isolation: isolate;
28
28
  }
29
29
 
30
+ .kui-backdrop-image[data-inline-bleed="false"] {
31
+ --_kui-backdrop-image-inset-start: 0px;
32
+ --_kui-backdrop-image-inset-end: 0px;
33
+ }
34
+
30
35
  /* `underChrome`: the block runs up beneath the scroller's block-start inset
31
36
  (overlay or clear chrome clearance plus the top safe area, as the Pane
32
37
  publishes it) and the hero grows by the same amount, so the visible image
@@ -60,6 +65,17 @@
60
65
  view-timeline: --kui-backdrop-image block;
61
66
  }
62
67
 
68
+ /* Dense feeds can skip offscreen image painting without changing the height
69
+ reserved by the hero's aspect ratio or the containing card body. */
70
+ .kui-backdrop-image[data-defer-offscreen="true"] .kui-backdrop-image__hero {
71
+ content-visibility: auto;
72
+ }
73
+
74
+ .kui-backdrop-image[data-aspect-ratio="true"] .kui-backdrop-image__hero {
75
+ min-height: 0;
76
+ aspect-ratio: var(--_kui-backdrop-image-ratio);
77
+ }
78
+
63
79
  .kui-backdrop-image__backdrop {
64
80
  position: absolute;
65
81
  inset: 0;
@@ -89,6 +105,10 @@
89
105
  background-position: var(--_kui-backdrop-image-position);
90
106
  }
91
107
 
108
+ .kui-backdrop-image__blurred[data-image-error="true"] {
109
+ display: none;
110
+ }
111
+
92
112
  /* Progressive blur: a copy over the sharp image, blurred once and hidden
93
113
  until the scroll timeline fades it in. A filtered copy overhangs the block
94
114
  by its radius on every side, so the blur's transparent fringe falls outside
@@ -208,7 +228,10 @@
208
228
  animation: none;
209
229
  }
210
230
 
211
- @media (update: slow) {
231
+ @media (update: slow),
232
+ (prefers-reduced-transparency: reduce),
233
+ (prefers-contrast: more),
234
+ (forced-colors: active) {
212
235
  .kui-backdrop-image[data-parallax="scroll"] .kui-backdrop-image__layers,
213
236
  .kui-backdrop-image[data-blur]
214
237
  :is(.kui-backdrop-image__blurred, .kui-backdrop-image__dim) {
@@ -17,6 +17,54 @@
17
17
  background: var(--kui-content-item-background, transparent);
18
18
  }
19
19
 
20
+ /* BackdropImage supplies the image, overlay, fade, and per-card view timeline.
21
+ ContentItem owns only how that media block meets the card's geometry. */
22
+ .kui-content-item__media {
23
+ overflow: clip;
24
+ border-radius: max(0px, calc(var(--kui-content-item-radius, 12px) - 9px));
25
+ }
26
+
27
+ .kui-content-item[data-media-edge="true"] .kui-content-item__media {
28
+ margin-inline: calc(-1 * var(--kui-layout-item-padding, 0.5rem));
29
+ margin-block-start: calc(-1 * var(--kui-layout-item-padding, 0.5rem));
30
+ border-start-start-radius: max(
31
+ 0px,
32
+ calc(var(--kui-content-item-radius, 12px) - 1px)
33
+ );
34
+ border-start-end-radius: max(
35
+ 0px,
36
+ calc(var(--kui-content-item-radius, 12px) - 1px)
37
+ );
38
+ border-end-start-radius: 0;
39
+ border-end-end-radius: 0;
40
+ }
41
+
42
+ .kui-content-item__body {
43
+ min-width: 0;
44
+ margin-block-start: var(--kui-space-xs);
45
+ }
46
+
47
+ .kui-content-item[data-media-state][data-kui-tint][data-appearance="transparent"] {
48
+ --kui-content-item-background: var(--kui-color-surface);
49
+ }
50
+
51
+ .kui-content-item[data-media-state="error"] .kui-content-item__media {
52
+ display: none;
53
+ }
54
+
55
+ .kui-content-item[data-media-state="error"] .kui-content-item__body {
56
+ margin-block-start: 0;
57
+ }
58
+
59
+ @media (forced-colors: active) {
60
+ .kui-content-item .kui-content-item__media {
61
+ display: none;
62
+ }
63
+ .kui-content-item__body {
64
+ margin-block-start: 0;
65
+ }
66
+ }
67
+
20
68
  .kui-content-item--pill {
21
69
  --kui-content-item-radius: var(
22
70
  --kui-layout-pill-radius,
@@ -95,6 +143,10 @@
95
143
  --kui-content-item-foreground: var(--kui-color-danger-on-fill);
96
144
  }
97
145
 
146
+ .kui-content-item[data-media-fade="true"]:not([data-media-state="error"]) {
147
+ --kui-content-item-background: var(--_kui-content-item-media-fade-to);
148
+ }
149
+
98
150
  .kui-content-item[data-interactive="true"] {
99
151
  color: var(--kui-content-item-foreground, var(--kui-color-neutral-on-normal));
100
152
  cursor: pointer;
@@ -0,0 +1,121 @@
1
+ .kui-editor-frame {
2
+ display: flex;
3
+ width: min(100%, var(--_kui-editor-frame-max-width, 42rem));
4
+ height: var(--_kui-editor-frame-height, 20rem);
5
+ min-width: 0;
6
+ min-height: 0;
7
+ box-sizing: border-box;
8
+ overflow: hidden;
9
+ border: 1px solid var(--kui-color-neutral-border-normal);
10
+ border-radius: var(--kui-radius-l);
11
+ color: var(--kui-color-neutral-on-normal);
12
+ background: var(--kui-color-surface);
13
+ flex-direction: column;
14
+ }
15
+
16
+ .kui-editor-frame__toolbar {
17
+ flex: none;
18
+ }
19
+
20
+ .kui-editor-frame__surface {
21
+ display: flex;
22
+ min-width: 0;
23
+ min-height: 0;
24
+ padding: 1rem;
25
+ flex: 1 1 auto;
26
+ flex-direction: column;
27
+ }
28
+
29
+ .kui-editor-frame[data-mode="source"] > .kui-editor-frame__surface {
30
+ overflow: hidden;
31
+ }
32
+
33
+ .kui-editor-frame[data-mode="preview"] > .kui-editor-frame__surface {
34
+ overflow: auto;
35
+ }
36
+
37
+ .kui-editor-frame[data-mode="source"] > .kui-editor-frame__surface > textarea {
38
+ display: block;
39
+ width: 100%;
40
+ min-width: 0;
41
+ min-height: 0;
42
+ box-sizing: border-box;
43
+ padding: 0;
44
+ overflow: auto;
45
+ border: 0;
46
+ outline: 0;
47
+ color: inherit;
48
+ background: transparent;
49
+ flex: 1 1 auto;
50
+ font: inherit;
51
+ line-height: 1.6;
52
+ resize: none;
53
+ }
54
+
55
+ .kui-editor-frame[data-inset="flush"] > .kui-editor-frame__surface {
56
+ padding: 0;
57
+ }
58
+
59
+ .kui-editor-frame[data-appearance="embedded"]:not([data-expanded="true"]) {
60
+ width: 100%;
61
+ height: auto;
62
+ overflow: visible;
63
+ border: 0;
64
+ border-radius: 0;
65
+ background: transparent;
66
+ }
67
+
68
+ .kui-editor-frame[data-appearance="embedded"]:not([data-expanded="true"])
69
+ > .kui-editor-frame__surface {
70
+ min-height: 3rem;
71
+ padding: 0.75rem;
72
+ overflow: visible;
73
+ }
74
+
75
+ .kui-editor-frame[data-appearance="embedded"]:not(
76
+ [data-expanded="true"]
77
+ )[data-inset="flush"]
78
+ > .kui-editor-frame__surface {
79
+ padding: 0;
80
+ }
81
+
82
+ .kui-editor-frame[data-appearance="embedded"]:not(
83
+ [data-expanded="true"]
84
+ )[data-mode="source"]
85
+ > .kui-editor-frame__surface
86
+ > textarea {
87
+ height: var(--_kui-editor-frame-source-height, auto);
88
+ min-height: 3rem;
89
+ padding: 0;
90
+ overflow: auto;
91
+ flex: none;
92
+ resize: vertical;
93
+ }
94
+
95
+ .kui-editor-frame[data-appearance="embedded"]:not(
96
+ [data-expanded="true"]
97
+ )[data-mode="source"][data-source-autosize="true"]
98
+ > .kui-editor-frame__surface
99
+ > textarea {
100
+ field-sizing: content;
101
+ resize: none;
102
+ }
103
+
104
+ @supports not (field-sizing: content) {
105
+ .kui-editor-frame[data-appearance="embedded"]:not(
106
+ [data-expanded="true"]
107
+ )[data-mode="source"][data-source-autosize="true"]
108
+ > .kui-editor-frame__surface
109
+ > textarea {
110
+ resize: vertical;
111
+ }
112
+ }
113
+
114
+ .kui-editor-frame[data-expanded="true"] {
115
+ position: fixed;
116
+ z-index: 40;
117
+ inset: 2rem;
118
+ width: auto;
119
+ height: auto;
120
+ box-shadow: var(--kui-shadow-l);
121
+ }
@@ -52,6 +52,22 @@
52
52
  light-dark(rgb(29 29 31 / 0.34), rgb(0 0 0 / 0.6))
53
53
  );
54
54
  }
55
+ .kui-dialog-surface[data-stack-active="false"] {
56
+ pointer-events: none;
57
+ transform: translateY(var(--_kui-dialog-surface-stack-offset, 0px));
58
+ }
59
+ .kui-dialog-surface[data-stack-position] {
60
+ --_kui-dialog-surface-gutter: 1.5rem;
61
+ }
62
+ .kui-dialog-surface[data-stack-active="false"]::backdrop {
63
+ background: transparent;
64
+ }
65
+ @media screen and (max-width: 48rem) {
66
+ .kui-dialog-surface[data-stack-position] {
67
+ --_kui-dialog-surface-gutter: 1rem;
68
+ transform: none;
69
+ }
70
+ }
55
71
  /* Room for phones whose viewport height ignores the browser chrome. */
56
72
  @media screen and (max-width: 26.25rem) {
57
73
  .kui-dialog-surface {
@@ -173,15 +189,23 @@ h2.kui-dialog-surface__title {
173
189
  background: transparent;
174
190
  cursor: pointer;
175
191
  }
192
+ .kui-dialog-surface__close[data-emphasis="quiet"] {
193
+ color: var(--kui-color-text-quiet);
194
+ }
176
195
  .kui-dialog-surface__close:hover {
177
196
  background-color: var(--kui-color-neutral-fill-normal);
178
197
  }
198
+ .kui-dialog-surface__close[data-emphasis="quiet"]:is(:hover, :focus-visible) {
199
+ color: var(--kui-color-neutral-on-quiet);
200
+ }
179
201
  .kui-dialog-surface__close:focus-visible {
180
202
  outline: var(--kui-focus-ring);
181
203
  outline-offset: var(--kui-focus-ring-offset, 1px);
182
204
  }
183
205
  @media (forced-colors: active) {
184
- .kui-dialog-surface__close {
206
+ .kui-dialog-surface__close,
207
+ .kui-dialog-surface__close[data-emphasis="quiet"]:is(:hover, :focus-visible),
208
+ .kui-dialog-surface__close[data-emphasis="quiet"] {
185
209
  color: ButtonText;
186
210
  }
187
211
  }
@@ -1,168 +1,3 @@
1
- /* One self-contained content-item: 8px inline margin, a real 1px border
2
- (transparent unless framed), 8px padding, and a rounded or pill radius.
3
- Rendered by ContentItem; the classes stay public for other elements. */
4
-
5
- .kui-content-item {
6
- min-width: 0;
7
- margin-inline: var(--kui-layout-inline-margin, 0.5rem);
8
- padding: var(--kui-layout-item-padding, 0.5rem);
9
- box-sizing: border-box;
10
- border: var(--kui-layout-item-border-width, 1px) solid
11
- var(--kui-content-item-border, transparent);
12
- border-radius: var(
13
- --kui-content-item-radius,
14
- var(--kui-layout-rounded-radius, calc(1px + 0.6875rem))
15
- );
16
- color: var(--kui-content-item-foreground, inherit);
17
- background: var(--kui-content-item-background, transparent);
18
- }
19
-
20
- .kui-content-item--pill {
21
- --kui-content-item-radius: var(
22
- --kui-layout-pill-radius,
23
- calc(1px + 1.3125rem)
24
- );
25
- }
26
-
27
- .kui-content-item--flush {
28
- padding-block: 0;
29
- border-block-width: 0;
30
- }
31
-
32
- /* A visible frame for a content item that marks a real distinction: the
33
- standard neutral border, same geometry (the border is always reserved). */
34
- .kui-content-item--framed {
35
- --kui-content-item-border: var(--kui-color-neutral-border-normal);
36
- }
37
-
38
- .kui-content-item[data-appearance="surface"] {
39
- --kui-content-item-border: var(--kui-color-neutral-border-normal);
40
- --kui-content-item-background: var(--kui-color-surface);
41
- --kui-content-item-foreground: var(--kui-color-neutral-on-normal);
42
- }
43
-
44
- .kui-content-item[data-appearance="neutral"] {
45
- --kui-content-item-border: var(--kui-color-neutral-border-normal);
46
- --kui-content-item-background: var(--kui-color-neutral-fill-quiet);
47
- --kui-content-item-foreground: var(--kui-color-neutral-on-normal);
48
- }
49
-
50
- .kui-content-item[data-appearance="info"] {
51
- --kui-content-item-border: var(--kui-color-brand-border-quiet);
52
- --kui-content-item-background: var(--kui-color-brand-fill-quiet);
53
- --kui-content-item-foreground: var(--kui-color-brand-on-fill);
54
- }
55
-
56
- .kui-content-item[data-appearance="pop"] {
57
- --kui-content-item-border: var(--kui-color-pop-border-normal);
58
- --kui-content-item-background: var(--kui-color-pop-fill-quiet);
59
- --kui-content-item-foreground: var(--kui-color-pop-on-fill);
60
- }
61
-
62
- .kui-content-item[data-appearance="success"] {
63
- --kui-content-item-border: var(--kui-color-success-border-normal);
64
- --kui-content-item-background: var(--kui-color-success-fill-quiet);
65
- --kui-content-item-foreground: var(--kui-color-success-on-fill);
66
- }
67
-
68
- .kui-content-item[data-appearance="warning"] {
69
- --kui-content-item-border: var(--kui-color-warning-border-normal);
70
- --kui-content-item-background: var(--kui-color-warning-fill-quiet);
71
- --kui-content-item-foreground: var(--kui-color-warning-on-fill);
72
- }
73
-
74
- .kui-content-item[data-appearance="brand-loud"] {
75
- --kui-content-item-border: var(--kui-color-brand-border-loud);
76
- --kui-content-item-background: var(--kui-color-brand-fill-loud);
77
- --kui-content-item-foreground: var(--kui-color-brand-on-loud);
78
- }
79
-
80
- /* Chat bubble: the item shrinks to its content up to 80% of the row and sits
81
- at the start or end of the line; long unbroken text wraps inside it. */
82
- .kui-content-item[data-bubble] {
83
- width: fit-content;
84
- max-width: 80%;
85
- overflow-wrap: anywhere;
86
- }
87
-
88
- .kui-content-item[data-bubble="end"] {
89
- margin-inline-start: auto;
90
- }
91
-
92
- .kui-content-item[data-appearance="danger"] {
93
- --kui-content-item-border: var(--kui-color-danger-border-quiet);
94
- --kui-content-item-background: var(--kui-color-danger-fill-quiet);
95
- --kui-content-item-foreground: var(--kui-color-danger-on-fill);
96
- }
97
-
98
- .kui-content-item[data-interactive="true"] {
99
- color: var(--kui-content-item-foreground, var(--kui-color-neutral-on-normal));
100
- cursor: pointer;
101
- }
102
-
103
- .kui-content-item[data-interactive="true"]:hover:not(
104
- [data-disabled="true"],
105
- [data-selected="true"]
106
- ),
107
- .kui-content-item[data-interactive="true"][data-kui-pressed="true"]:not(
108
- [data-selected="true"]
109
- ) {
110
- --kui-content-item-border: var(--kui-color-neutral-border-normal);
111
- --kui-content-item-background: var(--kui-color-neutral-fill-normal);
112
- --kui-content-item-foreground: var(--kui-color-neutral-on-normal);
113
- }
114
-
115
- .kui-content-item[data-interactive="true"]:active:not([data-disabled="true"]) {
116
- --kui-content-item-background: color-mix(
117
- in srgb,
118
- var(--kui-color-neutral-fill-normal) 75%,
119
- var(--kui-color-neutral-fill-loud)
120
- );
121
- }
122
-
123
- .kui-content-item[data-interactive="true"][data-selected="true"] {
124
- --kui-content-item-border: var(--kui-color-brand-border-quiet);
125
- --kui-content-item-background: var(--kui-color-brand-fill-normal);
126
- --kui-content-item-foreground: var(--kui-color-brand-on-fill);
127
- }
128
-
129
- /* The surface context follows the fill an item paints: a quiet appearance,
130
- a hover, press, or selection. A transparent item keeps its parent's
131
- context; a brand-loud fill shares the focus ring's hue, so a control on it
132
- keeps the surface line. A surface appearance is opaque, so it resets. */
133
- .kui-content-item:is(
134
- [data-appearance]:not(
135
- [data-appearance="transparent"],
136
- [data-appearance="brand-loud"]
137
- ),
138
- [data-interactive="true"]:hover:not([data-disabled="true"]),
139
- [data-interactive="true"]:is(
140
- [data-kui-pressed="true"],
141
- [data-selected="true"]
142
- )
143
- ) {
144
- --kui-color-surface-current-tint: var(--kui-content-item-background);
145
- }
146
-
147
- .kui-content-item[data-appearance="surface"]:not(
148
- [data-interactive="true"]:is(
149
- :hover,
150
- [data-kui-pressed="true"],
151
- [data-selected="true"]
152
- )
153
- ) {
154
- --kui-color-surface-current: var(--kui-color-surface);
155
- --kui-color-surface-current-region: transparent;
156
- --kui-color-surface-current-tint: transparent;
157
- }
158
-
159
- .kui-content-item:is(:focus-visible, [data-outlined="true"]) {
160
- outline: var(--kui-focus-ring);
161
- outline-offset: 1px;
162
- }
163
-
164
- .kui-content-item[data-interactive="true"][data-disabled="true"] {
165
- color: var(--kui-color-neutral-on-quiet);
166
- opacity: 0.58;
167
- cursor: not-allowed;
168
- }
1
+ /* Public stylesheet entry; implementation is colocated with the component. */
2
+ @import "./backdrop-image.css";
3
+ @import "./components/surfaces/content-item/content-item.css";
@@ -0,0 +1,121 @@
1
+ .kui-editor-frame {
2
+ display: flex;
3
+ width: min(100%, var(--_kui-editor-frame-max-width, 42rem));
4
+ height: var(--_kui-editor-frame-height, 20rem);
5
+ min-width: 0;
6
+ min-height: 0;
7
+ box-sizing: border-box;
8
+ overflow: hidden;
9
+ border: 1px solid var(--kui-color-neutral-border-normal);
10
+ border-radius: var(--kui-radius-l);
11
+ color: var(--kui-color-neutral-on-normal);
12
+ background: var(--kui-color-surface);
13
+ flex-direction: column;
14
+ }
15
+
16
+ .kui-editor-frame__toolbar {
17
+ flex: none;
18
+ }
19
+
20
+ .kui-editor-frame__surface {
21
+ display: flex;
22
+ min-width: 0;
23
+ min-height: 0;
24
+ padding: 1rem;
25
+ flex: 1 1 auto;
26
+ flex-direction: column;
27
+ }
28
+
29
+ .kui-editor-frame[data-mode="source"] > .kui-editor-frame__surface {
30
+ overflow: hidden;
31
+ }
32
+
33
+ .kui-editor-frame[data-mode="preview"] > .kui-editor-frame__surface {
34
+ overflow: auto;
35
+ }
36
+
37
+ .kui-editor-frame[data-mode="source"] > .kui-editor-frame__surface > textarea {
38
+ display: block;
39
+ width: 100%;
40
+ min-width: 0;
41
+ min-height: 0;
42
+ box-sizing: border-box;
43
+ padding: 0;
44
+ overflow: auto;
45
+ border: 0;
46
+ outline: 0;
47
+ color: inherit;
48
+ background: transparent;
49
+ flex: 1 1 auto;
50
+ font: inherit;
51
+ line-height: 1.6;
52
+ resize: none;
53
+ }
54
+
55
+ .kui-editor-frame[data-inset="flush"] > .kui-editor-frame__surface {
56
+ padding: 0;
57
+ }
58
+
59
+ .kui-editor-frame[data-appearance="embedded"]:not([data-expanded="true"]) {
60
+ width: 100%;
61
+ height: auto;
62
+ overflow: visible;
63
+ border: 0;
64
+ border-radius: 0;
65
+ background: transparent;
66
+ }
67
+
68
+ .kui-editor-frame[data-appearance="embedded"]:not([data-expanded="true"])
69
+ > .kui-editor-frame__surface {
70
+ min-height: 3rem;
71
+ padding: 0.75rem;
72
+ overflow: visible;
73
+ }
74
+
75
+ .kui-editor-frame[data-appearance="embedded"]:not(
76
+ [data-expanded="true"]
77
+ )[data-inset="flush"]
78
+ > .kui-editor-frame__surface {
79
+ padding: 0;
80
+ }
81
+
82
+ .kui-editor-frame[data-appearance="embedded"]:not(
83
+ [data-expanded="true"]
84
+ )[data-mode="source"]
85
+ > .kui-editor-frame__surface
86
+ > textarea {
87
+ height: var(--_kui-editor-frame-source-height, auto);
88
+ min-height: 3rem;
89
+ padding: 0;
90
+ overflow: auto;
91
+ flex: none;
92
+ resize: vertical;
93
+ }
94
+
95
+ .kui-editor-frame[data-appearance="embedded"]:not(
96
+ [data-expanded="true"]
97
+ )[data-mode="source"][data-source-autosize="true"]
98
+ > .kui-editor-frame__surface
99
+ > textarea {
100
+ field-sizing: content;
101
+ resize: none;
102
+ }
103
+
104
+ @supports not (field-sizing: content) {
105
+ .kui-editor-frame[data-appearance="embedded"]:not(
106
+ [data-expanded="true"]
107
+ )[data-mode="source"][data-source-autosize="true"]
108
+ > .kui-editor-frame__surface
109
+ > textarea {
110
+ resize: vertical;
111
+ }
112
+ }
113
+
114
+ .kui-editor-frame[data-expanded="true"] {
115
+ position: fixed;
116
+ z-index: 40;
117
+ inset: 2rem;
118
+ width: auto;
119
+ height: auto;
120
+ box-shadow: var(--kui-shadow-l);
121
+ }