@namroodinc/liquid-editorial 0.12.0 → 0.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (161) hide show
  1. package/README.md +17 -7
  2. package/UPGRADING.md +70 -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/{CollectionView-DrszOUOt.cjs → CollectionView-CIJdNwcq.cjs} +2 -2
  8. package/dist/chunks/{CollectionView-DrszOUOt.cjs.map → CollectionView-CIJdNwcq.cjs.map} +1 -1
  9. package/dist/chunks/{CollectionView-B0ZJxkNK.js → CollectionView-JRNdXHti.js} +2 -2
  10. package/dist/chunks/{CollectionView-B0ZJxkNK.js.map → CollectionView-JRNdXHti.js.map} +1 -1
  11. package/dist/chunks/{ColourField-C39pcjkG.js → ColourField-BTj9NHgI.js} +146 -152
  12. package/dist/chunks/ColourField-BTj9NHgI.js.map +1 -0
  13. package/dist/chunks/ColourField-DuoVeXjG.cjs +2 -0
  14. package/dist/chunks/ColourField-DuoVeXjG.cjs.map +1 -0
  15. package/dist/chunks/{DatePicker-Dpvfomrm.cjs → DatePicker-BYpGsfL4.cjs} +2 -2
  16. package/dist/chunks/{DatePicker-Dpvfomrm.cjs.map → DatePicker-BYpGsfL4.cjs.map} +1 -1
  17. package/dist/chunks/{DatePicker-DDc1nDTb.js → DatePicker-Cb5WspIC.js} +21 -21
  18. package/dist/chunks/{DatePicker-DDc1nDTb.js.map → DatePicker-Cb5WspIC.js.map} +1 -1
  19. package/dist/chunks/{Drawer-C3mWT9Kh.js → Drawer-Ck5XKT_V.js} +3 -3
  20. package/dist/chunks/{Drawer-C3mWT9Kh.js.map → Drawer-Ck5XKT_V.js.map} +1 -1
  21. package/dist/chunks/{Drawer-DTKZptua.cjs → Drawer-DdIH9jpe.cjs} +2 -2
  22. package/dist/chunks/{Drawer-DTKZptua.cjs.map → Drawer-DdIH9jpe.cjs.map} +1 -1
  23. package/dist/chunks/{EntryPicker-CgWbgWnc.cjs → EntryPicker-CCCoJxbd.cjs} +2 -2
  24. package/dist/chunks/{EntryPicker-CgWbgWnc.cjs.map → EntryPicker-CCCoJxbd.cjs.map} +1 -1
  25. package/dist/chunks/{EntryPicker-DlEsVCvA.js → EntryPicker-DLCP4S-q.js} +3 -3
  26. package/dist/chunks/{EntryPicker-DlEsVCvA.js.map → EntryPicker-DLCP4S-q.js.map} +1 -1
  27. package/dist/chunks/{FormEditor-iACd0El-.cjs → FormEditor-ArvjKtJJ.cjs} +2 -2
  28. package/dist/chunks/{FormEditor-iACd0El-.cjs.map → FormEditor-ArvjKtJJ.cjs.map} +1 -1
  29. package/dist/chunks/{FormEditor-CLLOHKiO.js → FormEditor-DnNBv9Xf.js} +16 -16
  30. package/dist/chunks/{FormEditor-CLLOHKiO.js.map → FormEditor-DnNBv9Xf.js.map} +1 -1
  31. package/dist/chunks/{Message-CyLq9ef-.js → Message-C73sJfdo.js} +4 -8
  32. package/dist/chunks/{Message-CyLq9ef-.js.map → Message-C73sJfdo.js.map} +1 -1
  33. package/dist/chunks/{Message-D3b8HDhm.cjs → Message-CIKSTXp8.cjs} +2 -2
  34. package/dist/chunks/{Message-D3b8HDhm.cjs.map → Message-CIKSTXp8.cjs.map} +1 -1
  35. package/dist/chunks/RichTextEditor--kMao88d.cjs +2 -0
  36. package/dist/chunks/RichTextEditor--kMao88d.cjs.map +1 -0
  37. package/dist/chunks/{RichTextEditor-B0P53GFt.js → RichTextEditor-CvbboqJY.js} +391 -374
  38. package/dist/chunks/RichTextEditor-CvbboqJY.js.map +1 -0
  39. package/dist/chunks/{dialogLabel-D18maX-p.js → dialogLabel-DT7rCr3_.js} +19 -19
  40. package/dist/chunks/{dialogLabel-D18maX-p.js.map → dialogLabel-DT7rCr3_.js.map} +1 -1
  41. package/dist/chunks/{dialogLabel-2HRYMHbF.cjs → dialogLabel-_-MTckE_.cjs} +2 -2
  42. package/dist/chunks/{dialogLabel-2HRYMHbF.cjs.map → dialogLabel-_-MTckE_.cjs.map} +1 -1
  43. package/dist/chunks/overlayLayer-iGhuAByk.cjs +2 -0
  44. package/dist/chunks/overlayLayer-iGhuAByk.cjs.map +1 -0
  45. package/dist/chunks/{overlayLayer-IuoPVwTO.js → overlayLayer-lU4iWSjO.js} +32 -28
  46. package/dist/chunks/overlayLayer-lU4iWSjO.js.map +1 -0
  47. package/dist/chunks/{group-7Z_xRlQx.js → style-7Z_xRlQx.js} +1 -1
  48. package/dist/chunks/{group-7Z_xRlQx.js.map → style-7Z_xRlQx.js.map} +1 -1
  49. package/dist/chunks/{group-nulIa2_8.cjs → style-nulIa2_8.cjs} +1 -1
  50. package/dist/chunks/{group-nulIa2_8.cjs.map → style-nulIa2_8.cjs.map} +1 -1
  51. package/dist/chunks/{use-picker-session-DbfOJstX.cjs → use-picker-session-Bue5MJHQ.cjs} +2 -2
  52. package/dist/chunks/{use-picker-session-DbfOJstX.cjs.map → use-picker-session-Bue5MJHQ.cjs.map} +1 -1
  53. package/dist/chunks/{use-picker-session-BnMxbGAZ.js → use-picker-session-DUO4G8Cs.js} +2 -2
  54. package/dist/chunks/{use-picker-session-BnMxbGAZ.js.map → use-picker-session-DUO4G8Cs.js.map} +1 -1
  55. package/dist/chunks/{useTooltip-BXAvQwt4.cjs → useTooltip-C7ON4nkV.cjs} +2 -2
  56. package/dist/chunks/{useTooltip-BXAvQwt4.cjs.map → useTooltip-C7ON4nkV.cjs.map} +1 -1
  57. package/dist/chunks/{useTooltip-BrC7FdeH.js → useTooltip-DnJEFBLg.js} +2 -2
  58. package/dist/chunks/{useTooltip-BrC7FdeH.js.map → useTooltip-DnJEFBLg.js.map} +1 -1
  59. package/dist/components/AppShell/index.cjs +1 -1
  60. package/dist/components/AppShell/index.js +1 -1
  61. package/dist/components/Avatar/index.cjs +1 -1
  62. package/dist/components/Avatar/index.js +1 -1
  63. package/dist/components/Badge/style.css +9 -9
  64. package/dist/components/Banner/index.cjs +1 -1
  65. package/dist/components/Banner/index.js +1 -1
  66. package/dist/components/Board/style.css +3 -3
  67. package/dist/components/Button/style.css +4 -8
  68. package/dist/components/Choice/index.cjs +1 -1
  69. package/dist/components/Choice/index.cjs.map +1 -1
  70. package/dist/components/Choice/index.js +3 -3
  71. package/dist/components/Choice/index.js.map +1 -1
  72. package/dist/components/Choice/style.css +29 -18
  73. package/dist/components/CollectionView/index.cjs +1 -1
  74. package/dist/components/CollectionView/index.js +1 -1
  75. package/dist/components/ColourField/index.cjs +1 -1
  76. package/dist/components/ColourField/index.d.cts.map +1 -1
  77. package/dist/components/ColourField/index.d.ts.map +1 -1
  78. package/dist/components/ColourField/index.js +1 -1
  79. package/dist/components/ColourField/style.css +4 -4
  80. package/dist/components/DatePicker/index.cjs +1 -1
  81. package/dist/components/DatePicker/index.js +1 -1
  82. package/dist/components/Drawer/index.cjs +1 -1
  83. package/dist/components/Drawer/index.js +1 -1
  84. package/dist/components/Drawer/style.css +2 -4
  85. package/dist/components/EditLayout/index.cjs +1 -1
  86. package/dist/components/EditLayout/index.js +3 -3
  87. package/dist/components/EditLayout/style.css +1 -7
  88. package/dist/components/EntryPicker/index.cjs +1 -1
  89. package/dist/components/EntryPicker/index.js +1 -1
  90. package/dist/components/EntryPicker/style.css +3 -1
  91. package/dist/components/Field/style.css +1 -1
  92. package/dist/components/FormEditor/README.md +26 -33
  93. package/dist/components/FormEditor/index.cjs +1 -1
  94. package/dist/components/FormEditor/index.js +1 -1
  95. package/dist/components/FormEditor/style.css +1 -0
  96. package/dist/components/LimitReading/style.css +1 -1
  97. package/dist/components/Menu/index.cjs +1 -1
  98. package/dist/components/Menu/index.js +1 -1
  99. package/dist/components/Menu/style.css +3 -2
  100. package/dist/components/Modal/index.cjs +1 -1
  101. package/dist/components/Modal/index.js +2 -2
  102. package/dist/components/Modal/style.css +1 -3
  103. package/dist/components/Popover/index.cjs +1 -1
  104. package/dist/components/Popover/index.cjs.map +1 -1
  105. package/dist/components/Popover/index.d.cts.map +1 -1
  106. package/dist/components/Popover/index.d.ts.map +1 -1
  107. package/dist/components/Popover/index.js +58 -55
  108. package/dist/components/Popover/index.js.map +1 -1
  109. package/dist/components/RichTextEditor/index.cjs +1 -1
  110. package/dist/components/RichTextEditor/index.d.cts.map +1 -1
  111. package/dist/components/RichTextEditor/index.d.ts.map +1 -1
  112. package/dist/components/RichTextEditor/index.js +1 -1
  113. package/dist/components/RichTextEditor/storyblock-view.d.cts.map +1 -1
  114. package/dist/components/RichTextEditor/storyblock-view.d.ts.map +1 -1
  115. package/dist/components/RichTextEditor/style.css +91 -60
  116. package/dist/components/Select/index.cjs +1 -1
  117. package/dist/components/Select/index.js +1 -1
  118. package/dist/components/SelectionCard/index.cjs +1 -1
  119. package/dist/components/SelectionCard/index.cjs.map +1 -1
  120. package/dist/components/SelectionCard/index.d.cts.map +1 -1
  121. package/dist/components/SelectionCard/index.d.ts.map +1 -1
  122. package/dist/components/SelectionCard/index.js +2 -2
  123. package/dist/components/SelectionCard/index.js.map +1 -1
  124. package/dist/components/SelectionCard/style.css +20 -65
  125. package/dist/components/Skeleton/style.css +1 -1
  126. package/dist/components/Slider/style.css +12 -23
  127. package/dist/components/Switch/index.cjs +1 -1
  128. package/dist/components/Switch/index.cjs.map +1 -1
  129. package/dist/components/Switch/index.d.cts.map +1 -1
  130. package/dist/components/Switch/index.d.ts.map +1 -1
  131. package/dist/components/Switch/index.js +2 -1
  132. package/dist/components/Switch/index.js.map +1 -1
  133. package/dist/components/Switch/style.css +14 -2
  134. package/dist/components/TagsInput/style.css +3 -21
  135. package/dist/components/Time/index.cjs +1 -1
  136. package/dist/components/Time/index.js +1 -1
  137. package/dist/components/Toast/index.cjs +1 -1
  138. package/dist/components/Toast/index.js +1 -1
  139. package/dist/elements.css +2 -1
  140. package/dist/index.cjs +1 -1
  141. package/dist/index.js +29 -29
  142. package/dist/internal/dialogFocus.d.cts +2 -0
  143. package/dist/internal/dialogFocus.d.cts.map +1 -1
  144. package/dist/internal/dialogFocus.d.ts +2 -0
  145. package/dist/internal/dialogFocus.d.ts.map +1 -1
  146. package/dist/message.css +5 -3
  147. package/dist/tokens.css +83 -309
  148. package/package.json +1 -1
  149. package/dist/chunks/ColourField-BdobU76j.cjs +0 -2
  150. package/dist/chunks/ColourField-BdobU76j.cjs.map +0 -1
  151. package/dist/chunks/ColourField-C39pcjkG.js.map +0 -1
  152. package/dist/chunks/RichTextEditor-B0P53GFt.js.map +0 -1
  153. package/dist/chunks/RichTextEditor-Wu_yjvD7.cjs +0 -2
  154. package/dist/chunks/RichTextEditor-Wu_yjvD7.cjs.map +0 -1
  155. package/dist/chunks/overlayLayer-IuoPVwTO.js.map +0 -1
  156. package/dist/chunks/overlayLayer-seJG-EFn.cjs +0 -2
  157. package/dist/chunks/overlayLayer-seJG-EFn.cjs.map +0 -1
  158. package/dist/components/ColourField/focus.d.cts +0 -3
  159. package/dist/components/ColourField/focus.d.cts.map +0 -1
  160. package/dist/components/ColourField/focus.d.ts +0 -3
  161. package/dist/components/ColourField/focus.d.ts.map +0 -1
@@ -7,7 +7,7 @@
7
7
  padding-block-end: var(--space-2);
8
8
  }
9
9
 
10
- /* Band-coloured trays hold surface-coloured cards. */
10
+ /* Lanes paint the band; their cards rest on --fill-card, a step off it. */
11
11
  .ds-board-column {
12
12
  display: flex;
13
13
  flex-direction: column;
@@ -117,7 +117,7 @@
117
117
  user-select: none;
118
118
  transition: background-color var(--duration-fast) var(--ease-standard);
119
119
 
120
- --field-bg: var(--color-surface);
120
+ --field-bg: var(--fill-card);
121
121
  }
122
122
 
123
123
  /* Painted fills other than the ground are named in --field-paint, so
@@ -151,7 +151,7 @@
151
151
  --field-paint: initial;
152
152
 
153
153
  box-shadow: var(--shadow-lg);
154
- background: var(--color-surface);
154
+ background: var(--field-bg);
155
155
  }
156
156
 
157
157
  .ds-board-card[data-overlay] .ds-board-card__handle {
@@ -92,14 +92,14 @@
92
92
  :disabled,
93
93
  [aria-disabled="true"]
94
94
  ) {
95
- background: var(--color-danger-hover, var(--color-danger));
95
+ background: var(--color-danger-hover);
96
96
  }
97
97
 
98
98
  .ds-button:where(:not(.ds-field-skin))[data-variant="danger"]:active:not(
99
99
  :disabled,
100
100
  [aria-disabled="true"]
101
101
  ) {
102
- background: var(--color-danger-pressed, var(--color-danger));
102
+ background: var(--color-danger-pressed);
103
103
  }
104
104
 
105
105
  /* Selected containers raise --button-active-bg above their own soft fill.
@@ -114,11 +114,7 @@
114
114
  :disabled,
115
115
  [aria-disabled="true"]
116
116
  ) {
117
- background: color-mix(
118
- in srgb,
119
- var(--color-primary) var(--soft-step-hover),
120
- var(--button-active-bg)
121
- );
117
+ background: color-mix(in srgb, var(--color-primary) var(--tint-hover), var(--button-active-bg));
122
118
  }
123
119
 
124
120
  .ds-button:where(:not(.ds-field-skin))[data-variant="active"]:active:not(
@@ -127,7 +123,7 @@
127
123
  ) {
128
124
  background: color-mix(
129
125
  in srgb,
130
- var(--color-primary) var(--soft-step-pressed),
126
+ var(--color-primary) var(--tint-pressed),
131
127
  var(--button-active-bg)
132
128
  );
133
129
  }
@@ -1,2 +1,2 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../chunks/mergeRefs-CZ-SArlE.cjs"),t=require("../../chunks/useIsomorphicLayoutEffect-XM4Ot6x5.cjs"),n=require("../../chunks/group-nulIa2_8.cjs"),r=require("../Grid/index.cjs");let i=require("react"),a=require("react/jsx-runtime");var o=e=>{e.preventDefault(),e.stopPropagation()};function s(e,{disabled:n,isFocusableWhenDisabled:r,name:i,required:a,...s}){let c=!!(n&&r);return t.t(()=>{let t=e.current;if(t&&c)return t.addEventListener(`click`,o),()=>t.removeEventListener(`click`,o)},[e,c]),c?{...s,"aria-disabled":!0,"data-disabled":``}:{...s,disabled:n,name:i,required:a}}var c=(0,i.forwardRef)(function({isIndeterminate:t=!1,className:n,children:r,...o},c){let l=(0,i.useRef)(null),u=s(l,o);return(0,i.useEffect)(()=>{l.current&&(l.current.indeterminate=t)},[t]),(0,a.jsxs)(`label`,{className:[`ds-choice`,n].filter(Boolean).join(` `),children:[(0,a.jsx)(`input`,{type:`checkbox`,className:`ds-choice__control`,"data-kind":`checkbox`,ref:e.t(l,c),...u}),r&&(0,a.jsx)(`span`,{className:`ds-choice__label`,children:r})]})}),l=(0,i.forwardRef)(function({className:t,children:n,...r},o){let c=(0,i.useRef)(null),l=s(c,r);return(0,a.jsxs)(`label`,{className:[`ds-choice`,t].filter(Boolean).join(` `),children:[(0,a.jsx)(`input`,{ref:e.t(c,o),type:`radio`,className:`ds-choice__control`,"data-kind":`radio`,...l}),n&&(0,a.jsx)(`span`,{className:`ds-choice__label`,children:n})]})});function u({label:e,columns:t=1,children:i,className:o,...s}){return(0,a.jsx)(n.t,{...s,label:e,className:[`ds-choice-group`,o].filter(Boolean).join(` `),children:t===1?(0,a.jsx)(r.Stack,{gap:`sm`,children:i}):(0,a.jsx)(r.Grid,{columns:t,gap:`sm`,className:`ds-choice-group__grid ds-field-group-grid`,style:{"--field-group-columns":t},children:i})})}exports.Checkbox=c,exports.ChoiceGroup=u,exports.Radio=l;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../chunks/mergeRefs-CZ-SArlE.cjs"),t=require("../../chunks/useIsomorphicLayoutEffect-XM4Ot6x5.cjs"),n=require("../../chunks/style-nulIa2_8.cjs"),r=require("../Grid/index.cjs");let i=require("react"),a=require("react/jsx-runtime");var o=e=>{e.preventDefault(),e.stopPropagation()};function s(e,{disabled:n,isFocusableWhenDisabled:r,name:i,required:a,...s}){let c=!!(n&&r);return t.t(()=>{let t=e.current;if(t&&c)return t.addEventListener(`click`,o),()=>t.removeEventListener(`click`,o)},[e,c]),c?{...s,"aria-disabled":!0,"data-disabled":``}:{...s,disabled:n,name:i,required:a}}var c=(0,i.forwardRef)(function({isIndeterminate:t=!1,className:n,children:r,...o},c){let l=(0,i.useRef)(null),u=s(l,o);return(0,i.useEffect)(()=>{l.current&&(l.current.indeterminate=t)},[t]),(0,a.jsxs)(`label`,{className:[`ds-choice`,n].filter(Boolean).join(` `),children:[(0,a.jsx)(`input`,{type:`checkbox`,className:`ds-choice__control ds-indicator`,"data-kind":`checkbox`,ref:e.t(l,c),...u}),r&&(0,a.jsx)(`span`,{className:`ds-choice__label`,children:r})]})}),l=(0,i.forwardRef)(function({className:t,children:n,...r},o){let c=(0,i.useRef)(null),l=s(c,r);return(0,a.jsxs)(`label`,{className:[`ds-choice`,t].filter(Boolean).join(` `),children:[(0,a.jsx)(`input`,{ref:e.t(c,o),type:`radio`,className:`ds-choice__control ds-indicator`,"data-kind":`radio`,...l}),n&&(0,a.jsx)(`span`,{className:`ds-choice__label`,children:n})]})});function u({label:e,columns:t=1,children:i,className:o,...s}){return(0,a.jsx)(n.t,{...s,label:e,className:[`ds-choice-group`,o].filter(Boolean).join(` `),children:t===1?(0,a.jsx)(r.Stack,{gap:`sm`,children:i}):(0,a.jsx)(r.Grid,{columns:t,gap:`sm`,className:`ds-choice-group__grid ds-field-group-grid`,style:{"--field-group-columns":t},children:i})})}exports.Checkbox=c,exports.ChoiceGroup=u,exports.Radio=l;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","names":["forwardRef","useRef","mergeRefs","FieldGroup","Stack","Grid","require_mergeRefs","require_useIsomorphicLayoutEffect","require_group","require_components_Grid_index","react","react_jsx_runtime","refuse","event","useChoiceInput","rest","keepsFocus","disabled","isFocusableWhenDisabled","node","input","Checkbox","inner","inputProps","isIndeterminate","className","ref","children","Radio","ChoiceGroup","fieldProps","columns"],"sources":["../../../src/components/Choice/index.tsx"],"sourcesContent":["import {\n forwardRef,\n useEffect,\n useRef,\n type CSSProperties,\n type InputHTMLAttributes,\n type ReactNode,\n type RefObject,\n} from \"react\";\nimport { mergeRefs } from \"../../internal/mergeRefs\";\nimport { useIsomorphicLayoutEffect } from \"../../internal/useIsomorphicLayoutEffect\";\nimport { FieldGroup, type FieldGroupProps } from \"../Field/group\";\nimport { Grid, Stack } from \"../Grid\";\nimport \"./style.css\";\n\ntype ChoiceInputProps = Omit<InputHTMLAttributes<HTMLInputElement>, \"type\" | \"size\"> & {\n /**\n * With `disabled`, keep the control focusable so it can be reached and\n * described: it is marked `aria-disabled` instead of native `disabled` and\n * keeps the disabled look. As with native `disabled`, presses change nothing\n * and run no click or change handlers, and the control is left out of form\n * submission and validation.\n */\n isFocusableWhenDisabled?: boolean;\n};\n\nconst refuse = (event: Event) => {\n event.preventDefault();\n event.stopPropagation();\n};\n\n/**\n * The native input's props. A focusable disabled choice stops each press on\n * the input itself, before React or an ancestor sees it, and cancels it, so\n * the browser restores the checked and indeterminate states and nothing\n * reports a change. It renders without `name` and `required`, which keeps it\n * out of submission and validation as native `disabled` would; a radio then\n * also leaves its group's arrow-key order. `aria-disabled` set directly is\n * passed through without blocking.\n */\nfunction useChoiceInput(\n input: RefObject<HTMLInputElement | null>,\n { disabled, isFocusableWhenDisabled, name, required, ...rest }: ChoiceInputProps,\n) {\n const keepsFocus = Boolean(disabled && isFocusableWhenDisabled);\n useIsomorphicLayoutEffect(() => {\n const node = input.current;\n if (!node || !keepsFocus) {\n return;\n }\n node.addEventListener(\"click\", refuse);\n return () => node.removeEventListener(\"click\", refuse);\n }, [input, keepsFocus]);\n return keepsFocus\n ? { ...rest, \"aria-disabled\": true, \"data-disabled\": \"\" }\n : { ...rest, disabled, name, required };\n}\n\nexport interface CheckboxProps extends ChoiceInputProps {\n /** Display state only — clicking an indeterminate box selects all. */\n isIndeterminate?: boolean;\n children?: ReactNode;\n}\n\n/** An independent yes/no. 20px box at every size, in every context. */\nexport const Checkbox = forwardRef<HTMLInputElement, CheckboxProps>(function Checkbox(\n { isIndeterminate = false, className, children, ...rest },\n ref,\n) {\n const inner = useRef<HTMLInputElement | null>(null);\n const inputProps = useChoiceInput(inner, rest);\n\n useEffect(() => {\n if (inner.current) {\n inner.current.indeterminate = isIndeterminate;\n }\n }, [isIndeterminate]);\n\n return (\n <label className={[\"ds-choice\", className].filter(Boolean).join(\" \")}>\n <input\n type=\"checkbox\"\n className=\"ds-choice__control\"\n data-kind=\"checkbox\"\n ref={mergeRefs(inner, ref)}\n {...inputProps}\n />\n {children && <span className=\"ds-choice__label\">{children}</span>}\n </label>\n );\n});\n\nexport interface RadioProps extends ChoiceInputProps {\n children?: ReactNode;\n}\n\n/** One of two or more mutually exclusive choices, all of them visible. */\nexport const Radio = forwardRef<HTMLInputElement, RadioProps>(function Radio(\n { className, children, ...rest },\n ref,\n) {\n const inner = useRef<HTMLInputElement | null>(null);\n const inputProps = useChoiceInput(inner, rest);\n return (\n <label className={[\"ds-choice\", className].filter(Boolean).join(\" \")}>\n <input\n ref={mergeRefs(inner, ref)}\n type=\"radio\"\n className=\"ds-choice__control\"\n data-kind=\"radio\"\n {...inputProps}\n />\n {children && <span className=\"ds-choice__label\">{children}</span>}\n </label>\n );\n});\n\nexport interface ChoiceGroupProps extends FieldGroupProps {\n /**\n * Run a long list in columns instead of one stack. Steps down to a single\n * column inside a narrow container.\n */\n columns?: 1 | 2 | 3;\n children: ReactNode;\n}\n\n/** A set of checkboxes or radios under one group label, spaced by Stack or Grid. */\nexport function ChoiceGroup({\n label,\n columns = 1,\n children,\n className,\n ...fieldProps\n}: ChoiceGroupProps) {\n return (\n <FieldGroup\n {...fieldProps}\n label={label}\n className={[\"ds-choice-group\", className].filter(Boolean).join(\" \")}\n >\n {columns === 1 ? (\n <Stack gap=\"sm\">{children}</Stack>\n ) : (\n <Grid\n columns={columns}\n gap=\"sm\"\n className=\"ds-choice-group__grid ds-field-group-grid\"\n style={{ \"--field-group-columns\": columns } as CSSProperties}\n >\n {children}\n </Grid>\n )}\n </FieldGroup>\n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Ge,GAC1B,EACA,CACA,IAAMO,GAAA,EAAQrB,EAAAA,OAAAA,CAAgC,IAAI,EAC5CsB,EAAaT,EAAeQ,EAAOP,CAAI,EAC7C,OACE,EAAAJ,EAAA,KAAA,CAAC,QAAD,CAAO,UAAW,CAAC,YAAac,CAAS,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,KAAK,GAAG,EAAnE,SAAA,EACE,EAAAd,EAAA,IAAA,CAAC,QAAD,CACE,IAAKT,EAAAA,EAAUoB,EAAOI,CAAG,EACzB,KAAK,QACL,UAAU,qBACV,YAAU,QACV,GAAIH,CACL,CAAA,EACAI,IAAY,EAAAhB,EAAA,IAAA,CAAC,OAAD,CAAM,UAAU,mBAAoB,UAAe,CAAA,CAC3D,C,EAEX,CAAC,EAYD,SAAgBkB,EAAY,CAC1B,QACA,UAAU,EACV,WACA,YACA,GAAGC,GACgB,CACnB,OACE,EAAAnB,EAAA,IAAA,CAACR,EAAAA,EAAD,CACE,GAAI2B,EACG,QACP,UAAW,CAAC,kBAAmBL,CAAS,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,KAAK,GAAG,EAEjE,SAAAM,IAAY,GACX,EAAApB,EAAA,IAAA,CAACP,EAAAA,MAAD,CAAO,IAAI,KAAM,UAAgB,CAAA,GAEjC,EAAAO,EAAA,IAAA,CAACN,EAAAA,KAAD,CACW,UACT,IAAI,KACJ,UAAU,4CACV,MAAO,CAAE,wBAAyB0B,CAAQ,EAEzC,UACG,CAAA,CAEE,CAAA,CAEhB,C"}
1
+ {"version":3,"file":"index.cjs","names":["forwardRef","useRef","mergeRefs","FieldGroup","Stack","Grid","require_mergeRefs","require_useIsomorphicLayoutEffect","require_style","require_components_Grid_index","react","react_jsx_runtime","refuse","event","useChoiceInput","rest","keepsFocus","disabled","isFocusableWhenDisabled","node","input","Checkbox","inner","inputProps","isIndeterminate","className","ref","children","Radio","ChoiceGroup","fieldProps","columns"],"sources":["../../../src/components/Choice/index.tsx"],"sourcesContent":["import {\n forwardRef,\n useEffect,\n useRef,\n type CSSProperties,\n type InputHTMLAttributes,\n type ReactNode,\n type RefObject,\n} from \"react\";\nimport { mergeRefs } from \"../../internal/mergeRefs\";\nimport { useIsomorphicLayoutEffect } from \"../../internal/useIsomorphicLayoutEffect\";\nimport { FieldGroup, type FieldGroupProps } from \"../Field/group\";\nimport { Grid, Stack } from \"../Grid\";\nimport \"./style.css\";\n\ntype ChoiceInputProps = Omit<InputHTMLAttributes<HTMLInputElement>, \"type\" | \"size\"> & {\n /**\n * With `disabled`, keep the control focusable so it can be reached and\n * described: it is marked `aria-disabled` instead of native `disabled` and\n * keeps the disabled look. As with native `disabled`, presses change nothing\n * and run no click or change handlers, and the control is left out of form\n * submission and validation.\n */\n isFocusableWhenDisabled?: boolean;\n};\n\nconst refuse = (event: Event) => {\n event.preventDefault();\n event.stopPropagation();\n};\n\n/**\n * The native input's props. A focusable disabled choice stops each press on\n * the input itself, before React or an ancestor sees it, and cancels it, so\n * the browser restores the checked and indeterminate states and nothing\n * reports a change. It renders without `name` and `required`, which keeps it\n * out of submission and validation as native `disabled` would; a radio then\n * also leaves its group's arrow-key order. `aria-disabled` set directly is\n * passed through without blocking.\n */\nfunction useChoiceInput(\n input: RefObject<HTMLInputElement | null>,\n { disabled, isFocusableWhenDisabled, name, required, ...rest }: ChoiceInputProps,\n) {\n const keepsFocus = Boolean(disabled && isFocusableWhenDisabled);\n useIsomorphicLayoutEffect(() => {\n const node = input.current;\n if (!node || !keepsFocus) {\n return;\n }\n node.addEventListener(\"click\", refuse);\n return () => node.removeEventListener(\"click\", refuse);\n }, [input, keepsFocus]);\n return keepsFocus\n ? { ...rest, \"aria-disabled\": true, \"data-disabled\": \"\" }\n : { ...rest, disabled, name, required };\n}\n\nexport interface CheckboxProps extends ChoiceInputProps {\n /** Display state only — clicking an indeterminate box selects all. */\n isIndeterminate?: boolean;\n children?: ReactNode;\n}\n\n/** An independent yes/no. 20px box at every size, in every context. */\nexport const Checkbox = forwardRef<HTMLInputElement, CheckboxProps>(function Checkbox(\n { isIndeterminate = false, className, children, ...rest },\n ref,\n) {\n const inner = useRef<HTMLInputElement | null>(null);\n const inputProps = useChoiceInput(inner, rest);\n\n useEffect(() => {\n if (inner.current) {\n inner.current.indeterminate = isIndeterminate;\n }\n }, [isIndeterminate]);\n\n return (\n <label className={[\"ds-choice\", className].filter(Boolean).join(\" \")}>\n <input\n type=\"checkbox\"\n className=\"ds-choice__control ds-indicator\"\n data-kind=\"checkbox\"\n ref={mergeRefs(inner, ref)}\n {...inputProps}\n />\n {children && <span className=\"ds-choice__label\">{children}</span>}\n </label>\n );\n});\n\nexport interface RadioProps extends ChoiceInputProps {\n children?: ReactNode;\n}\n\n/** One of two or more mutually exclusive choices, all of them visible. */\nexport const Radio = forwardRef<HTMLInputElement, RadioProps>(function Radio(\n { className, children, ...rest },\n ref,\n) {\n const inner = useRef<HTMLInputElement | null>(null);\n const inputProps = useChoiceInput(inner, rest);\n return (\n <label className={[\"ds-choice\", className].filter(Boolean).join(\" \")}>\n <input\n ref={mergeRefs(inner, ref)}\n type=\"radio\"\n className=\"ds-choice__control ds-indicator\"\n data-kind=\"radio\"\n {...inputProps}\n />\n {children && <span className=\"ds-choice__label\">{children}</span>}\n </label>\n );\n});\n\nexport interface ChoiceGroupProps extends FieldGroupProps {\n /**\n * Run a long list in columns instead of one stack. Steps down to a single\n * column inside a narrow container.\n */\n columns?: 1 | 2 | 3;\n children: ReactNode;\n}\n\n/** A set of checkboxes or radios under one group label, spaced by Stack or Grid. */\nexport function ChoiceGroup({\n label,\n columns = 1,\n children,\n className,\n ...fieldProps\n}: ChoiceGroupProps) {\n return (\n <FieldGroup\n {...fieldProps}\n label={label}\n className={[\"ds-choice-group\", className].filter(Boolean).join(\" \")}\n >\n {columns === 1 ? (\n <Stack gap=\"sm\">{children}</Stack>\n ) : (\n <Grid\n columns={columns}\n gap=\"sm\"\n className=\"ds-choice-group__grid ds-field-group-grid\"\n style={{ \"--field-group-columns\": columns } as CSSProperties}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,CAAyC,SAC5D,CAAE,YAAW,WAAU,GAAGe,GAC1B,EACA,CACA,IAAMO,GAAA,EAAQrB,EAAAA,OAAAA,CAAgC,IAAI,EAC5CsB,EAAaT,EAAeQ,EAAOP,CAAI,EAC7C,OACE,EAAAJ,EAAA,KAAA,CAAC,QAAD,CAAO,UAAW,CAAC,YAAac,CAAS,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,KAAK,GAAG,EAAnE,SAAA,EACE,EAAAd,EAAA,IAAA,CAAC,QAAD,CACE,IAAKT,EAAAA,EAAUoB,EAAOI,CAAG,EACzB,KAAK,QACL,UAAU,kCACV,YAAU,QACV,GAAIH,CACL,CAAA,EACAI,IAAY,EAAAhB,EAAA,IAAA,CAAC,OAAD,CAAM,UAAU,mBAAoB,UAAe,CAAA,CAC3D,C,EAEX,CAAC,EAYD,SAAgBkB,EAAY,CAC1B,QACA,UAAU,EACV,WACA,YACA,GAAGC,GACgB,CACnB,OACE,EAAAnB,EAAA,IAAA,CAACR,EAAAA,EAAD,CACE,GAAI2B,EACG,QACP,UAAW,CAAC,kBAAmBL,CAAS,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,KAAK,GAAG,EAEjE,SAAAM,IAAY,GACX,EAAApB,EAAA,IAAA,CAACP,EAAAA,MAAD,CAAO,IAAI,KAAM,UAAgB,CAAA,GAEjC,EAAAO,EAAA,IAAA,CAACN,EAAAA,KAAD,CACW,UACT,IAAI,KACJ,UAAU,4CACV,MAAO,CAAE,wBAAyB0B,CAAQ,EAEzC,UACG,CAAA,CAEE,CAAA,CAEhB,C"}
@@ -1,6 +1,6 @@
1
1
  import { t as e } from "../../chunks/mergeRefs-C6_5pADN.js";
2
2
  import { t } from "../../chunks/useIsomorphicLayoutEffect-Bc9hxFMc.js";
3
- import { t as n } from "../../chunks/group-7Z_xRlQx.js";
3
+ import { t as n } from "../../chunks/style-7Z_xRlQx.js";
4
4
  import { Grid as r, Stack as i } from "../Grid/index.js";
5
5
  import { forwardRef as a, useEffect as o, useRef as s } from "react";
6
6
  import { jsx as c, jsxs as l } from "react/jsx-runtime";
@@ -32,7 +32,7 @@ var f = a(function({ isIndeterminate: t = !1, className: n, children: r, ...i },
32
32
  className: ["ds-choice", n].filter(Boolean).join(" "),
33
33
  children: [/* @__PURE__ */ c("input", {
34
34
  type: "checkbox",
35
- className: "ds-choice__control",
35
+ className: "ds-choice__control ds-indicator",
36
36
  "data-kind": "checkbox",
37
37
  ref: e(u, a),
38
38
  ...f
@@ -48,7 +48,7 @@ var f = a(function({ isIndeterminate: t = !1, className: n, children: r, ...i },
48
48
  children: [/* @__PURE__ */ c("input", {
49
49
  ref: e(a, i),
50
50
  type: "radio",
51
- className: "ds-choice__control",
51
+ className: "ds-choice__control ds-indicator",
52
52
  "data-kind": "radio",
53
53
  ...o
54
54
  }), n && /* @__PURE__ */ c("span", {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["mergeRefs","FieldGroup","refuse","event","useChoiceInput","rest","keepsFocus","disabled","isFocusableWhenDisabled","useIsomorphicLayoutEffect","node","input","Checkbox","forwardRef","inner","useRef","inputProps","useEffect","isIndeterminate","className","ref","children","Radio","ChoiceGroup","fieldProps","columns","Stack","Grid"],"sources":["../../../src/components/Choice/index.tsx"],"sourcesContent":["import {\n forwardRef,\n useEffect,\n useRef,\n type CSSProperties,\n type InputHTMLAttributes,\n type ReactNode,\n type RefObject,\n} from \"react\";\nimport { mergeRefs } from \"../../internal/mergeRefs\";\nimport { useIsomorphicLayoutEffect } from \"../../internal/useIsomorphicLayoutEffect\";\nimport { FieldGroup, type FieldGroupProps } from \"../Field/group\";\nimport { Grid, Stack } from \"../Grid\";\nimport \"./style.css\";\n\ntype ChoiceInputProps = Omit<InputHTMLAttributes<HTMLInputElement>, \"type\" | \"size\"> & {\n /**\n * With `disabled`, keep the control focusable so it can be reached and\n * described: it is marked `aria-disabled` instead of native `disabled` and\n * keeps the disabled look. As with native `disabled`, presses change nothing\n * and run no click or change handlers, and the control is left out of form\n * submission and validation.\n */\n isFocusableWhenDisabled?: boolean;\n};\n\nconst refuse = (event: Event) => {\n event.preventDefault();\n event.stopPropagation();\n};\n\n/**\n * The native input's props. A focusable disabled choice stops each press on\n * the input itself, before React or an ancestor sees it, and cancels it, so\n * the browser restores the checked and indeterminate states and nothing\n * reports a change. It renders without `name` and `required`, which keeps it\n * out of submission and validation as native `disabled` would; a radio then\n * also leaves its group's arrow-key order. `aria-disabled` set directly is\n * passed through without blocking.\n */\nfunction useChoiceInput(\n input: RefObject<HTMLInputElement | null>,\n { disabled, isFocusableWhenDisabled, name, required, ...rest }: ChoiceInputProps,\n) {\n const keepsFocus = Boolean(disabled && isFocusableWhenDisabled);\n useIsomorphicLayoutEffect(() => {\n const node = input.current;\n if (!node || !keepsFocus) {\n return;\n }\n node.addEventListener(\"click\", refuse);\n return () => node.removeEventListener(\"click\", refuse);\n }, [input, keepsFocus]);\n return keepsFocus\n ? { ...rest, \"aria-disabled\": true, \"data-disabled\": \"\" }\n : { ...rest, disabled, name, required };\n}\n\nexport interface CheckboxProps extends ChoiceInputProps {\n /** Display state only — clicking an indeterminate box selects all. */\n isIndeterminate?: boolean;\n children?: ReactNode;\n}\n\n/** An independent yes/no. 20px box at every size, in every context. */\nexport const Checkbox = forwardRef<HTMLInputElement, CheckboxProps>(function Checkbox(\n { isIndeterminate = false, className, children, ...rest },\n ref,\n) {\n const inner = useRef<HTMLInputElement | null>(null);\n const inputProps = useChoiceInput(inner, rest);\n\n useEffect(() => {\n if (inner.current) {\n inner.current.indeterminate = isIndeterminate;\n }\n }, [isIndeterminate]);\n\n return (\n <label className={[\"ds-choice\", className].filter(Boolean).join(\" \")}>\n <input\n type=\"checkbox\"\n className=\"ds-choice__control\"\n data-kind=\"checkbox\"\n ref={mergeRefs(inner, ref)}\n {...inputProps}\n />\n {children && <span className=\"ds-choice__label\">{children}</span>}\n </label>\n );\n});\n\nexport interface RadioProps extends ChoiceInputProps {\n children?: ReactNode;\n}\n\n/** One of two or more mutually exclusive choices, all of them visible. */\nexport const Radio = forwardRef<HTMLInputElement, RadioProps>(function Radio(\n { className, children, ...rest },\n ref,\n) {\n const inner = useRef<HTMLInputElement | null>(null);\n const inputProps = useChoiceInput(inner, rest);\n return (\n <label className={[\"ds-choice\", className].filter(Boolean).join(\" \")}>\n <input\n ref={mergeRefs(inner, ref)}\n type=\"radio\"\n className=\"ds-choice__control\"\n data-kind=\"radio\"\n {...inputProps}\n />\n {children && <span className=\"ds-choice__label\">{children}</span>}\n </label>\n );\n});\n\nexport interface ChoiceGroupProps extends FieldGroupProps {\n /**\n * Run a long list in columns instead of one stack. Steps down to a single\n * column inside a narrow container.\n */\n columns?: 1 | 2 | 3;\n children: ReactNode;\n}\n\n/** A set of checkboxes or radios under one group label, spaced by Stack or Grid. */\nexport function ChoiceGroup({\n label,\n columns = 1,\n children,\n className,\n ...fieldProps\n}: ChoiceGroupProps) {\n return (\n <FieldGroup\n {...fieldProps}\n label={label}\n className={[\"ds-choice-group\", className].filter(Boolean).join(\" \")}\n >\n {columns === 1 ? (\n <Stack gap=\"sm\">{children}</Stack>\n ) : (\n <Grid\n columns={columns}\n gap=\"sm\"\n className=\"ds-choice-group__grid ds-field-group-grid\"\n style={{ \"--field-group-columns\": columns } as CSSProperties}\n >\n {children}\n </Grid>\n )}\n </FieldGroup>\n );\n}\n"],"mappings":";;;;;;;AA0BA,IAAME,KAAU,MAAiB;CAE/B,AADAC,EAAM,eAAe,GACrBA,EAAM,gBAAgB;AACxB;AAWA,SAASC,EACP,GACA,EAAE,aAAU,4BAAyB,SAAM,aAAU,GAAGC,KACxD;CACA,IAAMC,IAAa,GAAQC,KAAYC;CASvC,OARAC,QAAgC;EAC9B,IAAMC,IAAOC,EAAM;EACnB,IAAKD,KAASJ,GAId,OADAI,EAAK,iBAAiB,SAASR,CAAM,SACxBQ,EAAK,oBAAoB,SAASR,CAAM;CACvD,GAAG,CAACS,GAAOL,CAAU,CAAC,GACfA,IACH;EAAE,GAAGD;EAAM,iBAAiB;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CAAC,KAAK,GAAG;EAEjE,UAAAM,MAAY,IACX,kBAACC,GAAD;GAAO,KAAI;GAAM;EAAgB,CAAA,IAEjC,kBAACC,GAAD;GACW;GACT,KAAI;GACJ,WAAU;GACV,OAAO,EAAE,yBAAyBF,EAAQ;GAEzC;EACG,CAAA;CAEE,CAAA;AAEhB"}
1
+ {"version":3,"file":"index.js","names":["mergeRefs","FieldGroup","refuse","event","useChoiceInput","rest","keepsFocus","disabled","isFocusableWhenDisabled","useIsomorphicLayoutEffect","node","input","Checkbox","forwardRef","inner","useRef","inputProps","useEffect","isIndeterminate","className","ref","children","Radio","ChoiceGroup","fieldProps","columns","Stack","Grid"],"sources":["../../../src/components/Choice/index.tsx"],"sourcesContent":["import {\n forwardRef,\n useEffect,\n useRef,\n type CSSProperties,\n type InputHTMLAttributes,\n type ReactNode,\n type RefObject,\n} from \"react\";\nimport { mergeRefs } from \"../../internal/mergeRefs\";\nimport { useIsomorphicLayoutEffect } from \"../../internal/useIsomorphicLayoutEffect\";\nimport { FieldGroup, type FieldGroupProps } from \"../Field/group\";\nimport { Grid, Stack } from \"../Grid\";\nimport \"./style.css\";\n\ntype ChoiceInputProps = Omit<InputHTMLAttributes<HTMLInputElement>, \"type\" | \"size\"> & {\n /**\n * With `disabled`, keep the control focusable so it can be reached and\n * described: it is marked `aria-disabled` instead of native `disabled` and\n * keeps the disabled look. As with native `disabled`, presses change nothing\n * and run no click or change handlers, and the control is left out of form\n * submission and validation.\n */\n isFocusableWhenDisabled?: boolean;\n};\n\nconst refuse = (event: Event) => {\n event.preventDefault();\n event.stopPropagation();\n};\n\n/**\n * The native input's props. A focusable disabled choice stops each press on\n * the input itself, before React or an ancestor sees it, and cancels it, so\n * the browser restores the checked and indeterminate states and nothing\n * reports a change. It renders without `name` and `required`, which keeps it\n * out of submission and validation as native `disabled` would; a radio then\n * also leaves its group's arrow-key order. `aria-disabled` set directly is\n * passed through without blocking.\n */\nfunction useChoiceInput(\n input: RefObject<HTMLInputElement | null>,\n { disabled, isFocusableWhenDisabled, name, required, ...rest }: ChoiceInputProps,\n) {\n const keepsFocus = Boolean(disabled && isFocusableWhenDisabled);\n useIsomorphicLayoutEffect(() => {\n const node = input.current;\n if (!node || !keepsFocus) {\n return;\n }\n node.addEventListener(\"click\", refuse);\n return () => node.removeEventListener(\"click\", refuse);\n }, [input, keepsFocus]);\n return keepsFocus\n ? { ...rest, \"aria-disabled\": true, \"data-disabled\": \"\" }\n : { ...rest, disabled, name, required };\n}\n\nexport interface CheckboxProps extends ChoiceInputProps {\n /** Display state only — clicking an indeterminate box selects all. */\n isIndeterminate?: boolean;\n children?: ReactNode;\n}\n\n/** An independent yes/no. 20px box at every size, in every context. */\nexport const Checkbox = forwardRef<HTMLInputElement, CheckboxProps>(function Checkbox(\n { isIndeterminate = false, className, children, ...rest },\n ref,\n) {\n const inner = useRef<HTMLInputElement | null>(null);\n const inputProps = useChoiceInput(inner, rest);\n\n useEffect(() => {\n if (inner.current) {\n inner.current.indeterminate = isIndeterminate;\n }\n }, [isIndeterminate]);\n\n return (\n <label className={[\"ds-choice\", className].filter(Boolean).join(\" \")}>\n <input\n type=\"checkbox\"\n className=\"ds-choice__control ds-indicator\"\n data-kind=\"checkbox\"\n ref={mergeRefs(inner, ref)}\n {...inputProps}\n />\n {children && <span className=\"ds-choice__label\">{children}</span>}\n </label>\n );\n});\n\nexport interface RadioProps extends ChoiceInputProps {\n children?: ReactNode;\n}\n\n/** One of two or more mutually exclusive choices, all of them visible. */\nexport const Radio = forwardRef<HTMLInputElement, RadioProps>(function Radio(\n { className, children, ...rest },\n ref,\n) {\n const inner = useRef<HTMLInputElement | null>(null);\n const inputProps = useChoiceInput(inner, rest);\n return (\n <label className={[\"ds-choice\", className].filter(Boolean).join(\" \")}>\n <input\n ref={mergeRefs(inner, ref)}\n type=\"radio\"\n className=\"ds-choice__control ds-indicator\"\n data-kind=\"radio\"\n {...inputProps}\n />\n {children && <span className=\"ds-choice__label\">{children}</span>}\n </label>\n );\n});\n\nexport interface ChoiceGroupProps extends FieldGroupProps {\n /**\n * Run a long list in columns instead of one stack. Steps down to a single\n * column inside a narrow container.\n */\n columns?: 1 | 2 | 3;\n children: ReactNode;\n}\n\n/** A set of checkboxes or radios under one group label, spaced by Stack or Grid. */\nexport function ChoiceGroup({\n label,\n columns = 1,\n children,\n className,\n ...fieldProps\n}: ChoiceGroupProps) {\n return (\n <FieldGroup\n {...fieldProps}\n label={label}\n className={[\"ds-choice-group\", className].filter(Boolean).join(\" \")}\n >\n {columns === 1 ? (\n <Stack gap=\"sm\">{children}</Stack>\n ) : (\n <Grid\n columns={columns}\n gap=\"sm\"\n className=\"ds-choice-group__grid ds-field-group-grid\"\n style={{ \"--field-group-columns\": columns } as CSSProperties}\n >\n {children}\n </Grid>\n )}\n </FieldGroup>\n );\n}\n"],"mappings":";;;;;;;AA0BA,IAAME,KAAU,MAAiB;CAE/B,AADAC,EAAM,eAAe,GACrBA,EAAM,gBAAgB;AACxB;AAWA,SAASC,EACP,GACA,EAAE,aAAU,4BAAyB,SAAM,aAAU,GAAGC,KACxD;CACA,IAAMC,IAAa,GAAQC,KAAYC;CASvC,OARAC,QAAgC;EAC9B,IAAMC,IAAOC,EAAM;EACnB,IAAKD,KAASJ,GAId,OADAI,EAAK,iBAAiB,SAASR,CAAM,SACxBQ,EAAK,oBAAoB,SAASR,CAAM;CACvD,GAAG,CAACS,GAAOL,CAAU,CAAC,GACfA,IACH;EAAE,GAAGD;EAAM,iBAAiB;EAAM,iBAAiB;CAAG,IACtD;EAAE,GAAGA;EAAM;EAAU;EAAM;CAAS;AAC1C;AASA,IAAaO,IAAWC,EAA4C,SAClE,EAAE,qBAAkB,IAAO,cAAW,aAAU,GAAGR,KACnD,GACA;CACA,IAAMS,IAAQC,EAAgC,IAAI,GAC5CC,IAAaZ,EAAeU,GAAOT,CAAI;CAQ7C,OANAY,QAAgB;EACd,AAAIH,EAAM,YACR,EAAM,QAAQ,gBAAgBI;CAElC,GAAG,CAACA,CAAe,C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none;
14
14
  inline-size: var(--icon-md);
@@ -16,38 +16,45 @@
16
16
  margin: 0;
17
17
  margin-block-start: calc((1lh - var(--icon-md)) / 2);
18
18
  border: 0;
19
- background: var(--fill-indicator);
19
+ background: var(--indicator-fill, var(--fill-indicator));
20
+ box-shadow: var(--indicator-edge);
20
21
  cursor: pointer;
21
22
  display: grid;
22
23
  place-content: center;
23
24
  transition: background-color var(--duration-fast) var(--ease-standard);
24
25
  }
25
26
 
26
- .ds-choice__control[data-kind="checkbox"] {
27
+ .ds-indicator[data-kind="checkbox"] {
27
28
  border-radius: var(--field-radius);
28
29
  }
29
30
 
30
- .ds-choice__control[data-kind="radio"] {
31
+ .ds-indicator[data-kind="radio"] {
31
32
  border-radius: var(--radius-pill);
32
33
  }
33
34
 
34
- .ds-choice__control:hover:not(:disabled, [data-disabled]) {
35
- background: var(--fill-indicator-hover);
35
+ .ds-indicator:hover:where(:not(:disabled, [data-disabled])) {
36
+ background: var(--indicator-fill, var(--fill-indicator-hover));
36
37
  }
37
38
 
38
- .ds-choice__control:focus-visible {
39
+ .ds-indicator:focus-visible {
39
40
  outline: var(--focus-width) solid var(--color-focus);
40
41
  outline-offset: 2px;
41
42
  }
42
43
 
43
- /* Checked controls use a primary fill with an on-solid tick or dot. */
44
- .ds-choice__control[data-kind="checkbox"]:checked,
45
- .ds-choice__control[data-kind="radio"]:checked,
46
- .ds-choice__control[data-kind="checkbox"]:indeterminate {
47
- background: var(--color-primary);
44
+ /* An unselected radio group also matches :indeterminate. Only checkboxes
45
+ * use that state as a filled control. */
46
+ .ds-indicator:is(:checked, :where([data-kind="checkbox"]):indeterminate) {
47
+ background: var(--indicator-checked, var(--color-primary));
48
+ box-shadow: none;
48
49
  }
49
50
 
50
- .ds-choice__control[data-kind="checkbox"]:checked::before {
51
+ .ds-indicator:is(:checked, :where([data-kind="checkbox"]):indeterminate):hover:where(
52
+ :not(:disabled, [data-disabled])
53
+ ) {
54
+ background: var(--color-primary-hover);
55
+ }
56
+
57
+ .ds-indicator[data-kind="checkbox"]:checked::before {
51
58
  content: "";
52
59
  inline-size: 13px;
53
60
  block-size: 13px;
@@ -55,7 +62,7 @@
55
62
  clip-path: polygon(14% 47%, 0 61%, 40% 100%, 100% 22%, 85% 10%, 38% 71%);
56
63
  }
57
64
 
58
- .ds-choice__control[data-kind="checkbox"]:indeterminate::before {
65
+ .ds-indicator[data-kind="checkbox"]:indeterminate::before {
59
66
  content: "";
60
67
  inline-size: 10px;
61
68
  block-size: 2px;
@@ -63,7 +70,7 @@
63
70
  }
64
71
 
65
72
  /* Selected radios invert the dot against a primary disc. */
66
- .ds-choice__control[data-kind="radio"]:checked::before {
73
+ .ds-indicator[data-kind="radio"]:checked::before {
67
74
  content: "";
68
75
  inline-size: var(--space-2);
69
76
  block-size: var(--space-2);
@@ -71,17 +78,21 @@
71
78
  background: var(--color-text-on-solid);
72
79
  }
73
80
 
74
- .ds-choice__control[aria-invalid="true"][data-kind] {
81
+ .ds-indicator[aria-invalid="true"] {
82
+ background: var(--indicator-fill, var(--field-invalid));
83
+ }
84
+
85
+ .ds-indicator[aria-invalid="true"]:is(:checked, :where([data-kind="checkbox"]):indeterminate) {
75
86
  background: var(--color-danger);
76
87
  }
77
88
 
78
89
  /* data-disabled marks a focusable disabled choice (isFocusableWhenDisabled). */
79
- .ds-choice:has(.ds-choice__control:is(:disabled, [data-disabled])) {
90
+ .ds-choice:has(.ds-indicator:is(:disabled, [data-disabled])) {
80
91
  cursor: not-allowed;
81
92
  opacity: 0.45;
82
93
  }
83
94
 
84
- .ds-choice__control:is(:disabled, [data-disabled]) {
95
+ .ds-indicator:is(:disabled, [data-disabled]) {
85
96
  cursor: not-allowed;
86
97
  }
87
98
 
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require("../Pagination/index.cjs");const e=require("../../chunks/CollectionView-DrszOUOt.cjs");exports.CollectionEmpty=e.n,exports.CollectionView=e.t;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require("../Pagination/index.cjs");const e=require("../../chunks/CollectionView-CIJdNwcq.cjs");exports.CollectionEmpty=e.n,exports.CollectionView=e.t;
@@ -1,2 +1,2 @@
1
1
  import "../Pagination/index.js";
2
- export { n as CollectionEmpty, t as CollectionView } from "../../chunks/CollectionView-B0ZJxkNK.js";
2
+ export { n as CollectionEmpty, t as CollectionView } from "../../chunks/CollectionView-JRNdXHti.js";
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../chunks/ColourField-BdobU76j.cjs");exports.ColourField=e.t,exports.ColourPanel=e.n;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../chunks/ColourField-DuoVeXjG.cjs");exports.ColourField=e.t,exports.ColourPanel=e.n;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/components/ColourField/index.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAW,KAAK,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC5D,OAAO,EAAa,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AAK9D,OAAO,EAAsB,KAAK,mBAAmB,EAAE,MAAM,SAAS,CAAC;AACvE,OAAO,EAAkC,KAAK,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAChF,OAAO,aAAa,CAAC;AAErB,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACtC,YAAY,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEhD,MAAM,WAAW,gBACf,SACE,IAAI,CAAC,cAAc,EAAE,OAAO,GAAG,cAAc,GAAG,UAAU,GAAG,MAAM,GAAG,UAAU,CAAC,EACjF,gBAAgB,EAChB,mBAAmB;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,gBAAgB,CAAC;IAC7B,iGAAiG;IACjG,gBAAgB,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;CAC/C;AAED,iFAAiF;AACjF,eAAO,MAAM,WAAW,+GAsOtB,CAAC"}
1
+ {"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/components/ColourField/index.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAW,KAAK,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC5D,OAAO,EAAa,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AAI9D,OAAO,EAAsB,KAAK,mBAAmB,EAAE,MAAM,SAAS,CAAC;AACvE,OAAO,EAAkC,KAAK,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAChF,OAAO,aAAa,CAAC;AAErB,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACtC,YAAY,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEhD,MAAM,WAAW,gBACf,SACE,IAAI,CAAC,cAAc,EAAE,OAAO,GAAG,cAAc,GAAG,UAAU,GAAG,MAAM,GAAG,UAAU,CAAC,EACjF,gBAAgB,EAChB,mBAAmB;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,gBAAgB,CAAC;IAC7B,iGAAiG;IACjG,gBAAgB,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;CAC/C;AAED,iFAAiF;AACjF,eAAO,MAAM,WAAW,+GAsOtB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ColourField/index.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAW,KAAK,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC5D,OAAO,EAAa,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AAK9D,OAAO,EAAsB,KAAK,mBAAmB,EAAE,MAAM,SAAS,CAAC;AACvE,OAAO,EAAkC,KAAK,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAChF,OAAO,aAAa,CAAC;AAErB,OAAO,EAAE,WAAW,EAAE,M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+1 @@
1
- export { t as ColourField, n as ColourPanel } from "../../chunks/ColourField-C39pcjkG.js";
1
+ export { t as ColourField, n as ColourPanel } from "../../chunks/ColourField-BTj9NHgI.js";
@@ -3,9 +3,9 @@
3
3
  .ds-colour-field,
4
4
  .ds-colour-panel {
5
5
  --colour-checker: conic-gradient(
6
- var(--color-surface) 25%,
6
+ var(--color-canvas) 25%,
7
7
  var(--color-border-strong) 0 50%,
8
- var(--color-surface) 0 75%,
8
+ var(--color-canvas) 0 75%,
9
9
  var(--color-border-strong) 0
10
10
  )
11
11
  0 0 / 8px 8px;
@@ -62,7 +62,7 @@
62
62
  /* Each thumb is filled with the colour beneath it, so a surface ring and a
63
63
  * text ring mark its position whatever that colour is. */
64
64
  --colour-thumb-halo:
65
- 0 0 0 2px var(--color-surface), 0 0 0 3px var(--color-text), var(--shadow-md);
65
+ 0 0 0 2px var(--color-canvas), 0 0 0 3px var(--color-text), var(--shadow-md);
66
66
 
67
67
  display: flex;
68
68
  flex-direction: column;
@@ -235,7 +235,7 @@
235
235
 
236
236
  /* A surface check with a text halo reads on any swatch, opaque or not. */
237
237
  .ds-colour-panel__preset .ds-colour-swatch {
238
- color: var(--color-surface);
238
+ color: var(--color-canvas);
239
239
  }
240
240
 
241
241
  .ds-colour-panel__preset .ds-icon {
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../chunks/DatePicker-Dpvfomrm.cjs");exports.Calendar=e.t,exports.DateField=e.n,exports.DateRangeField=e.r,exports.formatIsoDate=e.i;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../chunks/DatePicker-BYpGsfL4.cjs");exports.Calendar=e.t,exports.DateField=e.n,exports.DateRangeField=e.r,exports.formatIsoDate=e.i;
@@ -1 +1 @@
1
- export { t as Calendar, n as DateField, r as DateRangeField, i as formatIsoDate } from "../../chunks/DatePicker-DDc1nDTb.js";
1
+ export { t as Calendar, n as DateField, r as DateRangeField, i as formatIsoDate } from "../../chunks/DatePicker-Cb5WspIC.js";
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../chunks/Drawer-DTKZptua.cjs");exports.Drawer=e.t;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../chunks/Drawer-DdIH9jpe.cjs");exports.Drawer=e.t;
@@ -1 +1 @@
1
- export { t as Drawer } from "../../chunks/Drawer-C3mWT9Kh.js";
1
+ export { t as Drawer } from "../../chunks/Drawer-Ck5XKT_V.js";
@@ -23,7 +23,7 @@
23
23
  }
24
24
 
25
25
  .ds-drawer {
26
- --field-bg: var(--color-surface);
26
+ --field-bg: var(--color-canvas);
27
27
  --drawer-hidden-transform: translateX(100%);
28
28
 
29
29
  position: relative;
@@ -40,8 +40,6 @@
40
40
  box-shadow: var(--shadow-lg);
41
41
  transform: none;
42
42
  transition: transform var(--duration-panel) var(--ease-panel);
43
-
44
- --fill-card: var(--fill-row-alt);
45
43
  }
46
44
 
47
45
  .ds-drawer[data-side="end"],
@@ -197,7 +195,7 @@
197
195
  border: 0;
198
196
  background: var(--field-bg);
199
197
 
200
- --field-bg: var(--color-surface);
198
+ --field-bg: var(--color-canvas);
201
199
  }
202
200
 
203
201
  @media (prefers-reduced-motion: reduce) {
@@ -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/Drawer-DTKZptua.cjs"),r=require("../../chunks/mergeRefs-CZ-SArlE.cjs"),i=require("../../chunks/overlayLayer-seJG-EFn.cjs"),a=require("../../chunks/dialogLabel-2HRYMHbF.cjs"),o=require("../../chunks/useIsomorphicLayoutEffect-XM4Ot6x5.cjs"),s=require("../../chunks/observeElementWidth-BCJM2FAw.cjs");let c=require("react"),l=require("react-dom"),u=require("react/jsx-runtime");var d=360,f=600,p=900;function ee(e){return e<d?`tight`:e<f?`compact`:e<p?`narrow`:`wide`}var m={clean:`No changes`,dirty:`Unsaved changes`,saving:`Saving…`,saved:`Saved`,error:`Couldn't save`,offline:`Offline · kept in this tab`},h={clean:void 0,dirty:void 0,saving:`spinner`,saved:`check`,error:`alert-triangle`,offline:`clock`},g=new Set([`clean`,`dirty`]);function _(e){return typeof e==`string`?e.trim()!==``:e!=null&&typeof e!=`boolean`}function te({saveState:t,savedAgo:n,statusLabel:r}){let i=h[t],a=g.has(t)&&_(r)?r:void 0;return(0,u.jsxs)(`div`,{className:`ds-edit-layout__status`,"data-state":t,role:`status`,"aria-live":`polite`,children:[i&&(0,u.jsx)(e.t,{name:i,className:t===`saving`?`ds-icon--spin`:void 0}),t===`dirty`&&(0,u.jsx)(`span`,{className:`ds-edit-layout__dirty`,"aria-hidden":`true`}),(0,u.jsxs)(`span`,{title:typeof a==`string`?a:void 0,children:[a??m[t],t===`saved`&&n?(0,u.jsxs)(u.Fragment,{children:[` `,n]}):null]})]})}function v({text:e,bodyRef:n,onKeepEditing:r}){let i=(0,c.useRef)(null),a=(0,c.useRef)(null);return(0,c.useEffect)(()=>{a.current=document.activeElement;let e=requestAnimationFrame(()=>i.current?.focus({preventScroll:!0}));return()=>cancelAnimationFrame(e)},[]),(0,u.jsxs)(`div`,{className:`ds-edit-layout__confirmation`,children:[(0,u.jsx)(`strong`,{children:e}),(0,u.jsx)(t.Button,{ref:i,size:`xs`,onClick:()=>{r?.(),requestAnimationFrame(()=>{(a.current?.isConnected?a.current:n.current?.querySelector(`input, textarea, button, [contenteditable='true']`))?.focus({preventScroll:!0})})},children:`Keep editing`})]})}function y({backLabel:e,onBack:n,compact:r,status:i,actions:a,confirmLeave:o,confirmation:s,onLeave:c,detailsToggle:l}){return(0,u.jsxs)(`header`,{className:`ds-edit-layout__bar`,children:[(0,u.jsx)(t.Button,{variant:`simple`,size:`sm`,iconStart:`arrow-left`,isIconOnly:r,"aria-label":`Back to ${e}`,onClick:n,children:e}),o?s:i,(0,u.jsxs)(`div`,{className:`ds-edit-layout__actions`,children:[o?(0,u.jsx)(t.Button,{variant:`danger`,size:`sm`,onClick:c,children:`Leave anyway`}):a,r&&l]})]})}function b({label:e,detailsId:n,expanded:r,opensSheet:i,sheetOpen:a,toggleRef:o,contentRef:s,collapsed:c,onToggle:l}){return(0,u.jsxs)(`aside`,{className:`ds-edit-layout__rail ds-field-surface`,"aria-label":e,children:[(0,u.jsxs)(`header`,{className:`ds-edit-layout__rail-head`,children:[r&&(0,u.jsx)(`span`,{children:e}),(0,u.jsx)(t.Button,{ref:o,variant:`simple`,size:`sm`,isIconOnly:!0,iconStart:r?`chevrons-right`:`chevrons-left`,className:`ds-edit-layout__toggle`,"aria-label":`${r?`Collapse`:`Expand`} ${e}`,"aria-expanded":r||a,"aria-controls":n,"aria-haspopup":i?`dialog`:void 0,onClick:l})]}),r?(0,u.jsx)(`div`,{id:n,ref:s,className:`ds-edit-layout__rail-content`}):(0,u.jsx)(`div`,{className:`ds-edit-layout__rail-icons`,children:c?c(l):(0,u.jsx)(t.Button,{variant:`simple`,size:`sm`,isIconOnly:!0,iconStart:`info`,"aria-label":`Show ${e}`,onClick:l})})]})}var x=(0,c.forwardRef)(function({backLabel:e,onBack:d,saveState:f=`clean`,statusLabel:p,savedAgo:m,actions:h,rail:g,railCollapsed:_,railLabel:x=`Details`,railOpen:S,defaultRailOpen:C=!0,onRailToggle:w,confirmLeave:T=!1,confirmText:E=`Leave without saving?`,onKeepEditing:D,onLeave:ne,children:O,className:k,onFocus:A,...j},M){let N=(0,c.useRef)(null),P=(0,c.useMemo)(()=>r.t(N,M),[M]),F=(0,c.useRef)(null),I=(0,c.useRef)(null),L=(0,c.useRef)(null),R=(0,c.useRef)(null),z=(0,c.useRef)(null),[B]=(0,c.useState)(()=>a.i(`ds-edit-layout__rail-host`)),[V,H]=(0,c.useState)(`wide`),[U,W]=(0,c.useState)(C),[G,K]=(0,c.useState)(!1),[q,J]=(0,c.useState)(!1),Y=(0,c.useId)(),X=V===`tight`||V===`compact`,Z=V!==`wide`,Q=!Z&&(S??U);G&&(T||!Z)&&K(!1),o.t(()=>{let e;return s.t(N.current,t=>{let n=ee(t);n!==e&&(e=n,J(!1),H(n))})},[]),o.t(()=>{B&&a.a(B,L.current??R.current,z.current)}),(0,c.useEffect)(()=>{let e=z.current;e&&i.d(e)&&i.d(document.activeElement)&&I.current?.focus({preventScroll:!0})},[V,Q,G]);let $=()=>{Z?K(!0):(J(!0),W(!Q),w?.(!Q))},re=typeof g==`function`?g(()=>(0,l.flushSync)(()=>K(!1))):g;return(0,u.jsxs)(`div`,{...j,ref:P,className:[`ds-edit-layout`,k].filter(Boolean).join(` `),"data-compact":X||void 0,"data-tight":V===`tight`||void 0,"data-expanded":Q||void 0,"data-animate":q||void 0,onFocus:e=>{z.current=e.target,A?.(e)},children:[(0,u.jsxs)(`div`,{className:`ds-edit-layout__main`,children:[(0,u.jsx)(y,{backLabel:e,onBack:d,compact:X,status:(0,u.jsx)(te,{saveState:f,statusLabel:p,savedAgo:m}),actions:h,confirmLeave:T,confirmation:(0,u.jsx)(v,{text:E,bodyRef:F,onKeepEditing:D}),onLeave:ne,detailsToggle:(0,u.jsx)(t.Button,{ref:I,variant:`simple`,size:`sm`,isIconOnly:!0,iconStart:`info`,"aria-label":x,"aria-haspopup":`dialog`,"aria-expanded":G,"aria-controls":Y,onClick:$})}),(0,u.jsx)(`div`,{ref:F,className:`ds-edit-layout__body`,children:(0,u.jsx)(`div`,{className:`ds-edit-layout__content`,children:O})})]}),!X&&(0,u.jsx)(b,{label:x,detailsId:Y,expanded:Q,opensSheet:Z,sheetOpen:G,toggleRef:I,contentRef:L,collapsed:_,onToggle:$}),(0,u.jsx)(n.t,{id:Z?Y:void 0,dir:j.dir,isOpen:G,onClose:()=>K(!1),side:`end`,size:`md`,title:x,closeLabel:`Close ${x}`,className:`ds-edit-layout__sheet`,children:Z&&(0,u.jsx)(`div`,{ref:R,className:`ds-edit-layout__rail-content`})}),B&&(0,l.createPortal)(re,B)]})});exports.EditLayout=x;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../chunks/Icon-CD3oeiNA.cjs"),t=require("../Button/index.cjs"),n=require("../../chunks/Drawer-DdIH9jpe.cjs"),r=require("../../chunks/mergeRefs-CZ-SArlE.cjs"),i=require("../../chunks/overlayLayer-iGhuAByk.cjs"),a=require("../../chunks/dialogLabel-_-MTckE_.cjs"),o=require("../../chunks/useIsomorphicLayoutEffect-XM4Ot6x5.cjs"),s=require("../../chunks/observeElementWidth-BCJM2FAw.cjs");let c=require("react"),l=require("react-dom"),u=require("react/jsx-runtime");var d=360,f=600,p=900;function ee(e){return e<d?`tight`:e<f?`compact`:e<p?`narrow`:`wide`}var m={clean:`No changes`,dirty:`Unsaved changes`,saving:`Saving…`,saved:`Saved`,error:`Couldn't save`,offline:`Offline · kept in this tab`},h={clean:void 0,dirty:void 0,saving:`spinner`,saved:`check`,error:`alert-triangle`,offline:`clock`},g=new Set([`clean`,`dirty`]);function _(e){return typeof e==`string`?e.trim()!==``:e!=null&&typeof e!=`boolean`}function te({saveState:t,savedAgo:n,statusLabel:r}){let i=h[t],a=g.has(t)&&_(r)?r:void 0;return(0,u.jsxs)(`div`,{className:`ds-edit-layout__status`,"data-state":t,role:`status`,"aria-live":`polite`,children:[i&&(0,u.jsx)(e.t,{name:i,className:t===`saving`?`ds-icon--spin`:void 0}),t===`dirty`&&(0,u.jsx)(`span`,{className:`ds-edit-layout__dirty`,"aria-hidden":`true`}),(0,u.jsxs)(`span`,{title:typeof a==`string`?a:void 0,children:[a??m[t],t===`saved`&&n?(0,u.jsxs)(u.Fragment,{children:[` `,n]}):null]})]})}function v({text:e,bodyRef:n,onKeepEditing:r}){let i=(0,c.useRef)(null),a=(0,c.useRef)(null);return(0,c.useEffect)(()=>{a.current=document.activeElement;let e=requestAnimationFrame(()=>i.current?.focus({preventScroll:!0}));return()=>cancelAnimationFrame(e)},[]),(0,u.jsxs)(`div`,{className:`ds-edit-layout__confirmation`,children:[(0,u.jsx)(`strong`,{children:e}),(0,u.jsx)(t.Button,{ref:i,size:`xs`,onClick:()=>{r?.(),requestAnimationFrame(()=>{(a.current?.isConnected?a.current:n.current?.querySelector(`input, textarea, button, [contenteditable='true']`))?.focus({preventScroll:!0})})},children:`Keep editing`})]})}function y({backLabel:e,onBack:n,compact:r,status:i,actions:a,confirmLeave:o,confirmation:s,onLeave:c,detailsToggle:l}){return(0,u.jsxs)(`header`,{className:`ds-edit-layout__bar`,children:[(0,u.jsx)(t.Button,{variant:`simple`,size:`sm`,iconStart:`arrow-left`,isIconOnly:r,"aria-label":`Back to ${e}`,onClick:n,children:e}),o?s:i,(0,u.jsxs)(`div`,{className:`ds-edit-layout__actions`,children:[o?(0,u.jsx)(t.Button,{variant:`danger`,size:`sm`,onClick:c,children:`Leave anyway`}):a,r&&l]})]})}function b({label:e,detailsId:n,expanded:r,opensSheet:i,sheetOpen:a,toggleRef:o,contentRef:s,collapsed:c,onToggle:l}){return(0,u.jsxs)(`aside`,{className:`ds-edit-layout__rail ds-field-surface`,"aria-label":e,children:[(0,u.jsxs)(`header`,{className:`ds-edit-layout__rail-head`,children:[r&&(0,u.jsx)(`span`,{children:e}),(0,u.jsx)(t.Button,{ref:o,variant:`simple`,size:`sm`,isIconOnly:!0,iconStart:r?`chevrons-right`:`chevrons-left`,className:`ds-edit-layout__toggle`,"aria-label":`${r?`Collapse`:`Expand`} ${e}`,"aria-expanded":r||a,"aria-controls":n,"aria-haspopup":i?`dialog`:void 0,onClick:l})]}),r?(0,u.jsx)(`div`,{id:n,ref:s,className:`ds-edit-layout__rail-content`}):(0,u.jsx)(`div`,{className:`ds-edit-layout__rail-icons`,children:c?c(l):(0,u.jsx)(t.Button,{variant:`simple`,size:`sm`,isIconOnly:!0,iconStart:`info`,"aria-label":`Show ${e}`,onClick:l})})]})}var x=(0,c.forwardRef)(function({backLabel:e,onBack:d,saveState:f=`clean`,statusLabel:p,savedAgo:m,actions:h,rail:g,railCollapsed:_,railLabel:x=`Details`,railOpen:S,defaultRailOpen:C=!0,onRailToggle:w,confirmLeave:T=!1,confirmText:E=`Leave without saving?`,onKeepEditing:D,onLeave:ne,children:O,className:k,onFocus:A,...j},M){let N=(0,c.useRef)(null),P=(0,c.useMemo)(()=>r.t(N,M),[M]),F=(0,c.useRef)(null),I=(0,c.useRef)(null),L=(0,c.useRef)(null),R=(0,c.useRef)(null),z=(0,c.useRef)(null),[B]=(0,c.useState)(()=>a.i(`ds-edit-layout__rail-host`)),[V,H]=(0,c.useState)(`wide`),[U,W]=(0,c.useState)(C),[G,K]=(0,c.useState)(!1),[q,J]=(0,c.useState)(!1),Y=(0,c.useId)(),X=V===`tight`||V===`compact`,Z=V!==`wide`,Q=!Z&&(S??U);G&&(T||!Z)&&K(!1),o.t(()=>{let e;return s.t(N.current,t=>{let n=ee(t);n!==e&&(e=n,J(!1),H(n))})},[]),o.t(()=>{B&&a.a(B,L.current??R.current,z.current)}),(0,c.useEffect)(()=>{let e=z.current;e&&i.d(e)&&i.d(document.activeElement)&&I.current?.focus({preventScroll:!0})},[V,Q,G]);let $=()=>{Z?K(!0):(J(!0),W(!Q),w?.(!Q))},re=typeof g==`function`?g(()=>(0,l.flushSync)(()=>K(!1))):g;return(0,u.jsxs)(`div`,{...j,ref:P,className:[`ds-edit-layout`,k].filter(Boolean).join(` `),"data-compact":X||void 0,"data-tight":V===`tight`||void 0,"data-expanded":Q||void 0,"data-animate":q||void 0,onFocus:e=>{z.current=e.target,A?.(e)},children:[(0,u.jsxs)(`div`,{className:`ds-edit-layout__main`,children:[(0,u.jsx)(y,{backLabel:e,onBack:d,compact:X,status:(0,u.jsx)(te,{saveState:f,statusLabel:p,savedAgo:m}),actions:h,confirmLeave:T,confirmation:(0,u.jsx)(v,{text:E,bodyRef:F,onKeepEditing:D}),onLeave:ne,detailsToggle:(0,u.jsx)(t.Button,{ref:I,variant:`simple`,size:`sm`,isIconOnly:!0,iconStart:`info`,"aria-label":x,"aria-haspopup":`dialog`,"aria-expanded":G,"aria-controls":Y,onClick:$})}),(0,u.jsx)(`div`,{ref:F,className:`ds-edit-layout__body`,children:(0,u.jsx)(`div`,{className:`ds-edit-layout__content`,children:O})})]}),!X&&(0,u.jsx)(b,{label:x,detailsId:Y,expanded:Q,opensSheet:Z,sheetOpen:G,toggleRef:I,contentRef:L,collapsed:_,onToggle:$}),(0,u.jsx)(n.t,{id:Z?Y:void 0,dir:j.dir,isOpen:G,onClose:()=>K(!1),side:`end`,size:`md`,title:x,closeLabel:`Close ${x}`,className:`ds-edit-layout__sheet`,children:Z&&(0,u.jsx)(`div`,{ref:R,className:`ds-edit-layout__rail-content`})}),B&&(0,l.createPortal)(re,B)]})});exports.EditLayout=x;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1,9 +1,9 @@
1
1
  import { t as e } from "../../chunks/Icon-CYXOo0Kt.js";
2
2
  import { Button as t } from "../Button/index.js";
3
- import { t as n } from "../../chunks/Drawer-C3mWT9Kh.js";
3
+ import { t as n } from "../../chunks/Drawer-Ck5XKT_V.js";
4
4
  import { t as r } from "../../chunks/mergeRefs-C6_5pADN.js";
5
- import { d as i } from "../../chunks/overlayLayer-IuoPVwTO.js";
6
- import { a, i as o } from "../../chunks/dialogLabel-D18maX-p.js";
5
+ import { d as i } from "../../chunks/overlayLayer-lU4iWSjO.js";
6
+ import { a, i as o } from "../../chunks/dialogLabel-DT7rCr3_.js";
7
7
  import { t as s } from "../../chunks/useIsomorphicLayoutEffect-Bc9hxFMc.js";
8
8
  import { t as c } from "../../chunks/observeElementWidth-BlQOlW2t.js";
9
9
  import { forwardRef as l, useEffect as u, useId as ee, useMemo as te, useRef as d, useState as f } from "react";
@@ -225,15 +225,9 @@
225
225
  padding-block: var(--space-3);
226
226
  }
227
227
 
228
- /* Drawer sizes side panels from --drawer-width, so set it rather than
229
- * racing its selector. The sheet matches the rail: the same band ground,
230
- * and surface cards, since the same details content moves between them. */
228
+ /* The same details content moves from the rail into a canvas-ground Drawer. */
231
229
  .ds-edit-layout__sheet.ds-drawer {
232
230
  --drawer-width: min(var(--sidenav-width), 88%);
233
- --field-bg: var(--fill-band);
234
- --fill-card: var(--color-surface);
235
-
236
- background: var(--field-bg);
237
231
 
238
232
  .ds-drawer__body {
239
233
  display: flex;
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../chunks/EntryPicker-CgWbgWnc.cjs");exports.EntryPicker=e.t;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../chunks/EntryPicker-CCCoJxbd.cjs");exports.EntryPicker=e.t;
@@ -1 +1 @@
1
- export { t as EntryPicker } from "../../chunks/EntryPicker-DlEsVCvA.js";
1
+ export { t as EntryPicker } from "../../chunks/EntryPicker-DLCP4S-q.js";
@@ -67,7 +67,9 @@
67
67
  overflow: hidden;
68
68
  border: 0;
69
69
  border-radius: var(--field-radius);
70
- background: var(--color-surface-subtle);
70
+
71
+ /* Steps from the row, result or storyblock it sits in, hovered or not. */
72
+ background: var(--fill-control);
71
73
  color: var(--color-text-muted);
72
74
  }
73
75
 
@@ -24,7 +24,7 @@
24
24
 
25
25
  /* Hover is the weakest step: focus and validity fills outrank it, so an
26
26
  * invalid field keeps its danger fill under the pointer. */
27
- .ds-field-skin:where(:hover:not(:disabled):not([readonly])) {
27
+ .ds-field-skin:where(:hover:not(:disabled, [readonly], [data-disabled])) {
28
28
  background: var(--field-hover);
29
29
  }
30
30
 
@@ -583,22 +583,19 @@ picker items before interacting with asset/reference examples.
583
583
  only pure helpers, without rendering or locale formatting.
584
584
  - An optional radio group stored as `""` has no selection and shows no clear action.
585
585
 
586
- Plain `hr` elements retain separator semantics and vertical spacing without a
587
- painted rule; a rule written in a rich-text field paints a visible bar and shows
588
- the focus outline when selected. FormEditor dividers span the grid and use its
589
- gap instead of margins.
590
- Shared fields use borderless fills and solid unchecked indicators. Invalid
591
- fields use a danger fill and error text without a rail or extra padding, and
592
- keep that fill under the pointer. The editor, selection cards and picker rows
593
- are rail-free too; only standalone AssetCard tiles and Table rows retain
594
- selection rails. Card-appearance choices, picker items and the rich-text
595
- editor rest on `--fill-card`, so they keep their shapes on the canvas and in a
596
- Modal, Drawer or TableFrame; a custom surface-coloured host sets
597
- `--fill-card: var(--fill-row-alt)`. Tags chips step from the tags field's
598
- current fill. A checked card in an invalid card-appearance choice keeps a
599
- selected fill under the danger tint. Field values,
600
- schemas, validation and adapters are unchanged. See the packaged UPGRADING.md
601
- for removed styling APIs.
586
+ Plain `hr` elements and FormEditor dividers paint a 1px `--color-rule`.
587
+ FormEditor dividers span the grid and use compact block margins with the form’s gap.
588
+ A rule written in a rich-text field uses the same token at 2px and shows a focus
589
+ outline when selected.
590
+
591
+ The page, Drawer and Modal use the same `--color-canvas` ground, so field fills
592
+ match across them. Text controls, unchecked indicators, selection cards and the
593
+ rich text editor use the shared `--field-rest` fill. Invalid fields use a danger
594
+ tint and retain their error text. A checked invalid selection card derives its
595
+ danger tint from its selected fill. Tags chips paint canvas. Picker rows stay on
596
+ `--fill-card`, which defaults to `--color-surface`. A custom surface-coloured
597
+ host for those rows can set `--fill-card: var(--fill-row-alt)`, as TableFrame does.
598
+ See the packaged UPGRADING.md for removed styling APIs.
602
599
 
603
600
  ## Architecture and extension checklist for agents
604
601
 
@@ -772,23 +769,19 @@ serializer without changing the saved parent document.
772
769
  Blocks are atomic, draggable and selectable. Insert follows the cursor's top-level
773
770
  block; replacement stays within the same kind and retains alignment. Left and
774
771
  right blocks occupy 62% of the writing width and let text wrap around them. Below
775
- 32rem they use the full writing width. Each editable block has a title bar with
776
- alignment, Replace, Edit and Remove; drag the grip and kind label to move it. The
777
- bar wraps its actions in a narrow block. Each action's accessible name includes
778
- the item's title, such as `Remove The corner bookshop` in a `Block actions for The
779
- corner bookshop` toolbar, or `Unavailable entry` for a missing item. Pressing an
780
- action keeps focus where the writer is; Remove returns focus to the editor where
781
- the block was. Only the selected block's bar is in the tab order, as one stop:
782
- select a block with the arrow keys, press Tab, then move between its actions with
783
- the arrow keys, Home and End. Pass `tone: "draft"` and publication guidance in the
784
- picker item's `metadata` to show the draft treatment and the application's note.
785
- Selection adds the focus outline and highlights the bar, except that a missing
786
- block keeps its danger bar. A missing item uses a danger fill and hides Edit. Storyblocks have no start rail
787
- in any state. Selected alignment and formatting controls use the shared primary
788
- Button variant. A
789
- read-only block shows its kind and body, never as selected. Remove deletes the
790
- block only. Enter and gap-cursor editing let writers continue after a final block.
791
- Selecting it never appends content.
772
+ 32rem they use the full writing width. Drag the grip and kind label to move a
773
+ block. Select a block with the arrow keys in the editor and press Tab to reach its
774
+ `Block actions for {item title}` button. Opening it focuses the current
775
+ alignment. Tab moves through the dialog and Escape returns focus to the trigger.
776
+ Alignment changes keep the dialog open. Edit, Replace and Remove close it. Remove
777
+ deletes the block from the document and returns the caret to that position.
778
+
779
+ Pass `tone: "draft"` and publication guidance in the picker item’s `metadata`
780
+ to show the draft treatment and note. Selection adds a focus outline and
781
+ highlights the bar. A missing block retains its danger bar and offers
782
+ “Choose another entry…” or “Choose another asset…” when replacement is available.
783
+ A read-only block shows its kind and body. Enter and gap-cursor editing let
784
+ writers continue after a final block. Selecting a block leaves the document intact.
792
785
 
793
786
  A block alone satisfies required rich text. Syntax errors are rejected by both
794
787
  RichTextEditor and FormEditor validation. Resolved row data is never serialized;
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require("../Field/index.cjs"),require("../Container/index.cjs");const e=require("../../chunks/FormEditor-iACd0El-.cjs");exports.FormEditor=e.t,exports.validateFormValues=e.n;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require("../Field/index.cjs"),require("../Container/index.cjs");const e=require("../../chunks/FormEditor-ArvjKtJJ.cjs");exports.FormEditor=e.t,exports.validateFormValues=e.n;
@@ -1,3 +1,3 @@
1
1
  import "../Field/index.js";
2
2
  import "../Container/index.js";
3
- export { t as FormEditor, n as validateFormValues } from "../../chunks/FormEditor-CLLOHKiO.js";
3
+ export { t as FormEditor, n as validateFormValues } from "../../chunks/FormEditor-DnNBv9Xf.js";
@@ -34,6 +34,7 @@
34
34
 
35
35
  .ds-form-editor__divider {
36
36
  grid-column: 1 / -1;
37
+ margin-block: var(--space-2);
37
38
  inline-size: 100%;
38
39
  }
39
40
 
@@ -43,7 +43,7 @@
43
43
  inline-size: var(--limit-reading-ring-size);
44
44
  block-size: var(--limit-reading-ring-size);
45
45
  fill: none;
46
- stroke: var(--color-border);
46
+ stroke: var(--color-rule);
47
47
  stroke-width: 2.5;
48
48
  transform: rotate(-90deg);
49
49
  }