@namroodinc/liquid-editorial 0.12.0 → 0.13.1

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 (199) hide show
  1. package/README.md +17 -7
  2. package/UPGRADING.md +90 -0
  3. package/dist/chunks/{Avatar-DPnrvkwd.cjs → Avatar-BY0dAItT.cjs} +2 -2
  4. package/dist/chunks/{Avatar-DPnrvkwd.cjs.map → Avatar-BY0dAItT.cjs.map} +1 -1
  5. package/dist/chunks/{Avatar-BK8IdL5W.js → Avatar-UjhjcHh5.js} +2 -2
  6. package/dist/chunks/{Avatar-BK8IdL5W.js.map → Avatar-UjhjcHh5.js.map} +1 -1
  7. package/dist/chunks/{Board-BCS7sDXg.js → Board-6fXt1YFp.js} +2 -2
  8. package/dist/chunks/{Board-BCS7sDXg.js.map → Board-6fXt1YFp.js.map} +1 -1
  9. package/dist/chunks/{Board-CNVy8gHI.cjs → Board-DfVQSb_L.cjs} +2 -2
  10. package/dist/chunks/{Board-CNVy8gHI.cjs.map → Board-DfVQSb_L.cjs.map} +1 -1
  11. package/dist/chunks/{CollectionView-DrszOUOt.cjs → CollectionView-CIJdNwcq.cjs} +2 -2
  12. package/dist/chunks/{CollectionView-DrszOUOt.cjs.map → CollectionView-CIJdNwcq.cjs.map} +1 -1
  13. package/dist/chunks/{CollectionView-B0ZJxkNK.js → CollectionView-JRNdXHti.js} +2 -2
  14. package/dist/chunks/{CollectionView-B0ZJxkNK.js.map → CollectionView-JRNdXHti.js.map} +1 -1
  15. package/dist/chunks/{ColourField-C39pcjkG.js → ColourField-YaCEWiPA.js} +147 -153
  16. package/dist/chunks/ColourField-YaCEWiPA.js.map +1 -0
  17. package/dist/chunks/ColourField-bgi6TLOM.cjs +2 -0
  18. package/dist/chunks/ColourField-bgi6TLOM.cjs.map +1 -0
  19. package/dist/chunks/{DatePicker-Dpvfomrm.cjs → DatePicker-CCygKPuy.cjs} +2 -2
  20. package/dist/chunks/{DatePicker-Dpvfomrm.cjs.map → DatePicker-CCygKPuy.cjs.map} +1 -1
  21. package/dist/chunks/{DatePicker-DDc1nDTb.js → DatePicker-CHJYSaLU.js} +22 -22
  22. package/dist/chunks/{DatePicker-DDc1nDTb.js.map → DatePicker-CHJYSaLU.js.map} +1 -1
  23. package/dist/chunks/{Drawer-C3mWT9Kh.js → Drawer-Ck5XKT_V.js} +3 -3
  24. package/dist/chunks/{Drawer-C3mWT9Kh.js.map → Drawer-Ck5XKT_V.js.map} +1 -1
  25. package/dist/chunks/{Drawer-DTKZptua.cjs → Drawer-DdIH9jpe.cjs} +2 -2
  26. package/dist/chunks/{Drawer-DTKZptua.cjs.map → Drawer-DdIH9jpe.cjs.map} +1 -1
  27. package/dist/chunks/{EntryPicker-CgWbgWnc.cjs → EntryPicker-DmiAnu9l.cjs} +2 -2
  28. package/dist/chunks/{EntryPicker-CgWbgWnc.cjs.map → EntryPicker-DmiAnu9l.cjs.map} +1 -1
  29. package/dist/chunks/{EntryPicker-DlEsVCvA.js → EntryPicker-WERMwe0h.js} +3 -3
  30. package/dist/chunks/{EntryPicker-DlEsVCvA.js.map → EntryPicker-WERMwe0h.js.map} +1 -1
  31. package/dist/chunks/{FormEditor-iACd0El-.cjs → FormEditor-B8USzAky.cjs} +2 -2
  32. package/dist/chunks/{FormEditor-iACd0El-.cjs.map → FormEditor-B8USzAky.cjs.map} +1 -1
  33. package/dist/chunks/{FormEditor-CLLOHKiO.js → FormEditor-BG2RhC71.js} +16 -16
  34. package/dist/chunks/{FormEditor-CLLOHKiO.js.map → FormEditor-BG2RhC71.js.map} +1 -1
  35. package/dist/chunks/{Icon-CD3oeiNA.cjs → Icon-C12r4frL.cjs} +2 -2
  36. package/dist/chunks/Icon-C12r4frL.cjs.map +1 -0
  37. package/dist/chunks/{Icon-CYXOo0Kt.js → Icon-Peb0houB.js} +38 -36
  38. package/dist/chunks/Icon-Peb0houB.js.map +1 -0
  39. package/dist/chunks/{Message-CyLq9ef-.js → Message-CMoH7jcg.js} +5 -9
  40. package/dist/chunks/{Message-CyLq9ef-.js.map → Message-CMoH7jcg.js.map} +1 -1
  41. package/dist/chunks/{Message-D3b8HDhm.cjs → Message-qguX0uZk.cjs} +2 -2
  42. package/dist/chunks/{Message-D3b8HDhm.cjs.map → Message-qguX0uZk.cjs.map} +1 -1
  43. package/dist/chunks/RichTextEditor-BSA4uzKm.cjs +2 -0
  44. package/dist/chunks/RichTextEditor-BSA4uzKm.cjs.map +1 -0
  45. package/dist/chunks/{RichTextEditor-B0P53GFt.js → RichTextEditor-D8VQAM5h.js} +396 -375
  46. package/dist/chunks/RichTextEditor-D8VQAM5h.js.map +1 -0
  47. package/dist/chunks/{dialogLabel-D18maX-p.js → dialogLabel-DT7rCr3_.js} +19 -19
  48. package/dist/chunks/{dialogLabel-D18maX-p.js.map → dialogLabel-DT7rCr3_.js.map} +1 -1
  49. package/dist/chunks/{dialogLabel-2HRYMHbF.cjs → dialogLabel-_-MTckE_.cjs} +2 -2
  50. package/dist/chunks/{dialogLabel-2HRYMHbF.cjs.map → dialogLabel-_-MTckE_.cjs.map} +1 -1
  51. package/dist/chunks/overlayLayer-iGhuAByk.cjs +2 -0
  52. package/dist/chunks/overlayLayer-iGhuAByk.cjs.map +1 -0
  53. package/dist/chunks/{overlayLayer-IuoPVwTO.js → overlayLayer-lU4iWSjO.js} +32 -28
  54. package/dist/chunks/overlayLayer-lU4iWSjO.js.map +1 -0
  55. package/dist/chunks/{group-7Z_xRlQx.js → style-7Z_xRlQx.js} +1 -1
  56. package/dist/chunks/{group-7Z_xRlQx.js.map → style-7Z_xRlQx.js.map} +1 -1
  57. package/dist/chunks/{group-nulIa2_8.cjs → style-nulIa2_8.cjs} +1 -1
  58. package/dist/chunks/{group-nulIa2_8.cjs.map → style-nulIa2_8.cjs.map} +1 -1
  59. package/dist/chunks/{use-picker-session-DbfOJstX.cjs → use-picker-session-CM0zcEbf.cjs} +2 -2
  60. package/dist/chunks/{use-picker-session-DbfOJstX.cjs.map → use-picker-session-CM0zcEbf.cjs.map} +1 -1
  61. package/dist/chunks/{use-picker-session-BnMxbGAZ.js → use-picker-session-GCDShVBy.js} +3 -3
  62. package/dist/chunks/{use-picker-session-BnMxbGAZ.js.map → use-picker-session-GCDShVBy.js.map} +1 -1
  63. package/dist/chunks/{useTooltip-BXAvQwt4.cjs → useTooltip-C7ON4nkV.cjs} +2 -2
  64. package/dist/chunks/{useTooltip-BXAvQwt4.cjs.map → useTooltip-C7ON4nkV.cjs.map} +1 -1
  65. package/dist/chunks/{useTooltip-BrC7FdeH.js → useTooltip-DnJEFBLg.js} +2 -2
  66. package/dist/chunks/{useTooltip-BrC7FdeH.js.map → useTooltip-DnJEFBLg.js.map} +1 -1
  67. package/dist/components/AppShell/index.cjs +1 -1
  68. package/dist/components/AppShell/index.js +1 -1
  69. package/dist/components/AssetCard/index.cjs +1 -1
  70. package/dist/components/AssetCard/index.js +1 -1
  71. package/dist/components/AssetGrid/index.cjs +1 -1
  72. package/dist/components/AssetGrid/index.js +1 -1
  73. package/dist/components/Avatar/index.cjs +1 -1
  74. package/dist/components/Avatar/index.js +1 -1
  75. package/dist/components/Badge/style.css +9 -9
  76. package/dist/components/Banner/index.cjs +1 -1
  77. package/dist/components/Banner/index.js +1 -1
  78. package/dist/components/Board/index.cjs +1 -1
  79. package/dist/components/Board/index.js +1 -1
  80. package/dist/components/Board/style.css +3 -3
  81. package/dist/components/Button/index.cjs +1 -1
  82. package/dist/components/Button/index.js +1 -1
  83. package/dist/components/Button/style.css +4 -8
  84. package/dist/components/Choice/index.cjs +1 -1
  85. package/dist/components/Choice/index.cjs.map +1 -1
  86. package/dist/components/Choice/index.js +3 -3
  87. package/dist/components/Choice/index.js.map +1 -1
  88. package/dist/components/Choice/style.css +29 -18
  89. package/dist/components/CollectionView/index.cjs +1 -1
  90. package/dist/components/CollectionView/index.js +1 -1
  91. package/dist/components/ColourField/index.cjs +1 -1
  92. package/dist/components/ColourField/index.d.cts.map +1 -1
  93. package/dist/components/ColourField/index.d.ts.map +1 -1
  94. package/dist/components/ColourField/index.js +1 -1
  95. package/dist/components/ColourField/style.css +4 -4
  96. package/dist/components/DatePicker/index.cjs +1 -1
  97. package/dist/components/DatePicker/index.js +1 -1
  98. package/dist/components/Drawer/index.cjs +1 -1
  99. package/dist/components/Drawer/index.js +1 -1
  100. package/dist/components/Drawer/style.css +2 -4
  101. package/dist/components/EditLayout/index.cjs +1 -1
  102. package/dist/components/EditLayout/index.js +4 -4
  103. package/dist/components/EditLayout/style.css +1 -7
  104. package/dist/components/EntryPicker/index.cjs +1 -1
  105. package/dist/components/EntryPicker/index.js +1 -1
  106. package/dist/components/EntryPicker/style.css +3 -1
  107. package/dist/components/Field/style.css +1 -1
  108. package/dist/components/FormEditor/README.md +28 -33
  109. package/dist/components/FormEditor/index.cjs +1 -1
  110. package/dist/components/FormEditor/index.js +1 -1
  111. package/dist/components/FormEditor/style.css +1 -0
  112. package/dist/components/Icon/icons.d.cts +2 -0
  113. package/dist/components/Icon/icons.d.cts.map +1 -1
  114. package/dist/components/Icon/icons.d.ts +2 -0
  115. package/dist/components/Icon/icons.d.ts.map +1 -1
  116. package/dist/components/Icon/index.cjs +1 -1
  117. package/dist/components/Icon/index.js +1 -1
  118. package/dist/components/LimitReading/style.css +1 -1
  119. package/dist/components/Menu/index.cjs +1 -1
  120. package/dist/components/Menu/index.js +1 -1
  121. package/dist/components/Menu/style.css +3 -2
  122. package/dist/components/Modal/index.cjs +1 -1
  123. package/dist/components/Modal/index.js +2 -2
  124. package/dist/components/Modal/style.css +1 -3
  125. package/dist/components/Popover/index.cjs +1 -1
  126. package/dist/components/Popover/index.cjs.map +1 -1
  127. package/dist/components/Popover/index.d.cts.map +1 -1
  128. package/dist/components/Popover/index.d.ts.map +1 -1
  129. package/dist/components/Popover/index.js +58 -55
  130. package/dist/components/Popover/index.js.map +1 -1
  131. package/dist/components/RichTextEditor/index.cjs +1 -1
  132. package/dist/components/RichTextEditor/index.d.cts.map +1 -1
  133. package/dist/components/RichTextEditor/index.d.ts.map +1 -1
  134. package/dist/components/RichTextEditor/index.js +1 -1
  135. package/dist/components/RichTextEditor/storyblock-view.d.cts.map +1 -1
  136. package/dist/components/RichTextEditor/storyblock-view.d.ts.map +1 -1
  137. package/dist/components/RichTextEditor/style.css +141 -61
  138. package/dist/components/SearchField/index.cjs +1 -1
  139. package/dist/components/SearchField/index.js +1 -1
  140. package/dist/components/Select/index.cjs +1 -1
  141. package/dist/components/Select/index.js +2 -2
  142. package/dist/components/SelectionCard/index.cjs +1 -1
  143. package/dist/components/SelectionCard/index.cjs.map +1 -1
  144. package/dist/components/SelectionCard/index.d.cts.map +1 -1
  145. package/dist/components/SelectionCard/index.d.ts.map +1 -1
  146. package/dist/components/SelectionCard/index.js +2 -2
  147. package/dist/components/SelectionCard/index.js.map +1 -1
  148. package/dist/components/SelectionCard/style.css +20 -65
  149. package/dist/components/SideNav/index.cjs +1 -1
  150. package/dist/components/SideNav/index.js +1 -1
  151. package/dist/components/Skeleton/style.css +1 -1
  152. package/dist/components/Slider/style.css +12 -23
  153. package/dist/components/SortableList/index.cjs +1 -1
  154. package/dist/components/SortableList/index.js +1 -1
  155. package/dist/components/Stepper/index.cjs +1 -1
  156. package/dist/components/Stepper/index.js +1 -1
  157. package/dist/components/SubNav/index.cjs +1 -1
  158. package/dist/components/SubNav/index.js +1 -1
  159. package/dist/components/Switch/index.cjs +1 -1
  160. package/dist/components/Switch/index.cjs.map +1 -1
  161. package/dist/components/Switch/index.d.cts.map +1 -1
  162. package/dist/components/Switch/index.d.ts.map +1 -1
  163. package/dist/components/Switch/index.js +2 -1
  164. package/dist/components/Switch/index.js.map +1 -1
  165. package/dist/components/Switch/style.css +14 -2
  166. package/dist/components/Table/index.cjs +1 -1
  167. package/dist/components/Table/index.js +1 -1
  168. package/dist/components/TagsInput/style.css +3 -21
  169. package/dist/components/Time/index.cjs +1 -1
  170. package/dist/components/Time/index.js +1 -1
  171. package/dist/components/Toast/index.cjs +1 -1
  172. package/dist/components/Toast/index.js +1 -1
  173. package/dist/components/TopNav/index.cjs +1 -1
  174. package/dist/components/TopNav/index.js +1 -1
  175. package/dist/elements.css +2 -1
  176. package/dist/index.cjs +1 -1
  177. package/dist/index.js +30 -30
  178. package/dist/internal/dialogFocus.d.cts +2 -0
  179. package/dist/internal/dialogFocus.d.cts.map +1 -1
  180. package/dist/internal/dialogFocus.d.ts +2 -0
  181. package/dist/internal/dialogFocus.d.ts.map +1 -1
  182. package/dist/message.css +5 -3
  183. package/dist/tokens.css +83 -309
  184. package/package.json +1 -1
  185. package/dist/chunks/ColourField-BdobU76j.cjs +0 -2
  186. package/dist/chunks/ColourField-BdobU76j.cjs.map +0 -1
  187. package/dist/chunks/ColourField-C39pcjkG.js.map +0 -1
  188. package/dist/chunks/Icon-CD3oeiNA.cjs.map +0 -1
  189. package/dist/chunks/Icon-CYXOo0Kt.js.map +0 -1
  190. package/dist/chunks/RichTextEditor-B0P53GFt.js.map +0 -1
  191. package/dist/chunks/RichTextEditor-Wu_yjvD7.cjs +0 -2
  192. package/dist/chunks/RichTextEditor-Wu_yjvD7.cjs.map +0 -1
  193. package/dist/chunks/overlayLayer-IuoPVwTO.js.map +0 -1
  194. package/dist/chunks/overlayLayer-seJG-EFn.cjs +0 -2
  195. package/dist/chunks/overlayLayer-seJG-EFn.cjs.map +0 -1
  196. package/dist/components/ColourField/focus.d.cts +0 -3
  197. package/dist/components/ColourField/focus.d.cts.map +0 -1
  198. package/dist/components/ColourField/focus.d.ts +0 -3
  199. package/dist/components/ColourField/focus.d.ts.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/RichTextEditor/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAQL,KAAK,SAAS,EAEf,MAAM,OAAO,CAAC;AAoBf,OAAO,EAAsB,KAAK,2BAA2B,EAAE,MAAM,aAAa,CAAC;AACnF,OAAO,EAKL,KAAK,gBAAgB,EACtB,MAAM,YAAY,CAAC;AACpB,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C,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iEAAiE;IACjE,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,MAAM,CAAC,EAAE,oBAAoB,CAAC;IAC9B,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,MAAM,MAAM,mBAAmB,GAAG,yBAAyB,GACzD,CACI;IAAE,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;CAAE,GAC7F;IACE,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,gBAAgB,CAAC;IACzB,YAAY,CAAC,EAAE,gBAAgB,CAAC;IAChC,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,gBAAgB,KAAK,IAAI,CAAC;CACjD,CACJ,CAAC;AAoaJ,eAAO,MAAM,cAAc,gHA6N1B,CAAC"}
@@ -1,2 +1,2 @@
1
1
  import "../Field/index.js";
2
- export { t as RichTextEditor } from "../../chunks/RichTextEditor-B0P53GFt.js";
2
+ export { t as RichTextEditor } from "../../chunks/RichTextEditor-D8VQAM5h.js";
@@ -1 +1 @@
1
- {"version":3,"file":"storyblock-view.d.cts","sourceRoot":"","sources":["../../../src/components/RichTextEditor/storyblock-view.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAmB,KAAK,aAAa,EAAE,MAAM,eAAe,CAAC;AAwTpE,wBAAgB,cAAc,CAAC,EAC7B,IAAI,EACJ,QAAQ,EACR,MAAM,EACN,MAAM,EACN,gBAAgB,GACjB,EAAE,aAAa,+BAyFf"}
1
+ {"version":3,"file":"storyblock-view.d.cts","sourceRoot":"","sources":["../../../src/components/RichTextEditor/storyblock-view.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAmB,KAAK,aAAa,EAAE,MAAM,eAAe,CAAC;AA8WpE,wBAAgB,cAAc,CAAC,EAC7B,IAAI,EACJ,QAAQ,EACR,MAAM,EACN,MAAM,EACN,gBAAgB,GACjB,EAAE,aAAa,+BA8Ff"}
@@ -1 +1 @@
1
- {"version":3,"file":"storyblock-view.d.ts","sourceRoot":"","sources":["../../../src/components/RichTextEditor/storyblock-view.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAmB,KAAK,aAAa,EAAE,MAAM,eAAe,CAAC;AAwTpE,wBAAgB,cAAc,CAAC,EAC7B,IAAI,EACJ,QAAQ,EACR,MAAM,EACN,MAAM,EACN,gBAAgB,GACjB,EAAE,aAAa,+BAyFf"}
1
+ {"version":3,"file":"storyblock-view.d.ts","sourceRoot":"","sources":["../../../src/components/RichTextEditor/storyblock-view.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAmB,KAAK,aAAa,EAAE,MAAM,eAAe,CAAC;AA8WpE,wBAAgB,cAAc,CAAC,EAC7B,IAAI,EACJ,QAAQ,EACR,MAAM,EACN,MAAM,EACN,gBAAgB,GACjB,EAAE,aAAa,+BA8Ff"}
@@ -1,25 +1,46 @@
1
1
  @layer components {
2
- /* Writing rests on the card fill; the toolbar is a separate filled band. */
2
+ .ds-rte,
3
+ .ds-rte__surface[data-expanded] {
4
+ --rte-fill: var(--field-rest);
5
+ }
6
+
3
7
  .ds-rte {
4
8
  display: flex;
5
9
  flex-direction: column;
6
10
  border: 0;
7
11
  border-radius: var(--field-radius);
8
-
9
- /* Surface on the canvas, the alternate row fill inside Modal and Drawer,
10
- * so the writing area keeps its shape on any ground. */
11
- background: var(--fill-card);
12
+ background: var(--rte-fill);
12
13
  color: var(--color-text);
13
14
  font-family: var(--font-sans);
14
15
  overflow: hidden;
15
16
  }
16
17
 
17
- .ds-rte[data-focused] {
18
+ .ds-rte:where(:hover):not([data-disabled], [data-expanded]),
19
+ .ds-rte__surface[data-expanded]:where(:hover):not([data-disabled]),
20
+ .ds-rte[data-focused],
21
+ .ds-rte__surface[data-expanded][data-focused] {
22
+ --rte-fill: var(--field-hover);
23
+ }
24
+
25
+ .ds-rte[data-focused],
26
+ .ds-rte__surface[data-expanded][data-focused] {
18
27
  outline: var(--focus-width) solid var(--color-focus);
19
28
  outline-offset: 2px;
20
29
  }
21
30
 
22
- .ds-rte[data-disabled] {
31
+ .ds-rte[data-invalid]:not([data-expanded]),
32
+ .ds-rte__surface[data-expanded][data-invalid] {
33
+ --rte-fill: var(--field-invalid);
34
+ }
35
+
36
+ /* Invalid and focused steps further, as the Field skin does. */
37
+ .ds-rte[data-invalid][data-focused]:not([data-expanded]),
38
+ .ds-rte__surface[data-expanded][data-invalid][data-focused] {
39
+ --rte-fill: var(--field-invalid-focus);
40
+ }
41
+
42
+ .ds-rte[data-disabled],
43
+ .ds-rte__surface[data-expanded][data-disabled] {
23
44
  opacity: 0.45;
24
45
  cursor: not-allowed;
25
46
  }
@@ -32,7 +53,7 @@
32
53
  padding: var(--space-2);
33
54
  background: var(--field-bg);
34
55
 
35
- --field-bg: color-mix(in srgb, var(--color-text) var(--tint-rest), var(--fill-card));
56
+ --field-bg: var(--rte-fill);
36
57
  }
37
58
 
38
59
  .ds-rte__expand {
@@ -58,12 +79,11 @@
58
79
  flex-direction: column;
59
80
  flex: 1;
60
81
  min-block-size: 0;
61
- }
82
+ gap: 2px;
62
83
 
63
- .ds-rte__surface[data-invalid] .ds-rte__toolbar {
84
+ /* The seam between toolbar and content shows the ground the field sits
85
+ * on: the page, a card, a band or the expanded Modal. */
64
86
  background: var(--field-bg);
65
-
66
- --field-bg: color-mix(in srgb, var(--color-danger) 12%, var(--fill-card));
67
87
  }
68
88
 
69
89
  /* While expanded, the inline frame keeps its height and marks the editor's place. */
@@ -98,6 +118,10 @@
98
118
  }
99
119
 
100
120
  .ds-rte__content {
121
+ --field-bg: var(--rte-fill);
122
+
123
+ flex-grow: 1;
124
+ background: var(--field-bg);
101
125
  padding: var(--space-3);
102
126
  font-size: var(--font-size-md);
103
127
  line-height: var(--line-height-body);
@@ -155,7 +179,7 @@
155
179
  .ds-rte__content pre {
156
180
  padding: var(--space-3);
157
181
  border-radius: var(--field-radius);
158
- background: var(--color-surface-sunken, var(--field-hover));
182
+ background: var(--field-hover);
159
183
  font-family: var(--font-mono);
160
184
  font-size: var(--font-size-sm);
161
185
  overflow-x: auto;
@@ -168,7 +192,7 @@
168
192
  block-size: 2px;
169
193
  padding-block: var(--space-2);
170
194
  margin-block: var(--space-2);
171
- background: var(--fill-control-pressed) content-box;
195
+ background: var(--color-rule) content-box;
172
196
  }
173
197
 
174
198
  .ds-rte__content hr.ProseMirror-selectednode {
@@ -194,9 +218,6 @@
194
218
  * motion. The surface fills its body, and only the content scrolls. */
195
219
  .ds-modal.ds-rte__modal {
196
220
  block-size: 100%;
197
-
198
- /* The Modal body is the writing surface here, so blocks step from it. */
199
- --fill-card: var(--color-surface);
200
221
  }
201
222
 
202
223
  .ds-rte__modal .ds-modal__body {
@@ -211,13 +232,10 @@
211
232
  .ds-rte__modal .ds-rte__toolbar {
212
233
  flex-shrink: 0;
213
234
  padding: var(--space-3) var(--space-6);
214
- background: var(--field-bg);
215
235
  }
216
236
 
217
- .ds-rte__modal .ds-rte__surface[data-invalid] .ds-rte__toolbar {
218
- background: var(--field-bg);
219
-
220
- --field-bg: color-mix(in srgb, var(--color-danger) 12%, var(--fill-card));
237
+ .ds-rte__surface[data-expanded][data-focused] {
238
+ outline-offset: -2px;
221
239
  }
222
240
 
223
241
  .ds-rte__modal .ds-rte__content {
@@ -239,17 +257,25 @@
239
257
  text-wrap: pretty;
240
258
  }
241
259
 
260
+ /* Every block's bar carries a tone: primary for a standard block, warning
261
+ * for a draft and danger for a missing item. Selection deepens the bar in
262
+ * that same tone, so a block never loses its state when it is selected. */
242
263
  .ds-storyblock {
243
- --storyblock-bar-bg: var(--color-surface-subtle);
264
+ --field-bg: var(--color-canvas);
265
+ --storyblock-tone: var(--color-primary);
266
+ --storyblock-bar-bg: color-mix(
267
+ in srgb,
268
+ var(--color-primary) var(--tint-hover),
269
+ var(--field-bg)
270
+ );
244
271
 
245
272
  display: flex;
246
273
  flex-direction: column;
247
- container: storyblock / inline-size;
248
274
  overflow: hidden;
249
275
  margin-block-end: var(--space-3);
250
276
  border: 0;
251
277
  border-radius: var(--radius-md);
252
- background: color-mix(in srgb, var(--color-text) 4%, var(--fill-card));
278
+ background: var(--field-bg);
253
279
  font-size: var(--font-size-sm);
254
280
  line-height: 1.3;
255
281
  }
@@ -277,49 +303,73 @@
277
303
  margin: var(--space-1) 0 var(--space-3) var(--storyblock-gutter);
278
304
  }
279
305
 
306
+ /* Only an enabled editor's blocks respond to the pointer, as its frame does.
307
+ * The surface holds the content inline and expanded. :where() keeps this
308
+ * rule below the draft, missing and selected tones. */
309
+ :where(.ds-rte__surface:not([data-disabled])) .ds-storyblock:where(:hover) {
310
+ --storyblock-bar-bg: var(--color-primary-soft);
311
+ }
312
+
280
313
  .ds-storyblock[data-tone="draft"] {
314
+ --storyblock-tone: var(--color-warning);
281
315
  --storyblock-bar-bg: var(--color-warning-soft);
282
316
  }
283
317
 
284
318
  .ds-storyblock[data-selected] {
285
- --storyblock-bar-bg: var(--color-primary-soft);
319
+ --storyblock-bar-bg: var(--color-primary-soft-pressed);
286
320
 
287
321
  outline: var(--focus-width) solid var(--color-focus);
288
322
  outline-offset: 2px;
289
323
  }
290
324
 
291
325
  .ds-storyblock[data-missing] {
326
+ --field-bg: color-mix(in srgb, var(--color-danger) 5%, var(--color-canvas));
327
+ --storyblock-tone: var(--color-danger);
292
328
  --storyblock-bar-bg: var(--color-danger-soft);
329
+ }
293
330
 
294
- background: color-mix(in srgb, var(--color-danger) 9%, var(--fill-card));
331
+ /* Draft and missing blocks keep their tone when selected, one step deeper.
332
+ * Only primary has a soft ladder token, so these mix locally. */
333
+ .ds-storyblock[data-tone="draft"][data-selected] {
334
+ --storyblock-bar-bg: color-mix(
335
+ in srgb,
336
+ var(--color-warning) var(--tint-pressed),
337
+ var(--color-warning-soft)
338
+ );
295
339
  }
296
340
 
297
- .ds-storyblock[data-missing] .ds-storyblock__kind-label {
298
- --badge-ink: var(--color-text-on-solid);
299
- --badge-soft: var(--color-danger);
300
- --badge-soft-marker: var(--color-text-on-solid);
341
+ .ds-storyblock[data-missing][data-selected] {
342
+ --storyblock-bar-bg: color-mix(
343
+ in srgb,
344
+ var(--color-danger) var(--tint-pressed),
345
+ var(--color-danger-soft)
346
+ );
301
347
  }
302
348
 
303
349
  .ds-storyblock__bar {
304
- display: grid;
305
- grid-template-columns: minmax(max-content, 1fr) auto minmax(max-content, 1fr);
350
+ display: flex;
306
351
  align-items: center;
352
+ justify-content: space-between;
307
353
  gap: var(--space-2);
308
354
  min-block-size: var(--space-12);
309
355
  padding: calc(var(--space-3) / 2) var(--space-2);
310
356
  background: var(--field-bg);
311
357
 
312
358
  --field-bg: var(--storyblock-bar-bg);
313
- }
314
359
 
315
- .ds-storyblock__kind,
316
- .ds-storyblock__actions {
317
- display: flex;
318
- align-items: center;
360
+ /* The bar is a selected container for its open actions trigger, Button's
361
+ * active variant: one pressed step beyond the bar in the block's tone, at
362
+ * rest, hovered or selected. Hover and press step further from there. */
363
+ --button-active-bg: color-mix(
364
+ in srgb,
365
+ var(--storyblock-tone) var(--tint-pressed),
366
+ var(--storyblock-bar-bg)
367
+ );
319
368
  }
320
369
 
321
- /* The drag handle fills its column and the bar's height. It holds no buttons. */
322
370
  .ds-storyblock__kind {
371
+ display: flex;
372
+ align-items: center;
323
373
  align-self: stretch;
324
374
  gap: var(--space-2);
325
375
  color: var(--color-text-muted);
@@ -329,21 +379,19 @@
329
379
  cursor: grab;
330
380
  }
331
381
 
382
+ /* The label sits on the canvas in its block's tone, so it holds its shape
383
+ * on every tinted bar, resting, hovered or selected. */
332
384
  .ds-storyblock__kind-label {
333
385
  width: fit-content;
334
386
 
335
- --badge-soft: color-mix(in srgb, var(--color-text) 8%, var(--field-bg));
387
+ --badge-soft: var(--color-canvas);
388
+ --badge-ink: var(--color-primary-text);
336
389
  }
337
390
 
338
391
  .ds-storyblock__grip {
339
392
  display: flex;
340
393
  }
341
394
 
342
- .ds-storyblock__actions {
343
- justify-self: end;
344
- gap: calc(var(--space-1) / 2);
345
- }
346
-
347
395
  .ds-storyblock__body {
348
396
  padding: var(--space-3);
349
397
  }
@@ -356,26 +404,58 @@
356
404
  padding: 0 var(--space-3) var(--space-3);
357
405
  }
358
406
 
359
- /* Wrap the right-hand actions in a narrow block, without containing the editor. */
360
- @container storyblock (width < 22.5rem) {
361
- .ds-storyblock__bar {
362
- grid-template-columns: 1fr auto;
363
- }
407
+ .ds-storyblock[data-tone="draft"] .ds-storyblock__kind-label {
408
+ --badge-ink: var(--color-warning-text);
409
+ }
364
410
 
365
- .ds-storyblock__actions {
366
- grid-column: 1 / -1;
367
- }
411
+ .ds-storyblock[data-missing] .ds-storyblock__kind-label {
412
+ --badge-soft: var(--color-danger);
413
+ --badge-ink: var(--color-text-on-solid);
368
414
  }
369
- }
370
415
 
371
- @layer components {
372
- .ds-storyblock[data-selected] .ds-storyblock__kind-label {
373
- --badge-soft: var(--color-surface);
374
- --badge-ink: var(--color-primary-text);
416
+ .ds-storyblock__popover.ds-popover {
417
+ inline-size: 264px;
418
+ padding: var(--space-3);
375
419
  }
376
420
 
377
- .ds-storyblock[data-missing][data-selected] .ds-storyblock__kind-label {
378
- --badge-soft: var(--color-danger);
379
- --badge-ink: var(--color-text-on-solid);
421
+ /* The gap alone spaces the alignment section, the actions section, the
422
+ * separator and Remove, so the separator stays centred whichever actions a
423
+ * block offers. */
424
+ .ds-storyblock__popover-content {
425
+ display: flex;
426
+ flex-direction: column;
427
+ gap: var(--space-3);
428
+ }
429
+
430
+ .ds-storyblock__popover-section {
431
+ display: flex;
432
+ flex-direction: column;
433
+ gap: var(--space-1);
434
+ }
435
+
436
+ .ds-storyblock__popover-label {
437
+ padding-inline: var(--space-1);
438
+ padding-block-end: var(--space-1);
439
+ color: var(--color-text-muted);
440
+ font-size: var(--font-size-xs);
441
+ font-weight: var(--font-weight-bold);
442
+ letter-spacing: var(--table-head-tracking);
443
+ text-transform: uppercase;
444
+ }
445
+
446
+ .ds-storyblock__alignment.ds-button-group {
447
+ display: grid;
448
+ grid-template-columns: repeat(3, minmax(max-content, 1fr));
449
+ width: 100%;
450
+ }
451
+
452
+ /* Actions keep Button's md size and variants; only their layout is a list's. */
453
+ .ds-storyblock__action.ds-button {
454
+ justify-content: start;
455
+ text-align: start;
456
+ }
457
+
458
+ .ds-storyblock__popover-content > .ds-menu-separator {
459
+ margin-block: 0;
380
460
  }
381
461
  }
@@ -1,2 +1,2 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../chunks/Icon-CD3oeiNA.cjs"),t=require("../Button/index.cjs"),n=require("../../chunks/mergeRefs-CZ-SArlE.cjs"),r=require("../../chunks/isComposing-BrBcAANm.cjs");;/* empty css */const i=require("../../chunks/useLimit-CCv6sAUS.cjs"),a=require("../FieldAffix/index.cjs");let o=require("react"),s=require("react/jsx-runtime");var c=(0,o.forwardRef)(function({size:c=`md`,isDisabled:l=!1,isBusy:u=!1,onClear:d,className:f,placeholder:p=`Search`,value:m,disabled:h,onKeyDown:g,..._},v){let y=(0,o.useRef)(null),b=(0,o.useMemo)(()=>n.t(y,v),[v]);i.n(y,{..._,value:m});let x=m!==void 0,S=x&&String(m).length>0,C=S&&d;return(0,s.jsx)(a.FieldAffix,{className:f,lead:(0,s.jsx)(e.t,{name:`search`,size:16}),isTrailInteractive:!0,trail:u||C?(0,s.jsxs)(s.Fragment,{children:[u&&(0,s.jsx)(e.t,{name:`spinner`,size:16,className:`ds-icon--spin`}),C&&(0,s.jsx)(t.Button,{variant:`simple`,size:`xs`,isIconOnly:!0,iconStart:`x`,"aria-label":`Clear search`,isDisabled:l||h,onClick:()=>{d(),y.current?.focus()}})]}):void 0,children:(0,s.jsx)(`input`,{ref:b,type:`search`,"aria-busy":u||void 0,value:m,placeholder:p,disabled:l||h,"data-size":c,className:`ds-field-skin ds-search__input`,onKeyDown:e=>{e.key===`Escape`&&d&&!r.t(e.nativeEvent)&&(S?(e.preventDefault(),d()):x||d()),g?.(e)},..._})})});exports.SearchField=c;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../chunks/Icon-C12r4frL.cjs"),t=require("../Button/index.cjs"),n=require("../../chunks/mergeRefs-CZ-SArlE.cjs"),r=require("../../chunks/isComposing-BrBcAANm.cjs");;/* empty css */const i=require("../../chunks/useLimit-CCv6sAUS.cjs"),a=require("../FieldAffix/index.cjs");let o=require("react"),s=require("react/jsx-runtime");var c=(0,o.forwardRef)(function({size:c=`md`,isDisabled:l=!1,isBusy:u=!1,onClear:d,className:f,placeholder:p=`Search`,value:m,disabled:h,onKeyDown:g,..._},v){let y=(0,o.useRef)(null),b=(0,o.useMemo)(()=>n.t(y,v),[v]);i.n(y,{..._,value:m});let x=m!==void 0,S=x&&String(m).length>0,C=S&&d;return(0,s.jsx)(a.FieldAffix,{className:f,lead:(0,s.jsx)(e.t,{name:`search`,size:16}),isTrailInteractive:!0,trail:u||C?(0,s.jsxs)(s.Fragment,{children:[u&&(0,s.jsx)(e.t,{name:`spinner`,size:16,className:`ds-icon--spin`}),C&&(0,s.jsx)(t.Button,{variant:`simple`,size:`xs`,isIconOnly:!0,iconStart:`x`,"aria-label":`Clear search`,isDisabled:l||h,onClick:()=>{d(),y.current?.focus()}})]}):void 0,children:(0,s.jsx)(`input`,{ref:b,type:`search`,"aria-busy":u||void 0,value:m,placeholder:p,disabled:l||h,"data-size":c,className:`ds-field-skin ds-search__input`,onKeyDown:e=>{e.key===`Escape`&&d&&!r.t(e.nativeEvent)&&(S?(e.preventDefault(),d()):x||d()),g?.(e)},..._})})});exports.SearchField=c;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1,4 +1,4 @@
1
- import { t as e } from "../../chunks/Icon-CYXOo0Kt.js";
1
+ import { t as e } from "../../chunks/Icon-Peb0houB.js";
2
2
  import { Button as t } from "../Button/index.js";
3
3
  import { t as n } from "../../chunks/mergeRefs-C6_5pADN.js";
4
4
  import { t as r } from "../../chunks/isComposing-8bRWyiLF.js";
@@ -1,2 +1,2 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../chunks/Icon-CD3oeiNA.cjs"),t=require("../Button/index.cjs"),n=require("../../chunks/overlayLayer-seJG-EFn.cjs");;/* empty css */const r=require("../Popover/index.cjs");let i=require("react"),a=require("react/jsx-runtime");function o(...e){return e.filter(Boolean).join(` `)}var s=(0,i.forwardRef)(function({options:s,value:c,defaultValue:l,onValueChange:u,placeholder:d=`Select an option`,size:f=`md`,isDisabled:p=!1,isInvalid:m=!1,"aria-invalid":h,required:g,menuPlacement:_=`bottom`,className:v,disabled:y,onClick:b,onKeyDown:x,...S},C){let[w,T]=(0,i.useState)(l??``),E=c??w,[D,O]=(0,i.useState)(!1),k=n.o(D),[A,j]=(0,i.useState)(0),M=(0,i.useRef)(null),N=(0,i.useRef)(null),P=(0,i.useRef)(null),F=(0,i.useId)(),I=p||y,L=k&&!I,R=s.find(e=>e.value===E),z=s.filter(e=>!e.isDisabled),B=(0,i.useCallback)(e=>{c===void 0&&T(e),u?.(e),O(!1)},[u,c]);(0,i.useEffect)(()=>{if(!L)return;let e=s.findIndex(e=>e.value===E&&!e.isDisabled);j(e<0?s.indexOf(z[0]):e);let t=e=>{let t=e.target;!M.current?.contains(t)&&!P.current?.contains(t)&&O(!1)};return document.addEventListener(`mousedown`,t),()=>document.removeEventListener(`mousedown`,t)},[L]),(0,i.useEffect)(()=>{L&&(P.current?.querySelectorAll(`[role='option']`)[A])?.scrollIntoView({block:`nearest`})},[A,L]);let V=e=>{let t=s.map((e,t)=>({option:e,index:t})).filter(e=>!e.option.isDisabled);if(t.length===0)return;let n=t[(t.findIndex(e=>e.index===A)+e+t.length)%t.length];j(n.index)},H=e=>{switch(e.key){case`Escape`:e.preventDefault(),O(!1),N.current?.focus();break;case`Tab`:O(!1);break;case`ArrowDown`:case`ArrowUp`:e.preventDefault(),V(e.key===`ArrowDown`?1:-1);break;case`Home`:case`End`:{e.preventDefault();let t=e.key===`Home`?z[0]:z[z.length-1];t&&j(s.indexOf(t));break}case`Enter`:case` `:{e.preventDefault();let t=s[A];t&&!t.isDisabled&&B(t.value);break}}},U=e=>{I||(L?H(e):[`ArrowDown`,`ArrowUp`,`Enter`,` `].includes(e.key)&&(e.preventDefault(),O(!0)))};return(0,a.jsxs)(`div`,{className:`ds-select-root`,ref:M,children:[(0,a.jsxs)(t.Button,{ref:e=>{N.current=e,typeof C==`function`?C(e):C&&(C.current=e)},size:f,role:`combobox`,"aria-required":g||void 0,"aria-haspopup":`listbox`,"aria-expanded":L,"aria-controls":L?F:void 0,"aria-activedescendant":L&&s[A]&&!s[A].isDisabled?`${F}-option-${A}`:void 0,"aria-invalid":m||h||void 0,isDisabled:I,"data-placeholder":R?void 0:``,className:o(`ds-field-skin`,`ds-select`,v),onClick:e=>{b?.(e),e.defaultPrevented||O(e=>!e)},onKeyDown:e=>{x?.(e),e.defaultPrevented||U(e)},...S,children:[(0,a.jsx)(`span`,{className:`ds-select__value`,children:R?R.label:d}),(0,a.jsx)(e.t,{name:`chevron-down`,size:16,className:`ds-select__chevron`})]}),(0,a.jsx)(r.Popover,{anchorRef:N,isOpen:L,align:`start`,placement:_,matchAnchorWidth:!0,panelRef:P,id:F,role:`listbox`,"aria-label":S[`aria-labelledby`]?void 0:S[`aria-label`]??d,"aria-labelledby":S[`aria-labelledby`],className:`ds-surface-raised ds-field-surface ds-select__menu`,children:(0,a.jsx)(`div`,{onKeyDown:U,onPointerDown:e=>e.preventDefault(),children:s.map((n,r)=>(0,a.jsxs)(t.Button,{variant:r===A?`active`:`simple`,size:`sm`,isDisabled:n.isDisabled,tabIndex:-1,id:`${F}-option-${r}`,role:`option`,"aria-selected":n.value===E,"aria-disabled":n.isDisabled||void 0,"data-active":r===A||void 0,className:`ds-select__option`,onMouseEnter:()=>!n.isDisabled&&j(r),onClick:()=>{n.isDisabled||(B(n.value),N.current?.focus())},children:[(0,a.jsxs)(`span`,{className:`ds-select__option-body`,children:[(0,a.jsx)(`span`,{className:`ds-select__option-label`,children:n.label}),n.description&&(0,a.jsx)(`span`,{className:`ds-select__option-description`,children:n.description})]}),n.value===E&&(0,a.jsx)(e.t,{name:`check`,size:16})]},n.value))})})]})});exports.Select=s;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../chunks/Icon-C12r4frL.cjs"),t=require("../Button/index.cjs"),n=require("../../chunks/overlayLayer-iGhuAByk.cjs");;/* empty css */const r=require("../Popover/index.cjs");let i=require("react"),a=require("react/jsx-runtime");function o(...e){return e.filter(Boolean).join(` `)}var s=(0,i.forwardRef)(function({options:s,value:c,defaultValue:l,onValueChange:u,placeholder:d=`Select an option`,size:f=`md`,isDisabled:p=!1,isInvalid:m=!1,"aria-invalid":h,required:g,menuPlacement:_=`bottom`,className:v,disabled:y,onClick:b,onKeyDown:x,...S},C){let[w,T]=(0,i.useState)(l??``),E=c??w,[D,O]=(0,i.useState)(!1),k=n.o(D),[A,j]=(0,i.useState)(0),M=(0,i.useRef)(null),N=(0,i.useRef)(null),P=(0,i.useRef)(null),F=(0,i.useId)(),I=p||y,L=k&&!I,R=s.find(e=>e.value===E),z=s.filter(e=>!e.isDisabled),B=(0,i.useCallback)(e=>{c===void 0&&T(e),u?.(e),O(!1)},[u,c]);(0,i.useEffect)(()=>{if(!L)return;let e=s.findIndex(e=>e.value===E&&!e.isDisabled);j(e<0?s.indexOf(z[0]):e);let t=e=>{let t=e.target;!M.current?.contains(t)&&!P.current?.contains(t)&&O(!1)};return document.addEventListener(`mousedown`,t),()=>document.removeEventListener(`mousedown`,t)},[L]),(0,i.useEffect)(()=>{L&&(P.current?.querySelectorAll(`[role='option']`)[A])?.scrollIntoView({block:`nearest`})},[A,L]);let V=e=>{let t=s.map((e,t)=>({option:e,index:t})).filter(e=>!e.option.isDisabled);if(t.length===0)return;let n=t[(t.findIndex(e=>e.index===A)+e+t.length)%t.length];j(n.index)},H=e=>{switch(e.key){case`Escape`:e.preventDefault(),O(!1),N.current?.focus();break;case`Tab`:O(!1);break;case`ArrowDown`:case`ArrowUp`:e.preventDefault(),V(e.key===`ArrowDown`?1:-1);break;case`Home`:case`End`:{e.preventDefault();let t=e.key===`Home`?z[0]:z[z.length-1];t&&j(s.indexOf(t));break}case`Enter`:case` `:{e.preventDefault();let t=s[A];t&&!t.isDisabled&&B(t.value);break}}},U=e=>{I||(L?H(e):[`ArrowDown`,`ArrowUp`,`Enter`,` `].includes(e.key)&&(e.preventDefault(),O(!0)))};return(0,a.jsxs)(`div`,{className:`ds-select-root`,ref:M,children:[(0,a.jsxs)(t.Button,{ref:e=>{N.current=e,typeof C==`function`?C(e):C&&(C.current=e)},size:f,role:`combobox`,"aria-required":g||void 0,"aria-haspopup":`listbox`,"aria-expanded":L,"aria-controls":L?F:void 0,"aria-activedescendant":L&&s[A]&&!s[A].isDisabled?`${F}-option-${A}`:void 0,"aria-invalid":m||h||void 0,isDisabled:I,"data-placeholder":R?void 0:``,className:o(`ds-field-skin`,`ds-select`,v),onClick:e=>{b?.(e),e.defaultPrevented||O(e=>!e)},onKeyDown:e=>{x?.(e),e.defaultPrevented||U(e)},...S,children:[(0,a.jsx)(`span`,{className:`ds-select__value`,children:R?R.label:d}),(0,a.jsx)(e.t,{name:`chevron-down`,size:16,className:`ds-select__chevron`})]}),(0,a.jsx)(r.Popover,{anchorRef:N,isOpen:L,align:`start`,placement:_,matchAnchorWidth:!0,panelRef:P,id:F,role:`listbox`,"aria-label":S[`aria-labelledby`]?void 0:S[`aria-label`]??d,"aria-labelledby":S[`aria-labelledby`],className:`ds-surface-raised ds-field-surface ds-select__menu`,children:(0,a.jsx)(`div`,{onKeyDown:U,onPointerDown:e=>e.preventDefault(),children:s.map((n,r)=>(0,a.jsxs)(t.Button,{variant:r===A?`active`:`simple`,size:`sm`,isDisabled:n.isDisabled,tabIndex:-1,id:`${F}-option-${r}`,role:`option`,"aria-selected":n.value===E,"aria-disabled":n.isDisabled||void 0,"data-active":r===A||void 0,className:`ds-select__option`,onMouseEnter:()=>!n.isDisabled&&j(r),onClick:()=>{n.isDisabled||(B(n.value),N.current?.focus())},children:[(0,a.jsxs)(`span`,{className:`ds-select__option-body`,children:[(0,a.jsx)(`span`,{className:`ds-select__option-label`,children:n.label}),n.description&&(0,a.jsx)(`span`,{className:`ds-select__option-description`,children:n.description})]}),n.value===E&&(0,a.jsx)(e.t,{name:`check`,size:16})]},n.value))})})]})});exports.Select=s;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1,6 +1,6 @@
1
- import { t as e } from "../../chunks/Icon-CYXOo0Kt.js";
1
+ import { t as e } from "../../chunks/Icon-Peb0houB.js";
2
2
  import { Button as t } from "../Button/index.js";
3
- import { o as n } from "../../chunks/overlayLayer-IuoPVwTO.js";
3
+ import { o as n } from "../../chunks/overlayLayer-lU4iWSjO.js";
4
4
  /* empty css */
5
5
  import { Popover as r } from "../Popover/index.js";
6
6
  import { forwardRef as i, useCallback as a, useEffect as o, useId as s, useRef as c, useState as l } from "react";
@@ -1,2 +1,2 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../chunks/group-nulIa2_8.cjs"),t=require("../Grid/index.cjs");let n=require("react"),r=require("react/jsx-runtime");function i({kind:e,title:t,description:n,children:i,className:a,inputProps:o,inputRef:s}){return(0,r.jsxs)(`label`,{className:[`ds-selection-card`,`ds-field-surface`,a].filter(Boolean).join(` `),children:[(0,r.jsx)(`input`,{ref:s,type:e,"data-kind":e,className:`ds-selection-card__control`,...o}),(0,r.jsxs)(`span`,{className:`ds-selection-card__text`,children:[(0,r.jsx)(`span`,{className:`ds-selection-card__title`,children:t}),n&&(0,r.jsx)(`span`,{className:`ds-selection-card__description`,children:n}),i&&(0,r.jsx)(`span`,{className:`ds-selection-card__extra`,children:i})]})]})}var a=(0,n.forwardRef)(function({title:e,description:t,children:n,className:a,...o},s){return(0,r.jsx)(i,{kind:`checkbox`,title:e,description:t,className:a,inputProps:o,inputRef:s,children:n})}),o=(0,n.forwardRef)(function({title:e,description:t,children:n,className:a,...o},s){return(0,r.jsx)(i,{kind:`radio`,title:e,description:t,className:a,inputProps:o,inputRef:s,children:n})});function s({label:n,columns:i=2,gap:a=`md`,children:o,className:s,...c}){return(0,r.jsx)(e.t,{...c,label:n,className:[`ds-selection-card-group`,s].filter(Boolean).join(` `),children:(0,r.jsx)(t.Grid,{columns:i,gap:a,className:`ds-selection-card-group__grid ds-field-group-grid`,style:{"--field-group-columns":i},children:o})})}exports.CheckboxCard=a,exports.RadioCard=o,exports.SelectionCardGroup=s;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../chunks/style-nulIa2_8.cjs"),t=require("../Grid/index.cjs");let n=require("react"),r=require("react/jsx-runtime");function i({kind:e,title:t,description:n,children:i,className:a,inputProps:o,inputRef:s}){return(0,r.jsxs)(`label`,{className:[`ds-selection-card`,`ds-field-surface`,a].filter(Boolean).join(` `),children:[(0,r.jsx)(`input`,{ref:s,type:e,"data-kind":e,className:`ds-selection-card__control ds-indicator`,...o}),(0,r.jsxs)(`span`,{className:`ds-selection-card__text`,children:[(0,r.jsx)(`span`,{className:`ds-selection-card__title`,children:t}),n&&(0,r.jsx)(`span`,{className:`ds-selection-card__description`,children:n}),i&&(0,r.jsx)(`span`,{className:`ds-selection-card__extra`,children:i})]})]})}var a=(0,n.forwardRef)(function({title:e,description:t,children:n,className:a,...o},s){return(0,r.jsx)(i,{kind:`checkbox`,title:e,description:t,className:a,inputProps:o,inputRef:s,children:n})}),o=(0,n.forwardRef)(function({title:e,description:t,children:n,className:a,...o},s){return(0,r.jsx)(i,{kind:`radio`,title:e,description:t,className:a,inputProps:o,inputRef:s,children:n})});function s({label:n,columns:i=2,gap:a=`md`,children:o,className:s,...c}){return(0,r.jsx)(e.t,{...c,label:n,className:[`ds-selection-card-group`,s].filter(Boolean).join(` `),children:(0,r.jsx)(t.Grid,{columns:i,gap:a,className:`ds-selection-card-group__grid ds-field-group-grid`,style:{"--field-group-columns":i},children:o})})}exports.CheckboxCard=a,exports.RadioCard=o,exports.SelectionCardGroup=s;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","names":["forwardRef","FieldGroup","Grid","require_group","require_components_Grid_index","react","react_jsx_runtime","CardBody","className","inputRef","kind","inputProps","title","description","children","CheckboxCard","rest","ref","RadioCard","SelectionCardGroup","fieldProps","columns"],"sources":["../../../src/components/SelectionCard/index.tsx"],"sourcesContent":["import { forwardRef, type CSSProperties, type InputHTMLAttributes, type ReactNode } from \"react\";\nimport { FieldGroup, type FieldGroupProps } from \"../Field/group\";\nimport { Grid, type GapSize } from \"../Grid\";\nimport \"./style.css\";\n\ninterface SelectionCardBase {\n /** The commitment, in the user's words. */\n title: ReactNode;\n /** One line on what picking this means. Takes nodes, so a chip or a link can sit inline. */\n description?: ReactNode;\n /** Extra content under the description — a price, a sample, a badge. */\n children?: ReactNode;\n}\n\ntype NativeInput = Omit<\n InputHTMLAttributes<HTMLInputElement>,\n \"type\" | \"size\" | \"children\" | \"title\"\n>;\n\nfunction CardBody({\n kind,\n title,\n description,\n children,\n className,\n inputProps,\n inputRef,\n}: SelectionCardBase & {\n kind: \"checkbox\" | \"radio\";\n className?: string;\n inputProps: NativeInput;\n inputRef: React.Ref<HTMLInputElement>;\n}) {\n return (\n <label\n className={[\"ds-selection-card\", \"ds-field-surface\", className].filter(Boolean).join(\" \")}\n >\n <input\n ref={inputRef}\n type={kind}\n data-kind={kind}\n className=\"ds-selection-card__control\"\n {...inputProps}\n />\n <span className=\"ds-selection-card__text\">\n <span className=\"ds-selection-card__title\">{title}</span>\n {description && <span className=\"ds-selection-card__description\">{description}</span>}\n {children && <span className=\"ds-selection-card__extra\">{children}</span>}\n </span>\n </label>\n );\n}\n\nexport interface CheckboxCardProps extends SelectionCardBase, NativeInput {}\n\n/**\n * A checkbox with room to explain itself. Same 20px box as the bare control —\n * the card is a bigger target, not a different decision.\n */\nexport const CheckboxCard = forwardRef<HTMLInputElement, CheckboxCardProps>(function CheckboxCard(\n { title, description, children, className, ...rest },\n ref,\n) {\n return (\n <CardBody\n kind=\"checkbox\"\n title={title}\n description={description}\n className={className}\n inputProps={rest}\n inputRef={ref}\n >\n {children}\n </CardBody>\n );\n});\n\nexport interface RadioCardProps extends SelectionCardBase, NativeInput {}\n\n/** One of a set of mutually exclusive options, each with its own explanation. */\nexport const RadioCard = forwardRef<HTMLInputElement, RadioCardProps>(function RadioCard(\n { title, description, children, className, ...rest },\n ref,\n) {\n return (\n <CardBody\n kind=\"radio\"\n title={title}\n description={description}\n className={className}\n inputProps={rest}\n inputRef={ref}\n >\n {children}\n </CardBody>\n );\n});\n\nexport interface SelectionCardGroupProps extends FieldGroupProps {\n /** Group label — the question the cards answer. */\n label: string;\n /** Cards per row at full width. Steps down inside a narrow container. */\n columns?: 1 | 2 | 3;\n /** Space between cards in both axes, using Grid's spacing scale. Defaults to `md`. */\n gap?: GapSize;\n children: ReactNode;\n}\n\n/** A grid of selection cards under one legend, spaced by the shared Grid. */\nexport function SelectionCardGroup({\n label,\n columns = 2,\n gap = \"md\",\n children,\n className,\n ...fieldProps\n}: SelectionCardGroupProps) {\n return (\n <FieldGroup\n {...fieldProps}\n label={label}\n className={[\"ds-selection-card-group\", className].filter(Boolean).join(\" \")}\n >\n <Grid\n columns={columns}\n gap={gap}\n className=\"ds-selection-card-group__grid ds-field-group-grid\"\n style={{ \"--field-group-columns\": columns } as CSSProperties}\n >\n {children}\n </Grid>\n </FieldGroup>\n );\n}\n"],"mappings":"A,2MAmBA,SAASO,EAAS,CAChB,OACA,QACA,cACA,WACA,YACA,aACA,YAMC,CACD,OACE,EAAAD,EAAA,KAAA,CAAC,QAAD,CACE,UAAW,CAAC,oBAAqB,mBAAoBE,CAAS,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,KAAK,GAAG,EAD1F,SAAA,EAGE,EAAAF,EAAA,IAAA,CAAC,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+ {"version":3,"file":"index.cjs","names":["forwardRef","FieldGroup","Grid","require_style","require_components_Grid_index","react","react_jsx_runtime","CardBody","className","inputRef","kind","inputProps","title","description","children","CheckboxCard","rest","ref","RadioCard","SelectionCardGroup","fieldProps","columns"],"sources":["../../../src/components/SelectionCard/index.tsx"],"sourcesContent":["import { forwardRef, type CSSProperties, type InputHTMLAttributes, type ReactNode } from \"react\";\nimport { FieldGroup, type FieldGroupProps } from \"../Field/group\";\nimport { Grid, type GapSize } from \"../Grid\";\nimport \"../Choice/style.css\";\nimport \"./style.css\";\n\ninterface SelectionCardBase {\n /** The commitment, in the user's words. */\n title: ReactNode;\n /** One line on what picking this means. Takes nodes, so a chip or a link can sit inline. */\n description?: ReactNode;\n /** Extra content under the description — a price, a sample, a badge. */\n children?: ReactNode;\n}\n\ntype NativeInput = Omit<\n InputHTMLAttributes<HTMLInputElement>,\n \"type\" | \"size\" | \"children\" | \"title\"\n>;\n\nfunction CardBody({\n kind,\n title,\n description,\n children,\n className,\n inputProps,\n inputRef,\n}: SelectionCardBase & {\n kind: \"checkbox\" | \"radio\";\n className?: string;\n inputProps: NativeInput;\n inputRef: React.Ref<HTMLInputElement>;\n}) {\n return (\n <label\n className={[\"ds-selection-card\", \"ds-field-surface\", className].filter(Boolean).join(\" \")}\n >\n <input\n ref={inputRef}\n type={kind}\n data-kind={kind}\n className=\"ds-selection-card__control ds-indicator\"\n {...inputProps}\n />\n <span className=\"ds-selection-card__text\">\n <span className=\"ds-selection-card__title\">{title}</span>\n {description && <span className=\"ds-selection-card__description\">{description}</span>}\n {children && <span className=\"ds-selection-card__extra\">{children}</span>}\n </span>\n </label>\n );\n}\n\nexport interface CheckboxCardProps extends SelectionCardBase, NativeInput {}\n\n/**\n * A checkbox with room to explain itself. Same 20px box as the bare control —\n * the card is a bigger target, not a different decision.\n */\nexport const CheckboxCard = forwardRef<HTMLInputElement, CheckboxCardProps>(function CheckboxCard(\n { title, description, children, className, ...rest },\n ref,\n) {\n return (\n <CardBody\n kind=\"checkbox\"\n title={title}\n description={description}\n className={className}\n inputProps={rest}\n inputRef={ref}\n >\n {children}\n </CardBody>\n );\n});\n\nexport interface RadioCardProps extends SelectionCardBase, NativeInput {}\n\n/** One of a set of mutually exclusive options, each with its own explanation. */\nexport const RadioCard = forwardRef<HTMLInputElement, RadioCardProps>(function RadioCard(\n { title, description, children, className, ...rest },\n ref,\n) {\n return (\n <CardBody\n kind=\"radio\"\n title={title}\n description={description}\n className={className}\n inputProps={rest}\n inputRef={ref}\n >\n {children}\n </CardBody>\n );\n});\n\nexport interface SelectionCardGroupProps extends FieldGroupProps {\n /** Group label — the question the cards answer. */\n label: string;\n /** Cards per row at full width. Steps down inside a narrow container. */\n columns?: 1 | 2 | 3;\n /** Space between cards in both axes, using Grid's spacing scale. Defaults to `md`. */\n gap?: GapSize;\n children: ReactNode;\n}\n\n/** A grid of selection cards under one legend, spaced by the shared Grid. */\nexport function SelectionCardGroup({\n label,\n columns = 2,\n gap = \"md\",\n children,\n className,\n ...fieldProps\n}: SelectionCardGroupProps) {\n return (\n <FieldGroup\n {...fieldProps}\n label={label}\n className={[\"ds-selection-card-group\", className].filter(Boolean).join(\" \")}\n >\n <Grid\n columns={columns}\n gap={gap}\n className=\"ds-selection-card-group__grid ds-field-group-grid\"\n style={{ \"--field-group-columns\": columns } as CSSProperties}\n >\n {children}\n </Grid>\n </FieldGroup>\n );\n}\n"],"mappings":"A,2MAoBA,SAASO,EAAS,CAChB,OACA,QACA,cACA,WACA,YACA,aACA,YAMC,CACD,OACE,EAAAD,EAAA,KAAA,CAAC,QAAD,CACE,UAAW,CAAC,oBAAqB,mBAAoBE,CAAS,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,KAAK,GAAG,EAD1F,SAAA,EAGE,EAAAF,EAAA,IAAA,CAAC,QAAD,CACE,IAAKG,EACL,KAAMC,EACN,YAAWA,EACX,UAAU,0CACV,GAAIC,CACL,CAAA,GACD,EAAAL,EAAA,KAAA,CAAC,OAAD,CAAM,UAAU,0BAAhB,SAAA,EACE,EAAAA,EAAA,IAAA,CAAC,OAAD,CAAM,UAAU,2BAA4B,SAAAM,CAAY,CAAA,EACvDC,IAAe,EAAAP,EAAA,IAAA,CAAC,OAAD,CAAM,UAAU,iCAAkC,SAAAO,CAAkB,CAAA,EACnFC,IAAY,EAAAR,EAAA,IAAA,CAAC,OAAD,CAAM,UAAU,2BAA4B,UAAe,CAAA,CACpE,CACD,CAAA,CAAA,C,EAEX,CAQA,IAAaS,GAAA,EAAef,EAAAA,WAAAA,CAAgD,SAC1E,CAAE,QAAO,cAAa,WAAU,YAAW,GAAGgB,GAC9C,EACA,CACA,OACE,EAAAV,EAAA,IAAA,CAACC,EAAD,CACE,KAAK,WACE,QACM,cACF,YACX,WAAYS,EACZ,SAAUC,EAET,UACO,CAAA,CAEd,CAAC,EAKYC,GAAA,EAAYlB,EAAAA,WAAAA,CAA6C,SACpE,CAAE,QAAO,cAAa,WAAU,YAAW,GAAGgB,GAC9C,EACA,CACA,OACE,EAAAV,EAAA,IAAA,CAACC,EAAD,CACE,KAAK,QACE,QACM,cACF,YACX,WAAYS,EACZ,SAAUC,EAET,UACO,CAAA,CAEd,CAAC,EAaD,SAAgBE,EAAmB,CACjC,QACA,UAAU,EACV,MAAM,KACN,WACA,YACA,GAAGC,GACuB,CAC1B,OACE,EAAAd,EAAA,IAAA,CAACL,EAAAA,EAAD,CACE,GAAImB,EACG,QACP,UAAW,CAAC,0BAA2BZ,CAAS,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,KAAK,GAAG,EAE1E,UAAA,EAAAF,EAAA,IAAA,CAACJ,EAAAA,KAAD,CACW,UACJ,MACL,UAAU,oDACV,MAAO,CAAE,wBAAyBmB,CAAQ,EAEzC,UACG,CAAA,CACI,CAAA,CAEhB,C"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/components/SelectionCard/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAkC,KAAK,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id as t } from "../Grid/index.js";
3
3
  import { forwardRef as n } from "react";
4
4
  import { jsx as r, jsxs as i } from "react/jsx-runtime";
@@ -14,7 +14,7 @@ function a({ kind: e, title: t, description: n, children: a, className: o, input
14
14
  ref: c,
15
15
  type: e,
16
16
  "data-kind": e,
17
- className: "ds-selection-card__control",
17
+ className: "ds-selection-card__control ds-indicator",
18
18
  ...s
19
19
  }), /* @__PURE__ */ i("span", {
20
20
  className: "ds-selection-card__text",
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["FieldGroup","CardBody","className","inputRef","kind","inputProps","title","description","children","CheckboxCard","forwardRef","rest","ref","RadioCard","SelectionCardGroup","fieldProps","Grid","columns"],"sources":["../../../src/components/SelectionCard/index.tsx"],"sourcesContent":["import { forwardRef, type CSSProperties, type InputHTMLAttributes, type ReactNode } from \"react\";\nimport { FieldGroup, type FieldGroupProps } from \"../Field/group\";\nimport { Grid, type GapSize } from \"../Grid\";\nimport \"./style.css\";\n\ninterface SelectionCardBase {\n /** The commitment, in the user's words. */\n title: ReactNode;\n /** One line on what picking this means. Takes nodes, so a chip or a link can sit inline. */\n description?: ReactNode;\n /** Extra content under the description — a price, a sample, a badge. */\n children?: ReactNode;\n}\n\ntype NativeInput = Omit<\n InputHTMLAttributes<HTMLInputElement>,\n \"type\" | \"size\" | \"children\" | \"title\"\n>;\n\nfunction CardBody({\n kind,\n title,\n description,\n children,\n className,\n inputProps,\n inputRef,\n}: SelectionCardBase & {\n kind: \"checkbox\" | \"radio\";\n className?: string;\n inputProps: NativeInput;\n inputRef: React.Ref<HTMLInputElement>;\n}) {\n return (\n <label\n className={[\"ds-selection-card\", \"ds-field-surface\", className].filter(Boolean).join(\" \")}\n >\n <input\n ref={inputRef}\n type={kind}\n data-kind={kind}\n className=\"ds-selection-card__control\"\n {...inputProps}\n />\n <span className=\"ds-selection-card__text\">\n <span className=\"ds-selection-card__title\">{title}</span>\n {description && <span className=\"ds-selection-card__description\">{description}</span>}\n {children && <span className=\"ds-selection-card__extra\">{children}</span>}\n </span>\n </label>\n );\n}\n\nexport interface CheckboxCardProps extends SelectionCardBase, NativeInput {}\n\n/**\n * A checkbox with room to explain itself. Same 20px box as the bare control —\n * the card is a bigger target, not a different decision.\n */\nexport const CheckboxCard = forwardRef<HTMLInputElement, CheckboxCardProps>(function CheckboxCard(\n { title, description, children, className, ...rest },\n ref,\n) {\n return (\n <CardBody\n kind=\"checkbox\"\n title={title}\n description={description}\n className={className}\n inputProps={rest}\n inputRef={ref}\n >\n {children}\n </CardBody>\n );\n});\n\nexport interface RadioCardProps extends SelectionCardBase, NativeInput {}\n\n/** One of a set of mutually exclusive options, each with its own explanation. */\nexport const RadioCard = forwardRef<HTMLInputElement, RadioCardProps>(function RadioCard(\n { title, description, children, className, ...rest },\n ref,\n) {\n return (\n <CardBody\n kind=\"radio\"\n title={title}\n description={description}\n className={className}\n inputProps={rest}\n inputRef={ref}\n >\n {children}\n </CardBody>\n );\n});\n\nexport interface SelectionCardGroupProps extends FieldGroupProps {\n /** Group label — the question the cards answer. */\n label: string;\n /** Cards per row at full width. Steps down inside a narrow container. */\n columns?: 1 | 2 | 3;\n /** Space between cards in both axes, using Grid's spacing scale. Defaults to `md`. */\n gap?: GapSize;\n children: ReactNode;\n}\n\n/** A grid of selection cards under one legend, spaced by the shared Grid. */\nexport function SelectionCardGroup({\n label,\n columns = 2,\n gap = \"md\",\n children,\n className,\n ...fieldProps\n}: SelectionCardGroupProps) {\n return (\n <FieldGroup\n {...fieldProps}\n label={label}\n className={[\"ds-selection-card-group\", className].filter(Boolean).join(\" \")}\n >\n <Grid\n columns={columns}\n gap={gap}\n className=\"ds-selection-card-group__grid ds-field-group-grid\"\n style={{ \"--field-group-columns\": columns } as CSSProperties}\n >\n {children}\n </Grid>\n </FieldGroup>\n );\n}\n"],"mappings":";;;;;AAmBA,SAASC,EAAS,EAChB,SACA,UACA,gBACA,aACA,cACA,eACA,eAMC;CACD,OACE,kBAAC,SAAD;EACE,WAAW;GAAC;GAAqB;GAAoBC;EAAS,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,KAAK,GAAG;EAD1F,UAAA,CAGE,kBAAC,SAAD;GACE,KAAKC;GACL,MAAMC;GACN,aAAWA;GACX,WAAU;GACV,GAAIC;EACL,CAAA,GACD,kBAAC,QAAD;GAAM,WAAU;GAAhB,UAAA;IACE,kBAAC,QAAD;KAAM,WAAU;KAA4B,UAAAC;IAAY,CAAA;IACvDC,KAAe,kBAAC,QAAD;KAAM,WAAU;KAAkC,UAAAA;IAAkB,CAAA;IACnFC,KAAY,kBAAC,QAAD;KAAM,WAAU;KAA4B;IAAe,CAAA;GACpE;EACD,CAAA,CAAA;;AAEX;AAQA,IAAaC,IAAeC,EAAgD,SAC1E,EAAE,UAAO,gBAAa,aAAU,cAAW,GAAGC,KAC9C,GACA;CACA,OACE,kBAACV,GAAD;EACE,MAAK;EACE;EACM;EACF;EACX,YAAYU;EACZ,UAAUC;EAET;CACO,CAAA;AAEd,CAAC,GAKYC,IAAYH,EAA6C,SACpE,EAAE,UAAO,gBAAa,aAAU,cAAW,GAAGC,KAC9C,GACA;CACA,OACE,kBAACV,GAAD;EACE,MAAK;EACE;EACM;EACF;EACX,YAAYU;EACZ,UAAUC;EAET;CACO,CAAA;AAEd,CAAC;AAaD,SAAgBE,EAAmB,EACjC,UACA,aAAU,GACV,SAAM,MACN,aACA,cACA,GAAGC,KACuB;CAC1B,OACE,kBAACf,GAAD;EACE,GAAIe;EACG;EACP,WAAW,CAAC,2BAA2Bb,CAAS,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,KAAK,GAAG;EAE1E,UAAA,kBAACc,GAAD;GACW;GACJ;GACL,WAAU;GACV,OAAO,EAAE,yBAAyBC,EAAQ;GAEzC;EACG,CAAA;CACI,CAAA;AAEhB"}
1
+ {"version":3,"file":"index.js","names":["FieldGroup","CardBody","className","inputRef","kind","inputProps","title","description","children","CheckboxCard","forwardRef","rest","ref","RadioCard","SelectionCardGroup","fieldProps","Grid","columns"],"sources":["../../../src/components/SelectionCard/index.tsx"],"sourcesContent":["import { forwardRef, type CSSProperties, type InputHTMLAttributes, type ReactNode } from \"react\";\nimport { FieldGroup, type FieldGroupProps } from \"../Field/group\";\nimport { Grid, type GapSize } from \"../Grid\";\nimport \"../Choice/style.css\";\nimport \"./style.css\";\n\ninterface SelectionCardBase {\n /** The commitment, in the user's words. */\n title: ReactNode;\n /** One line on what picking this means. Takes nodes, so a chip or a link can sit inline. */\n description?: ReactNode;\n /** Extra content under the description — a price, a sample, a badge. */\n children?: ReactNode;\n}\n\ntype NativeInput = Omit<\n InputHTMLAttributes<HTMLInputElement>,\n \"type\" | \"size\" | \"children\" | \"title\"\n>;\n\nfunction CardBody({\n kind,\n title,\n description,\n children,\n className,\n inputProps,\n inputRef,\n}: SelectionCardBase & {\n kind: \"checkbox\" | \"radio\";\n className?: string;\n inputProps: NativeInput;\n inputRef: React.Ref<HTMLInputElement>;\n}) {\n return (\n <label\n className={[\"ds-selection-card\", \"ds-field-surface\", className].filter(Boolean).join(\" \")}\n >\n <input\n ref={inputRef}\n type={kind}\n data-kind={kind}\n className=\"ds-selection-card__control ds-indicator\"\n {...inputProps}\n />\n <span className=\"ds-selection-card__text\">\n <span className=\"ds-selection-card__title\">{title}</span>\n {description && <span className=\"ds-selection-card__description\">{description}</span>}\n {children && <span className=\"ds-selection-card__extra\">{children}</span>}\n </span>\n </label>\n );\n}\n\nexport interface CheckboxCardProps extends SelectionCardBase, NativeInput {}\n\n/**\n * A checkbox with room to explain itself. Same 20px box as the bare control —\n * the card is a bigger target, not a different decision.\n */\nexport const CheckboxCard = forwardRef<HTMLInputElement, CheckboxCardProps>(function CheckboxCard(\n { title, description, children, className, ...rest },\n ref,\n) {\n return (\n <CardBody\n kind=\"checkbox\"\n title={title}\n description={description}\n className={className}\n inputProps={rest}\n inputRef={ref}\n >\n {children}\n </CardBody>\n );\n});\n\nexport interface RadioCardProps extends SelectionCardBase, NativeInput {}\n\n/** One of a set of mutually exclusive options, each with its own explanation. */\nexport const RadioCard = forwardRef<HTMLInputElement, RadioCardProps>(function RadioCard(\n { title, description, children, className, ...rest },\n ref,\n) {\n return (\n <CardBody\n kind=\"radio\"\n title={title}\n description={description}\n className={className}\n inputProps={rest}\n inputRef={ref}\n >\n {children}\n </CardBody>\n );\n});\n\nexport interface SelectionCardGroupProps extends FieldGroupProps {\n /** Group label — the question the cards answer. */\n label: string;\n /** Cards per row at full width. Steps down inside a narrow container. */\n columns?: 1 | 2 | 3;\n /** Space between cards in both axes, using Grid's spacing scale. Defaults to `md`. */\n gap?: GapSize;\n children: ReactNode;\n}\n\n/** A grid of selection cards under one legend, spaced by the shared Grid. */\nexport function SelectionCardGroup({\n label,\n columns = 2,\n gap = \"md\",\n children,\n className,\n ...fieldProps\n}: SelectionCardGroupProps) {\n return (\n <FieldGroup\n {...fieldProps}\n label={label}\n className={[\"ds-selection-card-group\", className].filter(Boolean).join(\" \")}\n >\n <Grid\n columns={columns}\n gap={gap}\n className=\"ds-selection-card-group__grid ds-field-group-grid\"\n style={{ \"--field-group-columns\": columns } as CSSProperties}\n >\n {children}\n </Grid>\n </FieldGroup>\n );\n}\n"],"mappings":";;;;;AAoBA,SAASC,EAAS,EAChB,SACA,UACA,gBACA,aACA,cACA,eACA,eAMC;CACD,OACE,kBAAC,SAAD;EACE,WAAW;GAAC;GAAqB;GAAoBC;EAAS,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,KAAK,GAAG;EAD1F,UAAA,CAGE,kBAAC,SAAD;GACE,KAAKC;GACL,MAAMC;GACN,aAAWA;GACX,WAAU;GACV,GAAIC;EACL,CAAA,GACD,kBAAC,QAAD;GAAM,WAAU;GAAhB,UAAA;IACE,kBAAC,QAAD;KAAM,WAAU;KAA4B,UAAAC;IAAY,CAAA;IACvDC,KAAe,kBAAC,QAAD;KAAM,WAAU;KAAkC,UAAAA;IAAkB,CAAA;IACnFC,KAAY,kBAAC,QAAD;KAAM,WAAU;KAA4B;IAAe,CAAA;GACpE;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