@burojs/ui-shadcn 0.4.0 → 0.5.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 (137) hide show
  1. package/README.md +22 -5
  2. package/dist/bulk-summary-CwSd6Yjb.cjs +108 -0
  3. package/dist/bulk-summary-CwSd6Yjb.cjs.map +1 -0
  4. package/dist/bulk-summary-GxMDP4bw.js +108 -0
  5. package/dist/bulk-summary-GxMDP4bw.js.map +1 -0
  6. package/dist/button-BxnnE28H.cjs +55 -0
  7. package/dist/button-BxnnE28H.cjs.map +1 -0
  8. package/dist/button-MWVeZaqj.js +44 -0
  9. package/dist/button-MWVeZaqj.js.map +1 -0
  10. package/dist/candidates-gate-CX2PBu6l.js +63 -0
  11. package/dist/candidates-gate-CX2PBu6l.js.map +1 -0
  12. package/dist/candidates-gate-DiFI52r7.cjs +70 -0
  13. package/dist/candidates-gate-DiFI52r7.cjs.map +1 -0
  14. package/dist/candidates-relation-picker-CBsVcnPR.js +82 -0
  15. package/dist/candidates-relation-picker-CBsVcnPR.js.map +1 -0
  16. package/dist/candidates-relation-picker-Dd_GVLlu.cjs +84 -0
  17. package/dist/candidates-relation-picker-Dd_GVLlu.cjs.map +1 -0
  18. package/dist/check-confirm-dialog-BRByTFpg.cjs +1534 -0
  19. package/dist/check-confirm-dialog-BRByTFpg.cjs.map +1 -0
  20. package/dist/check-confirm-dialog-CkaVTPT9.js +1232 -0
  21. package/dist/check-confirm-dialog-CkaVTPT9.js.map +1 -0
  22. package/dist/dialog-B_rt9S1c.js +63 -0
  23. package/dist/dialog-B_rt9S1c.js.map +1 -0
  24. package/dist/dialog-DRNUq9EA.cjs +112 -0
  25. package/dist/dialog-DRNUq9EA.cjs.map +1 -0
  26. package/dist/filter-builder-B3mZFL-K.cjs +1761 -0
  27. package/dist/filter-builder-B3mZFL-K.cjs.map +1 -0
  28. package/dist/filter-builder-DOnaXNfP.js +1605 -0
  29. package/dist/filter-builder-DOnaXNfP.js.map +1 -0
  30. package/dist/flow-runtime-B6zOHYqI.cjs +255 -0
  31. package/dist/flow-runtime-B6zOHYqI.cjs.map +1 -0
  32. package/dist/flow-runtime-D8h99FSg.js +252 -0
  33. package/dist/flow-runtime-D8h99FSg.js.map +1 -0
  34. package/dist/flow-screen-CX05b3G9.cjs +705 -0
  35. package/dist/flow-screen-CX05b3G9.cjs.map +1 -0
  36. package/dist/flow-screen-CmbARSqg.js +701 -0
  37. package/dist/flow-screen-CmbARSqg.js.map +1 -0
  38. package/dist/index.cjs +2825 -11912
  39. package/dist/index.cjs.map +1 -1
  40. package/dist/index.d.cts +1612 -1862
  41. package/dist/index.d.ts +1700 -1950
  42. package/dist/index.js +2498 -11605
  43. package/dist/index.js.map +1 -1
  44. package/dist/inline-flow-host-B7U1OJUe.cjs +112 -0
  45. package/dist/inline-flow-host-B7U1OJUe.cjs.map +1 -0
  46. package/dist/inline-flow-host-C3H2UpSA.js +112 -0
  47. package/dist/inline-flow-host-C3H2UpSA.js.map +1 -0
  48. package/dist/input-BI0czGyI.cjs +23 -0
  49. package/dist/input-BI0czGyI.cjs.map +1 -0
  50. package/dist/input-CUPStzZO.js +17 -0
  51. package/dist/input-CUPStzZO.js.map +1 -0
  52. package/dist/label-66W1qbke.js +29 -0
  53. package/dist/label-66W1qbke.js.map +1 -0
  54. package/dist/label-w6JYf2cF.cjs +36 -0
  55. package/dist/label-w6JYf2cF.cjs.map +1 -0
  56. package/dist/lazy-relation-picker-dialog-2oxnA6IR.js +14 -0
  57. package/dist/lazy-relation-picker-dialog-2oxnA6IR.js.map +1 -0
  58. package/dist/lazy-relation-picker-dialog-BfAGKzUG.cjs +19 -0
  59. package/dist/lazy-relation-picker-dialog-BfAGKzUG.cjs.map +1 -0
  60. package/dist/markdown/index.cjs +1 -1
  61. package/dist/markdown/index.js +1 -1
  62. package/dist/page-flow-route-CQ7HsbBm.cjs +277 -0
  63. package/dist/page-flow-route-CQ7HsbBm.cjs.map +1 -0
  64. package/dist/page-flow-route-CyXSvXSE.js +277 -0
  65. package/dist/page-flow-route-CyXSvXSE.js.map +1 -0
  66. package/dist/peek-filter-CnqHwTMU.cjs +51 -0
  67. package/dist/peek-filter-CnqHwTMU.cjs.map +1 -0
  68. package/dist/peek-filter-ErLfO153.js +28 -0
  69. package/dist/peek-filter-ErLfO153.js.map +1 -0
  70. package/dist/place-node--GdsP688.js +7315 -0
  71. package/dist/place-node--GdsP688.js.map +1 -0
  72. package/dist/place-node-SIp4XYQH.cjs +7833 -0
  73. package/dist/place-node-SIp4XYQH.cjs.map +1 -0
  74. package/dist/related-list-cards-B6x9HQQp.js +42 -0
  75. package/dist/related-list-cards-B6x9HQQp.js.map +1 -0
  76. package/dist/related-list-cards-nxuODlIA.cjs +42 -0
  77. package/dist/related-list-cards-nxuODlIA.cjs.map +1 -0
  78. package/dist/related-list-timeline-BYJKEbmA.cjs +142 -0
  79. package/dist/related-list-timeline-BYJKEbmA.cjs.map +1 -0
  80. package/dist/related-list-timeline-DEdfd-rr.js +142 -0
  81. package/dist/related-list-timeline-DEdfd-rr.js.map +1 -0
  82. package/dist/related-rows-B4levHcR.js +186 -0
  83. package/dist/related-rows-B4levHcR.js.map +1 -0
  84. package/dist/related-rows-zh5f_4QR.cjs +209 -0
  85. package/dist/related-rows-zh5f_4QR.cjs.map +1 -0
  86. package/dist/relation-create-BOaUe12G.cjs +362 -0
  87. package/dist/relation-create-BOaUe12G.cjs.map +1 -0
  88. package/dist/relation-create-Bg-eEJLs.js +337 -0
  89. package/dist/relation-create-Bg-eEJLs.js.map +1 -0
  90. package/dist/relation-many-picker-B-NCEUgX.cjs +465 -0
  91. package/dist/relation-many-picker-B-NCEUgX.cjs.map +1 -0
  92. package/dist/relation-many-picker-gdAOD-qK.js +464 -0
  93. package/dist/relation-many-picker-gdAOD-qK.js.map +1 -0
  94. package/dist/relation-picker-BAY77ivO.js +462 -0
  95. package/dist/relation-picker-BAY77ivO.js.map +1 -0
  96. package/dist/relation-picker-Da_uhFvA.cjs +479 -0
  97. package/dist/relation-picker-Da_uhFvA.cjs.map +1 -0
  98. package/dist/relation-picker-dialog-M0pQaWlp.cjs +300 -0
  99. package/dist/relation-picker-dialog-M0pQaWlp.cjs.map +1 -0
  100. package/dist/relation-picker-dialog-hA9rYrZB.js +299 -0
  101. package/dist/relation-picker-dialog-hA9rYrZB.js.map +1 -0
  102. package/dist/resource-page-router-OSQyRA5b.cjs +1779 -0
  103. package/dist/resource-page-router-OSQyRA5b.cjs.map +1 -0
  104. package/dist/resource-page-router-T4vS5gbJ.js +1582 -0
  105. package/dist/resource-page-router-T4vS5gbJ.js.map +1 -0
  106. package/dist/{rich-text-IDFvyvRE.js → rich-text-DFerywgz.js} +7 -4
  107. package/dist/{rich-text-IDFvyvRE.js.map → rich-text-DFerywgz.js.map} +1 -1
  108. package/dist/{rich-text-lndbYqzR.cjs → rich-text-vTyVjDoa.cjs} +25 -22
  109. package/dist/{rich-text-lndbYqzR.cjs.map → rich-text-vTyVjDoa.cjs.map} +1 -1
  110. package/dist/search-access-B7G5oR8n.cjs +812 -0
  111. package/dist/search-access-B7G5oR8n.cjs.map +1 -0
  112. package/dist/search-access-CURsWn-U.js +669 -0
  113. package/dist/search-access-CURsWn-U.js.map +1 -0
  114. package/dist/shell-BPlk8hEa.js +205 -0
  115. package/dist/shell-BPlk8hEa.js.map +1 -0
  116. package/dist/shell-DxhlsPwm.cjs +271 -0
  117. package/dist/shell-DxhlsPwm.cjs.map +1 -0
  118. package/dist/skeleton-U2noefj5.js +13 -0
  119. package/dist/skeleton-U2noefj5.js.map +1 -0
  120. package/dist/skeleton-_1gP7wan.cjs +18 -0
  121. package/dist/skeleton-_1gP7wan.cjs.map +1 -0
  122. package/dist/styles.css +241 -9
  123. package/dist/toaster-C7CiYA4Z.cjs +248 -0
  124. package/dist/toaster-C7CiYA4Z.cjs.map +1 -0
  125. package/dist/toaster-CfCRLgR-.js +164 -0
  126. package/dist/toaster-CfCRLgR-.js.map +1 -0
  127. package/dist/use-dialog-filter-state-BBCC0OEK.cjs +92 -0
  128. package/dist/use-dialog-filter-state-BBCC0OEK.cjs.map +1 -0
  129. package/dist/use-dialog-filter-state-BDcgS5Oz.js +87 -0
  130. package/dist/use-dialog-filter-state-BDcgS5Oz.js.map +1 -0
  131. package/dist/{use-theme-BwPWinB2.cjs → use-theme-DFlpXils.cjs} +12 -1
  132. package/dist/use-theme-DFlpXils.cjs.map +1 -0
  133. package/dist/{use-theme-IHmtrhEt.js → use-theme-dnE3Od3I.js} +7 -2
  134. package/dist/use-theme-dnE3Od3I.js.map +1 -0
  135. package/package.json +16 -14
  136. package/dist/use-theme-BwPWinB2.cjs.map +0 -1
  137. package/dist/use-theme-IHmtrhEt.js.map +0 -1
@@ -0,0 +1,271 @@
1
+ const require_use_theme = require("./use-theme-DFlpXils.cjs");
2
+ const require_dialog = require("./dialog-DRNUq9EA.cjs");
3
+ let _burojs_react = require("@burojs/react");
4
+ let _tabler_icons_react = require("@tabler/icons-react");
5
+ let react = require("react");
6
+ react = require_use_theme.__toESM(react, 1);
7
+ let react_jsx_runtime = require("react/jsx-runtime");
8
+ let class_variance_authority = require("class-variance-authority");
9
+ let _radix_ui_react_dialog = require("@radix-ui/react-dialog");
10
+ _radix_ui_react_dialog = require_use_theme.__toESM(_radix_ui_react_dialog, 1);
11
+ //#region src/primitives/sheet.tsx
12
+ const Sheet = _radix_ui_react_dialog.Root;
13
+ const SheetTrigger = _radix_ui_react_dialog.Trigger;
14
+ const SheetClose = _radix_ui_react_dialog.Close;
15
+ const SheetPortal = _radix_ui_react_dialog.Portal;
16
+ const SheetOverlay = react.forwardRef(({ className, ...props }, ref) => (0, react_jsx_runtime.jsx)(_radix_ui_react_dialog.Overlay, {
17
+ className: require_use_theme.cn("fixed inset-0 z-50 bg-overlay/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 duration-[var(--duration-panel)] ease-[var(--ease-overlay)]", className),
18
+ ...props,
19
+ ref
20
+ }));
21
+ SheetOverlay.displayName = _radix_ui_react_dialog.Overlay.displayName;
22
+ const sheetVariants = (0, class_variance_authority.cva)("fixed z-50 gap-4 bg-background text-foreground p-6 shadow-lg duration-[var(--duration-panel)] ease-[var(--ease-overlay)] data-[state=open]:animate-in data-[state=closed]:animate-out", {
23
+ variants: { side: {
24
+ top: "inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",
25
+ bottom: "inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",
26
+ left: "inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",
27
+ right: "inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"
28
+ } },
29
+ defaultVariants: { side: "right" }
30
+ });
31
+ const SheetContent = react.forwardRef(({ side = "right", className, children, showClose = true, ...props }, ref) => {
32
+ const t = (0, _burojs_react.useOptionalT)();
33
+ return (0, react_jsx_runtime.jsxs)(SheetPortal, { children: [(0, react_jsx_runtime.jsx)(SheetOverlay, {}), (0, react_jsx_runtime.jsxs)(_radix_ui_react_dialog.Content, {
34
+ ref,
35
+ className: require_use_theme.cn(sheetVariants({ side }), className),
36
+ ...props,
37
+ children: [children, showClose && (0, react_jsx_runtime.jsxs)(_radix_ui_react_dialog.Close, {
38
+ className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",
39
+ children: [(0, react_jsx_runtime.jsx)(_tabler_icons_react.IconX, { className: "h-4 w-4" }), (0, react_jsx_runtime.jsx)("span", {
40
+ className: "sr-only",
41
+ children: t("actions.close", { defaultValue: "Close" })
42
+ })]
43
+ })]
44
+ })] });
45
+ });
46
+ SheetContent.displayName = _radix_ui_react_dialog.Content.displayName;
47
+ function SheetHeader({ className, ...props }) {
48
+ return (0, react_jsx_runtime.jsx)("div", {
49
+ className: require_use_theme.cn("flex flex-col space-y-2 text-center sm:text-left", className),
50
+ ...props
51
+ });
52
+ }
53
+ SheetHeader.displayName = "SheetHeader";
54
+ function SheetFooter({ className, ...props }) {
55
+ return (0, react_jsx_runtime.jsx)("div", {
56
+ className: require_use_theme.cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className),
57
+ ...props
58
+ });
59
+ }
60
+ SheetFooter.displayName = "SheetFooter";
61
+ const SheetTitle = react.forwardRef(({ className, ...props }, ref) => (0, react_jsx_runtime.jsx)(_radix_ui_react_dialog.Title, {
62
+ ref,
63
+ className: require_use_theme.cn("text-lg font-semibold text-foreground", className),
64
+ ...props
65
+ }));
66
+ SheetTitle.displayName = _radix_ui_react_dialog.Title.displayName;
67
+ const SheetDescription = react.forwardRef(({ className, ...props }, ref) => (0, react_jsx_runtime.jsx)(_radix_ui_react_dialog.Description, {
68
+ ref,
69
+ className: require_use_theme.cn("text-sm text-muted-foreground", className),
70
+ ...props
71
+ }));
72
+ SheetDescription.displayName = _radix_ui_react_dialog.Description.displayName;
73
+ //#endregion
74
+ //#region src/ui-presentations/shell.tsx
75
+ const OwnTitleContext = (0, react.createContext)(false);
76
+ function focusOwnHeading(event) {
77
+ const container = event.currentTarget;
78
+ if (!(container instanceof HTMLElement)) return;
79
+ const heading = container.querySelector("[data-buro-overlay-heading]");
80
+ if (!(heading instanceof HTMLElement)) return;
81
+ event.preventDefault();
82
+ heading.focus();
83
+ }
84
+ function WrappedDialogContent({ wrapper, copy, children }) {
85
+ return wrapper ? (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [(0, react_jsx_runtime.jsxs)(require_dialog.DialogHeader, { children: [(0, react_jsx_runtime.jsx)(require_dialog.DialogTitle, { children: copy.title }), (0, react_jsx_runtime.jsx)(require_dialog.DialogDescription, {
86
+ className: copy.description === void 0 ? "sr-only" : void 0,
87
+ children: copy.description ?? ""
88
+ })] }), children] }) : (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
89
+ (0, react_jsx_runtime.jsx)(require_dialog.DialogTitle, {
90
+ className: "sr-only",
91
+ children: copy.title
92
+ }),
93
+ (0, react_jsx_runtime.jsx)(require_dialog.DialogDescription, {
94
+ className: "sr-only",
95
+ children: copy.description ?? ""
96
+ }),
97
+ children
98
+ ] });
99
+ }
100
+ function WrappedSheetContent({ wrapper, copy, children }) {
101
+ return wrapper ? (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [(0, react_jsx_runtime.jsxs)(SheetHeader, { children: [(0, react_jsx_runtime.jsx)(SheetTitle, { children: copy.title }), (0, react_jsx_runtime.jsx)(SheetDescription, {
102
+ className: copy.description === void 0 ? "sr-only" : void 0,
103
+ children: copy.description ?? ""
104
+ })] }), children] }) : (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
105
+ (0, react_jsx_runtime.jsx)(SheetTitle, {
106
+ className: "sr-only",
107
+ children: copy.title
108
+ }),
109
+ (0, react_jsx_runtime.jsx)(SheetDescription, {
110
+ className: "sr-only",
111
+ children: copy.description ?? ""
112
+ }),
113
+ children
114
+ ] });
115
+ }
116
+ function useFocusRestoration() {
117
+ const returnFocus = (0, react.useRef)(typeof document === "undefined" || !(document.activeElement instanceof HTMLElement) ? null : document.activeElement);
118
+ (0, react.useEffect)(() => () => {
119
+ const element = returnFocus.current;
120
+ queueMicrotask(() => {
121
+ if (element?.isConnected && element !== document.body) {
122
+ element.focus();
123
+ return;
124
+ }
125
+ const main = document.querySelector("main");
126
+ if (main === null) return;
127
+ if (!main.hasAttribute("tabindex")) main.setAttribute("tabindex", "-1");
128
+ main.focus();
129
+ });
130
+ }, []);
131
+ }
132
+ function keepForPopover(event) {
133
+ const target = event.target;
134
+ if (target instanceof Element && target.closest("[data-buro-popover]") !== null) event.preventDefault();
135
+ }
136
+ const REDUCED_MOTION = "motion-reduce:animate-none motion-reduce:transition-none";
137
+ function DialogPresentationShell({ dismiss, wrapper, copy, ownTitle = false, children }) {
138
+ useFocusRestoration();
139
+ return (0, react_jsx_runtime.jsx)(require_dialog.Dialog, {
140
+ open: true,
141
+ onOpenChange: (open) => {
142
+ if (!open) dismiss();
143
+ },
144
+ children: ownTitle ? (0, react_jsx_runtime.jsx)(require_dialog.DialogContent, {
145
+ className: `flex max-h-[85vh] flex-col ${REDUCED_MOTION}`,
146
+ overlayClassName: REDUCED_MOTION,
147
+ showClose: wrapper,
148
+ "aria-describedby": void 0,
149
+ "aria-modal": "true",
150
+ onOpenAutoFocus: focusOwnHeading,
151
+ onPointerDownOutside: keepForPopover,
152
+ children: (0, react_jsx_runtime.jsx)(OwnTitleContext.Provider, {
153
+ value: true,
154
+ children
155
+ })
156
+ }) : (0, react_jsx_runtime.jsx)(require_dialog.DialogContent, {
157
+ className: REDUCED_MOTION,
158
+ overlayClassName: REDUCED_MOTION,
159
+ showClose: wrapper,
160
+ "aria-modal": "true",
161
+ onPointerDownOutside: keepForPopover,
162
+ children: (0, react_jsx_runtime.jsx)(WrappedDialogContent, {
163
+ wrapper,
164
+ copy,
165
+ children
166
+ })
167
+ })
168
+ });
169
+ }
170
+ function SheetPresentationShell({ dismiss, wrapper, copy, ownTitle = false, children }) {
171
+ useFocusRestoration();
172
+ return (0, react_jsx_runtime.jsx)(Sheet, {
173
+ open: true,
174
+ onOpenChange: (open) => {
175
+ if (!open) dismiss();
176
+ },
177
+ children: ownTitle ? (0, react_jsx_runtime.jsx)(SheetContent, {
178
+ side: "right",
179
+ className: `flex flex-col sm:max-w-xl ${REDUCED_MOTION}`,
180
+ showClose: wrapper,
181
+ "aria-describedby": void 0,
182
+ "aria-modal": "true",
183
+ onOpenAutoFocus: focusOwnHeading,
184
+ onPointerDownOutside: keepForPopover,
185
+ children: (0, react_jsx_runtime.jsx)(OwnTitleContext.Provider, {
186
+ value: true,
187
+ children
188
+ })
189
+ }) : (0, react_jsx_runtime.jsx)(SheetContent, {
190
+ side: "right",
191
+ className: `sm:max-w-xl ${REDUCED_MOTION}`,
192
+ showClose: wrapper,
193
+ "aria-modal": "true",
194
+ onPointerDownOutside: keepForPopover,
195
+ children: (0, react_jsx_runtime.jsx)(WrappedSheetContent, {
196
+ wrapper,
197
+ copy,
198
+ children
199
+ })
200
+ })
201
+ });
202
+ }
203
+ //#endregion
204
+ Object.defineProperty(exports, "DialogPresentationShell", {
205
+ enumerable: true,
206
+ get: function() {
207
+ return DialogPresentationShell;
208
+ }
209
+ });
210
+ Object.defineProperty(exports, "OwnTitleContext", {
211
+ enumerable: true,
212
+ get: function() {
213
+ return OwnTitleContext;
214
+ }
215
+ });
216
+ Object.defineProperty(exports, "Sheet", {
217
+ enumerable: true,
218
+ get: function() {
219
+ return Sheet;
220
+ }
221
+ });
222
+ Object.defineProperty(exports, "SheetClose", {
223
+ enumerable: true,
224
+ get: function() {
225
+ return SheetClose;
226
+ }
227
+ });
228
+ Object.defineProperty(exports, "SheetContent", {
229
+ enumerable: true,
230
+ get: function() {
231
+ return SheetContent;
232
+ }
233
+ });
234
+ Object.defineProperty(exports, "SheetDescription", {
235
+ enumerable: true,
236
+ get: function() {
237
+ return SheetDescription;
238
+ }
239
+ });
240
+ Object.defineProperty(exports, "SheetFooter", {
241
+ enumerable: true,
242
+ get: function() {
243
+ return SheetFooter;
244
+ }
245
+ });
246
+ Object.defineProperty(exports, "SheetHeader", {
247
+ enumerable: true,
248
+ get: function() {
249
+ return SheetHeader;
250
+ }
251
+ });
252
+ Object.defineProperty(exports, "SheetPresentationShell", {
253
+ enumerable: true,
254
+ get: function() {
255
+ return SheetPresentationShell;
256
+ }
257
+ });
258
+ Object.defineProperty(exports, "SheetTitle", {
259
+ enumerable: true,
260
+ get: function() {
261
+ return SheetTitle;
262
+ }
263
+ });
264
+ Object.defineProperty(exports, "SheetTrigger", {
265
+ enumerable: true,
266
+ get: function() {
267
+ return SheetTrigger;
268
+ }
269
+ });
270
+
271
+ //# sourceMappingURL=shell-DxhlsPwm.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shell-DxhlsPwm.cjs","names":["SheetPrimitive","React","cn","cva","useOptionalT","IconX","createContext","DialogHeader","DialogTitle","DialogDescription","useRef","Dialog","DialogContent"],"sources":["../src/primitives/sheet.tsx","../src/ui-presentations/shell.tsx"],"sourcesContent":["'use client';\nimport { useOptionalT } from '@burojs/react';\n\nimport * as React from 'react';\nimport * as SheetPrimitive from '@radix-ui/react-dialog';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { IconX } from '@tabler/icons-react';\nimport { cn } from '../lib/cn.js';\n\nconst Sheet = SheetPrimitive.Root;\nconst SheetTrigger = SheetPrimitive.Trigger;\nconst SheetClose = SheetPrimitive.Close;\nconst SheetPortal = SheetPrimitive.Portal;\n\nexport type SheetOverlayProps = React.ComponentPropsWithoutRef<typeof SheetPrimitive.Overlay>;\n\nconst SheetOverlay = React.forwardRef<\n React.ElementRef<typeof SheetPrimitive.Overlay>,\n SheetOverlayProps\n>(({ className, ...props }, ref) => (\n <SheetPrimitive.Overlay\n className={cn(\n 'fixed inset-0 z-50 bg-overlay/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 duration-[var(--duration-panel)] ease-[var(--ease-overlay)]',\n className,\n )}\n {...props}\n ref={ref}\n />\n));\nSheetOverlay.displayName = SheetPrimitive.Overlay.displayName;\n\nconst sheetVariants = cva(\n 'fixed z-50 gap-4 bg-background text-foreground p-6 shadow-lg duration-[var(--duration-panel)] ease-[var(--ease-overlay)] data-[state=open]:animate-in data-[state=closed]:animate-out',\n {\n variants: {\n side: {\n top: 'inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top',\n bottom:\n 'inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom',\n left: 'inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm',\n right:\n 'inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm',\n },\n },\n defaultVariants: {\n side: 'right',\n },\n },\n);\n\nexport interface SheetContentProps\n extends React.ComponentPropsWithoutRef<typeof SheetPrimitive.Content>,\n VariantProps<typeof sheetVariants> {\n /** Whether the standard visual close button is rendered. Defaults to true. */\n showClose?: boolean;\n}\n\nconst SheetContent = React.forwardRef<\n React.ElementRef<typeof SheetPrimitive.Content>,\n SheetContentProps\n>(({ side = 'right', className, children, showClose = true, ...props }, ref) => {\n const t = useOptionalT();\n return (\n <SheetPortal>\n <SheetOverlay />\n <SheetPrimitive.Content\n ref={ref}\n className={cn(sheetVariants({ side }), className)}\n {...props}\n >\n {children}\n {showClose && (\n <SheetPrimitive.Close className=\"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary\">\n <IconX className=\"h-4 w-4\" />\n <span className=\"sr-only\">{t('actions.close', { defaultValue: 'Close' })}</span>\n </SheetPrimitive.Close>\n )}\n </SheetPrimitive.Content>\n </SheetPortal>\n );\n});\nSheetContent.displayName = SheetPrimitive.Content.displayName;\n\nexport type SheetHeaderProps = React.HTMLAttributes<HTMLDivElement>;\n\nfunction SheetHeader({ className, ...props }: SheetHeaderProps) {\n return (\n <div className={cn('flex flex-col space-y-2 text-center sm:text-left', className)} {...props} />\n );\n}\nSheetHeader.displayName = 'SheetHeader';\n\nexport type SheetFooterProps = React.HTMLAttributes<HTMLDivElement>;\n\nfunction SheetFooter({ className, ...props }: SheetFooterProps) {\n return (\n <div\n className={cn('flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2', className)}\n {...props}\n />\n );\n}\nSheetFooter.displayName = 'SheetFooter';\n\nexport type SheetTitleProps = React.ComponentPropsWithoutRef<typeof SheetPrimitive.Title>;\n\nconst SheetTitle = React.forwardRef<React.ElementRef<typeof SheetPrimitive.Title>, SheetTitleProps>(\n ({ className, ...props }, ref) => (\n <SheetPrimitive.Title\n ref={ref}\n className={cn('text-lg font-semibold text-foreground', className)}\n {...props}\n />\n ),\n);\nSheetTitle.displayName = SheetPrimitive.Title.displayName;\n\nexport type SheetDescriptionProps = React.ComponentPropsWithoutRef<\n typeof SheetPrimitive.Description\n>;\n\nconst SheetDescription = React.forwardRef<\n React.ElementRef<typeof SheetPrimitive.Description>,\n SheetDescriptionProps\n>(({ className, ...props }, ref) => (\n <SheetPrimitive.Description\n ref={ref}\n className={cn('text-sm text-muted-foreground', className)}\n {...props}\n />\n));\nSheetDescription.displayName = SheetPrimitive.Description.displayName;\n\nexport {\n Sheet,\n SheetTrigger,\n SheetContent,\n SheetHeader,\n SheetFooter,\n SheetTitle,\n SheetDescription,\n SheetClose,\n};\n","import { createContext, useEffect, useRef, type ReactNode } from 'react';\nimport {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogHeader,\n DialogTitle,\n} from '../primitives/dialog.js';\nimport {\n Sheet,\n SheetContent,\n SheetDescription,\n SheetHeader,\n SheetTitle,\n} from '../primitives/sheet.js';\n\nexport interface PresentationCopy {\n readonly title: string;\n readonly description?: string;\n}\n\ninterface PresentationShellProps {\n readonly dismiss: () => void;\n readonly wrapper: boolean;\n readonly copy: PresentationCopy;\n /**\n * The presented component renders the overlay's title itself, as the Radix `Title` (a quick\n * entry's record title, plan ruling 2): the shell renders no title and no description, and\n * focus moves to the element marked `data-buro-overlay-heading` on open.\n */\n readonly ownTitle?: boolean;\n readonly children: ReactNode;\n}\n\n/**\n * @internal True inside a kit shell asked for `ownTitle`: the presented component may render the\n * Radix `Title` (an app's host, which may not be a Radix dialog at all, leaves it `false`).\n */\nexport const OwnTitleContext = createContext(false);\n\n/** On open, focus the presented component's own heading instead of the first tabbable. */\nfunction focusOwnHeading(event: Event): void {\n const container = event.currentTarget;\n if (!(container instanceof HTMLElement)) return;\n const heading = container.querySelector('[data-buro-overlay-heading]');\n if (!(heading instanceof HTMLElement)) return;\n event.preventDefault();\n heading.focus();\n}\n\nfunction WrappedDialogContent({\n wrapper,\n copy,\n children,\n}: Pick<PresentationShellProps, 'wrapper' | 'copy' | 'children'>) {\n return wrapper ? (\n <>\n <DialogHeader>\n <DialogTitle>{copy.title}</DialogTitle>\n <DialogDescription className={copy.description === undefined ? 'sr-only' : undefined}>\n {copy.description ?? ''}\n </DialogDescription>\n </DialogHeader>\n {children}\n </>\n ) : (\n <>\n <DialogTitle className=\"sr-only\">{copy.title}</DialogTitle>\n <DialogDescription className=\"sr-only\">{copy.description ?? ''}</DialogDescription>\n {children}\n </>\n );\n}\n\nfunction WrappedSheetContent({\n wrapper,\n copy,\n children,\n}: Pick<PresentationShellProps, 'wrapper' | 'copy' | 'children'>) {\n return wrapper ? (\n <>\n <SheetHeader>\n <SheetTitle>{copy.title}</SheetTitle>\n <SheetDescription className={copy.description === undefined ? 'sr-only' : undefined}>\n {copy.description ?? ''}\n </SheetDescription>\n </SheetHeader>\n {children}\n </>\n ) : (\n <>\n <SheetTitle className=\"sr-only\">{copy.title}</SheetTitle>\n <SheetDescription className=\"sr-only\">{copy.description ?? ''}</SheetDescription>\n {children}\n </>\n );\n}\n\nfunction useFocusRestoration(): void {\n // Capture before Radix moves focus into the portal. The host may be removed\n // immediately after `dismiss`, so defer restoration until Radix cleanup has\n // completed its own focus handling.\n const returnFocus = useRef<HTMLElement | null>(\n typeof document === 'undefined' || !(document.activeElement instanceof HTMLElement)\n ? null\n : document.activeElement,\n );\n useEffect(\n () => () => {\n const element = returnFocus.current;\n queueMicrotask(() => {\n // The opener is gone (its row was deleted, say): the nearest surviving landmark instead\n // (spec 4.12), never the document body.\n if (element?.isConnected && element !== document.body) {\n element.focus();\n return;\n }\n const main = document.querySelector<HTMLElement>('main');\n if (main === null) return;\n if (!main.hasAttribute('tabindex')) main.setAttribute('tabindex', '-1');\n main.focus();\n });\n },\n [],\n );\n}\n\n/**\n * A pointer down inside a popover (a peek) is not outside the overlay. The popover is a React\n * sibling of the sheet or dialog (`<UIPresentations>` renders every presentation side by side),\n * and Radix decides \"inside\" by the React tree, so without this a click on a peek's title — which\n * pushes into this sheet — would first dismiss it (or ask about its dirty form).\n */\nfunction keepForPopover(event: { readonly target: EventTarget | null; preventDefault(): void }) {\n const target = event.target;\n if (target instanceof Element && target.closest('[data-buro-popover]') !== null)\n event.preventDefault();\n}\n\n/** No slide and no fade under `prefers-reduced-motion` (spec 4.12). */\nconst REDUCED_MOTION = 'motion-reduce:animate-none motion-reduce:transition-none';\n\n/** Shared Radix lifecycle shell for a centered temporary presentation. */\nexport function DialogPresentationShell({\n dismiss,\n wrapper,\n copy,\n ownTitle = false,\n children,\n}: PresentationShellProps) {\n useFocusRestoration();\n return (\n <Dialog\n open\n onOpenChange={(open) => {\n if (!open) dismiss();\n }}\n >\n {ownTitle ? (\n <DialogContent\n className={`flex max-h-[85vh] flex-col ${REDUCED_MOTION}`}\n overlayClassName={REDUCED_MOTION}\n showClose={wrapper}\n aria-describedby={undefined}\n aria-modal=\"true\"\n onOpenAutoFocus={focusOwnHeading}\n onPointerDownOutside={keepForPopover}\n >\n <OwnTitleContext.Provider value={true}>{children}</OwnTitleContext.Provider>\n </DialogContent>\n ) : (\n <DialogContent\n className={REDUCED_MOTION}\n overlayClassName={REDUCED_MOTION}\n showClose={wrapper}\n aria-modal=\"true\"\n onPointerDownOutside={keepForPopover}\n >\n <WrappedDialogContent wrapper={wrapper} copy={copy}>\n {children}\n </WrappedDialogContent>\n </DialogContent>\n )}\n </Dialog>\n );\n}\n\n/** Shared Radix lifecycle shell for a right-hand temporary presentation. */\nexport function SheetPresentationShell({\n dismiss,\n wrapper,\n copy,\n ownTitle = false,\n children,\n}: PresentationShellProps) {\n useFocusRestoration();\n return (\n <Sheet\n open\n onOpenChange={(open) => {\n if (!open) dismiss();\n }}\n >\n {ownTitle ? (\n <SheetContent\n side=\"right\"\n className={`flex flex-col sm:max-w-xl ${REDUCED_MOTION}`}\n showClose={wrapper}\n aria-describedby={undefined}\n aria-modal=\"true\"\n onOpenAutoFocus={focusOwnHeading}\n onPointerDownOutside={keepForPopover}\n >\n <OwnTitleContext.Provider value={true}>{children}</OwnTitleContext.Provider>\n </SheetContent>\n ) : (\n <SheetContent\n side=\"right\"\n className={`sm:max-w-xl ${REDUCED_MOTION}`}\n showClose={wrapper}\n aria-modal=\"true\"\n onPointerDownOutside={keepForPopover}\n >\n <WrappedSheetContent wrapper={wrapper} copy={copy}>\n {children}\n </WrappedSheetContent>\n </SheetContent>\n )}\n </Sheet>\n );\n}\n"],"mappings":";;;;;;;;;;;AASA,MAAM,QAAQA,uBAAe;AAC7B,MAAM,eAAeA,uBAAe;AACpC,MAAM,aAAaA,uBAAe;AAClC,MAAM,cAAcA,uBAAe;AAInC,MAAM,eAAeC,MAAM,YAGxB,EAAE,WAAW,GAAG,SAAS,SAC1B,GAAA,kBAAA,IAAA,CAACD,uBAAe,SAAhB;CACE,WAAWE,kBAAAA,GACT,wNACA,SACF;CACA,GAAI;CACC;AACN,CAAA,CACF;AACD,aAAa,cAAcF,uBAAe,QAAQ;AAElD,MAAM,iBAAA,GAAgBG,yBAAAA,IAAAA,CACpB,yLACA;CACE,UAAU,EACR,MAAM;EACJ,KAAK;EACL,QACE;EACF,MAAM;EACN,OACE;CACJ,EACF;CACA,iBAAiB,EACf,MAAM,QACR;AACF,CACF;AASA,MAAM,eAAeF,MAAM,YAGxB,EAAE,OAAO,SAAS,WAAW,UAAU,YAAY,MAAM,GAAG,SAAS,QAAQ;CAC9E,MAAM,KAAA,GAAIG,cAAAA,aAAAA,CAAa;CACvB,QACE,GAAA,kBAAA,KAAA,CAAC,aAAD,EAAA,UAAA,EACE,GAAA,kBAAA,IAAA,CAAC,cAAD,CAAe,CAAA,IACf,GAAA,kBAAA,KAAA,CAACJ,uBAAe,SAAhB;EACO;EACL,WAAWE,kBAAAA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AkB,KAAA;GAClB,cAAW;GACX,iBAAiB;GACjB,sBAAsB;GAEtB,WAAA,GAAA,kBAAA,IAAA,CAAC,gBAAgB,UAAjB;IAA0B,OAAO;IAAO;GAAmC,CAAA;EAC9D,CAAA,KAEf,GAAA,kBAAA,IAAA,CAACA,eAAAA,eAAD;GACE,WAAW;GACX,kBAAkB;GAClB,WAAW;GACX,cAAW;GACX,sBAAsB;GAEtB,WAAA,GAAA,kBAAA,IAAA,CAAC,sBAAD;IAA+B;IAAe;IAC3C;GACmB,CAAA;EACT,CAAA;CAEX,CAAA;AAEZ;AAGA,SAAgB,uBAAuB,EACrC,SACA,SACA,MACA,WAAW,OACX,YACyB;CACzB,oBAAoB;CACpB,QACE,GAAA,kBAAA,IAAA,CAAC,OAAD;EACE,MAAA;EACA,eAAe,SAAS;GACtB,IAAI,CAAC,MAAM,QAAQ;EACrB;EAEC,UAAA,YACC,GAAA,kBAAA,IAAA,CAAC,cAAD;GACE,MAAK;GACL,WAAW,6BAA6B;GACxC,WAAW;GACX,oBAAkB,KAAA;GAClB,cAAW;GACX,iBAAiB;GACjB,sBAAsB;GAEtB,WAAA,GAAA,kBAAA,IAAA,CAAC,gBAAgB,UAAjB;IAA0B,OAAO;IAAO;GAAmC,CAAA;EAC/D,CAAA,KAEd,GAAA,kBAAA,IAAA,CAAC,cAAD;GACE,MAAK;GACL,WAAW,eAAe;GAC1B,WAAW;GACX,cAAW;GACX,sBAAsB;GAEtB,WAAA,GAAA,kBAAA,IAAA,CAAC,qBAAD;IAA8B;IAAe;IAC1C;GACkB,CAAA;EACT,CAAA;CAEX,CAAA;AAEX"}
@@ -0,0 +1,13 @@
1
+ import { l as cn } from "./use-theme-dnE3Od3I.js";
2
+ import { jsx } from "react/jsx-runtime";
3
+ //#region src/primitives/skeleton.tsx
4
+ function Skeleton({ className, ...props }) {
5
+ return jsx("div", {
6
+ className: cn("animate-pulse rounded-md bg-muted", className),
7
+ ...props
8
+ });
9
+ }
10
+ //#endregion
11
+ export { Skeleton as t };
12
+
13
+ //# sourceMappingURL=skeleton-U2noefj5.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skeleton-U2noefj5.js","names":[],"sources":["../src/primitives/skeleton.tsx"],"sourcesContent":["'use client';\n\nimport type * as React from 'react';\nimport { cn } from '../lib/cn.js';\n\nfunction Skeleton({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) {\n return <div className={cn('animate-pulse rounded-md bg-muted', className)} {...props} />;\n}\n\nexport { Skeleton };\n"],"mappings":";;;AAKA,SAAS,SAAS,EAAE,WAAW,GAAG,SAA+C;CAC/E,OAAO,IAAC,OAAD;EAAK,WAAW,GAAG,qCAAqC,SAAS;EAAG,GAAI;CAAQ,CAAA;AACzF"}
@@ -0,0 +1,18 @@
1
+ const require_use_theme = require("./use-theme-DFlpXils.cjs");
2
+ let react_jsx_runtime = require("react/jsx-runtime");
3
+ //#region src/primitives/skeleton.tsx
4
+ function Skeleton({ className, ...props }) {
5
+ return (0, react_jsx_runtime.jsx)("div", {
6
+ className: require_use_theme.cn("animate-pulse rounded-md bg-muted", className),
7
+ ...props
8
+ });
9
+ }
10
+ //#endregion
11
+ Object.defineProperty(exports, "Skeleton", {
12
+ enumerable: true,
13
+ get: function() {
14
+ return Skeleton;
15
+ }
16
+ });
17
+
18
+ //# sourceMappingURL=skeleton-_1gP7wan.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skeleton-_1gP7wan.cjs","names":["cn"],"sources":["../src/primitives/skeleton.tsx"],"sourcesContent":["'use client';\n\nimport type * as React from 'react';\nimport { cn } from '../lib/cn.js';\n\nfunction Skeleton({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) {\n return <div className={cn('animate-pulse rounded-md bg-muted', className)} {...props} />;\n}\n\nexport { Skeleton };\n"],"mappings":";;;AAKA,SAAS,SAAS,EAAE,WAAW,GAAG,SAA+C;CAC/E,QAAO,GAAA,kBAAA,IAAA,CAAC,OAAD;EAAK,WAAWA,kBAAAA,GAAG,qCAAqC,SAAS;EAAG,GAAI;CAAQ,CAAA;AACzF"}
package/dist/styles.css CHANGED
@@ -89,7 +89,7 @@
89
89
  * exactly this reason and read as two data points; it wasn't.)
90
90
  * - red text on a 10%-red tint over --background
91
91
  * (`bg-destructive/10 text-destructive` — badges, banners, inline
92
- * errors; see forms/declarative-form.tsx, resource/resource-form.tsx,
92
+ * errors; see forms/declarative-form.tsx, record/record-screen.tsx,
93
93
  * auth/login-form.tsx, resource/list-error-state.tsx,
94
94
  * resource/tab-body.tsx, document-show-banner.tsx and others):
95
95
  * 4.74:1
@@ -129,7 +129,7 @@
129
129
  * `warning` would visibly change what's on screen once tasks 4-5 wire
130
130
  * these up, which is exactly the kind of silent drift this contract
131
131
  * exists to prevent. The one deliberate MERGE going the other way:
132
- * `resource-form.tsx`'s yellow-500 draft-banner collapses into `warning`
132
+ * `record/record-screen.tsx`'s yellow-500 draft-banner collapses into `warning`
133
133
  * (amber) — Tailwind's own OKLCH hue distance from amber-500 is 16°
134
134
  * (amber↔yellow) vs 22.5° for both amber↔orange and sky↔blue, and L/C are
135
135
  * nearly identical (76.9%/0.188 vs 79.5%/0.184) — this reads as accidental
@@ -145,7 +145,7 @@
145
145
  * badge was the only context that existed when task 3 measured them. Task
146
146
  * 4 initially reused the name `-foreground` for that tinted-text value
147
147
  * too, and it broke at the one real filled-surface site that exists
148
- * today: `resource-wizard.tsx`'s completed-step circle
148
+ * then: the old create wizard's completed-step circle
149
149
  * (`bg-success text-success-foreground`) rendered dark-green-on-green at
150
150
  * 2.19:1 — *worse* than the `text-white` it replaced. Split into two
151
151
  * names so the shape (`bg-<x> text-<x>-foreground`) means the same thing
@@ -153,11 +153,11 @@
153
153
  * `--<severity>-foreground` — shadcn's meaning, restored: text on a
154
154
  * SOLID `bg-<severity>` fill. Near-white, reproducing what the
155
155
  * wizard's literal `text-white` actually rendered (`rgb(255, 255,
156
- * 255)`) — the only filled-surface severity site that exists today.
156
+ * 255)`) — the only filled-surface severity site that existed then
157
+ * (the wizard was removed in P1b+P1c; none remains).
157
158
  * Not repeated in `.dark`: the fill itself (`--success` etc.) doesn't
158
159
  * vary by mode either (see below), so neither does its contrasting
159
- * text. Only `--success-foreground` has a live consumer right now;
160
- * the other six carry the same value for symmetry within the family,
160
+ * text. All seven carry the same value for symmetry within the family,
161
161
  * unverified against a real filled site of their own — see task 4's
162
162
  * fix-round report.
163
163
  * `--<severity>-emphasis` — task 3's original measurement, renamed,
@@ -335,8 +335,8 @@
335
335
  * line-height than v3 did. Task 7's computed-style gate caught exactly
336
336
  * one instance of this (the command palette's `text-[10px]` kbd chips,
337
337
  * nested in `text-xs`, went 16px -> 13.3333px) but the mechanism is
338
- * general, not particular to kbd — `resource-form.tsx`,
339
- * `resource-show.tsx`, `file.tsx` and others carry `text-[10px]`/
338
+ * general, not particular to kbd — `record/record-screen.tsx`,
339
+ * `record/record-screen.tsx`, `file.tsx` and others carry `text-[10px]`/
340
340
  * `text-[11px]` on routes this gate doesn't cover, and would have drifted
341
341
  * silently. Pinning every named size actually used in this kit
342
342
  * (`grep -rE 'text-(xs|sm|base|lg|xl|2xl|3xl)\b' packages/ui-shadcn/src`,
@@ -700,7 +700,7 @@
700
700
  * inherits whatever cursor its ancestor set instead of being pinned —
701
701
  * real nestings exist (clickable rows in `resource-list.tsx`,
702
702
  * `relation-picker-dialog.tsx`, `<summary className="cursor-pointer">`
703
- * in `resource-form.tsx` and `list-error-state.tsx`), and any disabled
703
+ * in `record/record-screen.tsx` and `list-error-state.tsx`), and any disabled
704
704
  * input without an explicit `disabled:cursor-not-allowed` loses v3's
705
705
  * behaviour too. */
706
706
  :disabled {
@@ -798,3 +798,235 @@ html {
798
798
  background: transparent;
799
799
  }
800
800
  }
801
+
802
+ /*
803
+ * The record-screen styling contract (P1b+P1c section 9). Every rule keys off
804
+ * the `data-buro-*` attributes the renderer writes, never a utility class, so
805
+ * an application restyles a screen without a custom frame. Container queries
806
+ * only: a 380px sheet on a 1280px page lays out like a phone.
807
+ */
808
+ @layer components {
809
+ :root {
810
+ --buro-grid-min: 16rem;
811
+ --buro-grid-max-columns: 3;
812
+ --buro-node-gap: 0.75rem;
813
+ --buro-node-min: 12rem;
814
+ --buro-size-sm: 10rem;
815
+ --buro-size-md: 16rem;
816
+ --buro-size-lg: 24rem;
817
+ /* The second level of rhythm: between blocks and field groups, never between two fields. */
818
+ --buro-section-gap: 1.5rem;
819
+ }
820
+
821
+ /* The header too: the fields of its `header` slot lay out by its width, as the body's do. A
822
+ form's and a page's body likewise, or a form would take its layout from whatever encloses it
823
+ (beside-labels in a panel, stacked in a dialog). */
824
+ [data-buro-region="record-header"],
825
+ [data-buro-region="form-body"],
826
+ [data-buro-region="page-body"],
827
+ [data-buro-region="record-body"],
828
+ [data-buro-region="panel-body"],
829
+ [data-buro-region="tab-panel"],
830
+ [data-buro-region="step-panel"],
831
+ [data-buro-node="grid"] {
832
+ container-type: inline-size;
833
+ }
834
+
835
+ /*
836
+ * In a form a panel's or a step's body is a fieldset (P6-17): the user-agent border, padding,
837
+ * margin and min-content inline size would let a wide grid or table overflow its panel.
838
+ */
839
+ [data-buro-region="panel-body"]:where(fieldset),
840
+ [data-buro-region="step-panel"]:where(fieldset) {
841
+ min-inline-size: 0;
842
+ border: 0;
843
+ padding: 0;
844
+ margin: 0;
845
+ }
846
+
847
+ /* An author `display` rule outranks the user-agent `[hidden]` rule. */
848
+ [data-buro-node][hidden],
849
+ [data-buro-region][hidden] {
850
+ /* biome-ignore lint/complexity/noImportantStyles: the spec's rule — an author display on a node must not outrank [hidden] */
851
+ display: none !important;
852
+ }
853
+
854
+ /* A pending node keeps its box; only its skeleton shows. */
855
+ [data-buro-state="pending"] {
856
+ visibility: hidden;
857
+ }
858
+ [data-buro-state="pending"] [data-buro-skeleton] {
859
+ visibility: visible;
860
+ }
861
+
862
+ [data-buro-node="stack"],
863
+ [data-buro-region="panel-body"],
864
+ [data-buro-region="tab-panel"],
865
+ [data-buro-region="step-panel"] {
866
+ display: flex;
867
+ flex-direction: column;
868
+ gap: var(--buro-node-gap);
869
+ }
870
+
871
+ /*
872
+ * A section container's children are field groups (`data-buro-group="fields"`, drawn by the
873
+ * renderer around each run of consecutive fields) and blocks, so a block stands apart from the
874
+ * fields around it while two fields stay at `--buro-node-gap`. Authored stacks, rows and grids
875
+ * keep `--buro-node-gap`.
876
+ */
877
+ [data-buro-node="stack"][data-buro-slot],
878
+ [data-buro-region="record-body"] > [data-buro-node="stack"],
879
+ [data-buro-region="form-body"] > [data-buro-node="stack"],
880
+ [data-buro-region="page-body"] > [data-buro-node="stack"],
881
+ [data-buro-region="panel-body"],
882
+ [data-buro-region="tab-panel"],
883
+ [data-buro-region="step-panel"] {
884
+ gap: var(--buro-section-gap);
885
+ }
886
+
887
+ /* The record header is set off from the body by a rule... */
888
+ [data-buro-region="record-header"] {
889
+ padding-block-end: 1rem;
890
+ border-block-end: 1px solid var(--border);
891
+ }
892
+ /* ...unless the body opens with tabs: the tab strip already separates, a second line would not. */
893
+ [data-buro-region="record-header"]:has(
894
+ ~ [data-buro-region="record-body"]
895
+ > [data-buro-node="stack"]
896
+ > [data-buro-node="tabs"]:first-child,
897
+ ~ *
898
+ [data-buro-region="record-body"]
899
+ > [data-buro-node="stack"]
900
+ > [data-buro-node="tabs"]:first-child
901
+ ) {
902
+ padding-block-end: 0;
903
+ border-block-end: 0;
904
+ }
905
+
906
+ [data-buro-node="grid"] {
907
+ display: grid;
908
+ gap: var(--buro-node-gap);
909
+ grid-template-columns: repeat(
910
+ auto-fill,
911
+ minmax(
912
+ max(
913
+ min(var(--buro-grid-min), 100%),
914
+ calc(100% / var(--buro-grid-max-columns) - var(--buro-node-gap))
915
+ ),
916
+ 1fr
917
+ )
918
+ );
919
+ }
920
+ [data-buro-node="grid"] > [data-buro-size="full"] {
921
+ grid-column: 1 / -1;
922
+ }
923
+ @container (min-width: 29rem) {
924
+ [data-buro-node="grid"] > [data-buro-size="lg"] {
925
+ grid-column: span 2;
926
+ }
927
+ }
928
+
929
+ [data-buro-node="row"] {
930
+ display: flex;
931
+ flex-wrap: wrap;
932
+ gap: var(--buro-node-gap);
933
+ }
934
+ [data-buro-node="row"] > [data-buro-node] {
935
+ flex: 1 1 var(--buro-size-md);
936
+ min-width: min(var(--buro-node-min), 100%);
937
+ }
938
+ [data-buro-node="row"] > [data-buro-size="sm"] {
939
+ flex-basis: var(--buro-size-sm);
940
+ min-width: min(var(--buro-size-sm), 100%);
941
+ }
942
+ [data-buro-node="row"] > [data-buro-size="lg"] {
943
+ flex-basis: var(--buro-size-lg);
944
+ min-width: min(var(--buro-size-lg), 100%);
945
+ }
946
+ [data-buro-node="row"] > [data-buro-size="full"] {
947
+ flex-basis: 100%;
948
+ }
949
+ [data-buro-node="row"] > [data-buro-weight="2"] {
950
+ flex-grow: 2;
951
+ }
952
+ [data-buro-node="row"] > [data-buro-weight="3"] {
953
+ flex-grow: 3;
954
+ }
955
+ [data-buro-node="row"] > [data-buro-weight="4"] {
956
+ flex-grow: 4;
957
+ }
958
+
959
+ /* `buro:facts` in its grid view: as many tiles a row as fit at `--buro-size-sm` each. */
960
+ [data-buro-facts="grid"] {
961
+ display: grid;
962
+ gap: var(--buro-node-gap);
963
+ grid-template-columns: repeat(auto-fill, minmax(min(var(--buro-size-sm), 100%), 1fr));
964
+ }
965
+
966
+ [data-buro-node="panel"] {
967
+ display: flex;
968
+ flex-direction: column;
969
+ gap: 0.75rem;
970
+ border: 1px solid var(--border);
971
+ border-radius: var(--radius);
972
+ padding: 1rem;
973
+ }
974
+ [data-buro-region="panel-title"] {
975
+ display: flex;
976
+ align-items: center;
977
+ gap: 0.25rem;
978
+ }
979
+ [data-buro-node="panel"][data-buro-tone="info"] {
980
+ border-color: var(--info, var(--border));
981
+ }
982
+ [data-buro-node="panel"][data-buro-tone="success"] {
983
+ border-color: var(--success, var(--border));
984
+ }
985
+ [data-buro-node="panel"][data-buro-tone="warning"] {
986
+ border-color: var(--warning, var(--border));
987
+ }
988
+ [data-buro-node="panel"][data-buro-tone="destructive"] {
989
+ border-color: var(--destructive);
990
+ }
991
+ /* A panel inside steps or tabs is a section of its parent, not a card of its own. */
992
+ [data-buro-node="steps"] > [data-buro-node="panel"] {
993
+ border-width: 0 0 1px;
994
+ border-radius: 0;
995
+ padding: 0 0 1rem;
996
+ }
997
+
998
+ /*
999
+ * One field geometry in show, in a grid and in a form (visual-quality spec, finding 2): a leaf
1000
+ * is its label, its control, then any message line (`field-message`). Narrow, the label sits
1001
+ * above the value; from 36rem a single-column leaf puts it in a label column no wider than
1002
+ * `--buro-size-sm`, and messages stay under the control.
1003
+ */
1004
+ [data-buro-node="field"] {
1005
+ display: grid;
1006
+ grid-template-columns: minmax(0, 1fr);
1007
+ gap: 0.375rem 1rem;
1008
+ align-items: baseline;
1009
+ }
1010
+ @container (min-width: 36rem) {
1011
+ [data-buro-node="field"]:not([data-buro-size="full"]) {
1012
+ /* The label column is never narrower than its content: a one-word label and its 24px
1013
+ help button did not fit in a narrow label column, and the button covered the label's
1014
+ last letters (REF-41). A longer label still wraps at its spaces. */
1015
+ grid-template-columns: minmax(min-content, var(--buro-size-sm)) minmax(0, 1fr);
1016
+ }
1017
+ [data-buro-node="field"]:not([data-buro-size="full"]) > :nth-child(n + 3) {
1018
+ grid-column: 2;
1019
+ }
1020
+ }
1021
+ /* In a grid cell or a row the label is always above the value: the cell is the column. */
1022
+ /* (Outranks the container rules above by one attribute: the `:is()` parent.) */
1023
+ :is([data-buro-node="grid"], [data-buro-node="row"])
1024
+ > [data-buro-node="field"]:not([data-buro-size="full"]) {
1025
+ grid-template-columns: minmax(0, 1fr);
1026
+ }
1027
+ :is([data-buro-node="grid"], [data-buro-node="row"])
1028
+ > [data-buro-node="field"]:not([data-buro-size="full"])
1029
+ > :nth-child(n + 3) {
1030
+ grid-column: auto;
1031
+ }
1032
+ }