@burojs/ui-shadcn 0.3.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.
- package/README.md +26 -7
- package/dist/bulk-summary-CwSd6Yjb.cjs +108 -0
- package/dist/bulk-summary-CwSd6Yjb.cjs.map +1 -0
- package/dist/bulk-summary-GxMDP4bw.js +108 -0
- package/dist/bulk-summary-GxMDP4bw.js.map +1 -0
- package/dist/button-BxnnE28H.cjs +55 -0
- package/dist/button-BxnnE28H.cjs.map +1 -0
- package/dist/button-MWVeZaqj.js +44 -0
- package/dist/button-MWVeZaqj.js.map +1 -0
- package/dist/candidates-gate-CX2PBu6l.js +63 -0
- package/dist/candidates-gate-CX2PBu6l.js.map +1 -0
- package/dist/candidates-gate-DiFI52r7.cjs +70 -0
- package/dist/candidates-gate-DiFI52r7.cjs.map +1 -0
- package/dist/candidates-relation-picker-CBsVcnPR.js +82 -0
- package/dist/candidates-relation-picker-CBsVcnPR.js.map +1 -0
- package/dist/candidates-relation-picker-Dd_GVLlu.cjs +84 -0
- package/dist/candidates-relation-picker-Dd_GVLlu.cjs.map +1 -0
- package/dist/check-confirm-dialog-BRByTFpg.cjs +1534 -0
- package/dist/check-confirm-dialog-BRByTFpg.cjs.map +1 -0
- package/dist/check-confirm-dialog-CkaVTPT9.js +1232 -0
- package/dist/check-confirm-dialog-CkaVTPT9.js.map +1 -0
- package/dist/dialog-B_rt9S1c.js +63 -0
- package/dist/dialog-B_rt9S1c.js.map +1 -0
- package/dist/dialog-DRNUq9EA.cjs +112 -0
- package/dist/dialog-DRNUq9EA.cjs.map +1 -0
- package/dist/filter-builder-B3mZFL-K.cjs +1761 -0
- package/dist/filter-builder-B3mZFL-K.cjs.map +1 -0
- package/dist/filter-builder-DOnaXNfP.js +1605 -0
- package/dist/filter-builder-DOnaXNfP.js.map +1 -0
- package/dist/flow-runtime-B6zOHYqI.cjs +255 -0
- package/dist/flow-runtime-B6zOHYqI.cjs.map +1 -0
- package/dist/flow-runtime-D8h99FSg.js +252 -0
- package/dist/flow-runtime-D8h99FSg.js.map +1 -0
- package/dist/flow-screen-CX05b3G9.cjs +705 -0
- package/dist/flow-screen-CX05b3G9.cjs.map +1 -0
- package/dist/flow-screen-CmbARSqg.js +701 -0
- package/dist/flow-screen-CmbARSqg.js.map +1 -0
- package/dist/index.cjs +6453 -17494
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3754 -3621
- package/dist/index.d.ts +3754 -3621
- package/dist/index.js +6217 -17219
- package/dist/index.js.map +1 -1
- package/dist/inline-flow-host-B7U1OJUe.cjs +112 -0
- package/dist/inline-flow-host-B7U1OJUe.cjs.map +1 -0
- package/dist/inline-flow-host-C3H2UpSA.js +112 -0
- package/dist/inline-flow-host-C3H2UpSA.js.map +1 -0
- package/dist/input-BI0czGyI.cjs +23 -0
- package/dist/input-BI0czGyI.cjs.map +1 -0
- package/dist/input-CUPStzZO.js +17 -0
- package/dist/input-CUPStzZO.js.map +1 -0
- package/dist/label-66W1qbke.js +29 -0
- package/dist/label-66W1qbke.js.map +1 -0
- package/dist/label-w6JYf2cF.cjs +36 -0
- package/dist/label-w6JYf2cF.cjs.map +1 -0
- package/dist/layout/theme-storage-key.cjs +5 -10
- package/dist/layout/theme-storage-key.cjs.map +1 -1
- package/dist/layout/theme-storage-key.d.cts +2 -23
- package/dist/layout/theme-storage-key.d.ts +2 -23
- package/dist/layout/theme-storage-key.js +5 -2
- package/dist/layout/theme-storage-key.js.map +1 -1
- package/dist/lazy-relation-picker-dialog-2oxnA6IR.js +14 -0
- package/dist/lazy-relation-picker-dialog-2oxnA6IR.js.map +1 -0
- package/dist/lazy-relation-picker-dialog-BfAGKzUG.cjs +19 -0
- package/dist/lazy-relation-picker-dialog-BfAGKzUG.cjs.map +1 -0
- package/dist/markdown/index.cjs +424 -511
- package/dist/markdown/index.cjs.map +1 -1
- package/dist/markdown/index.d.cts +1072 -34
- package/dist/markdown/index.d.ts +1072 -34
- package/dist/markdown/index.js +411 -459
- package/dist/markdown/index.js.map +1 -1
- package/dist/page-flow-route-CQ7HsbBm.cjs +277 -0
- package/dist/page-flow-route-CQ7HsbBm.cjs.map +1 -0
- package/dist/page-flow-route-CyXSvXSE.js +277 -0
- package/dist/page-flow-route-CyXSvXSE.js.map +1 -0
- package/dist/peek-filter-CnqHwTMU.cjs +51 -0
- package/dist/peek-filter-CnqHwTMU.cjs.map +1 -0
- package/dist/peek-filter-ErLfO153.js +28 -0
- package/dist/peek-filter-ErLfO153.js.map +1 -0
- package/dist/place-node--GdsP688.js +7315 -0
- package/dist/place-node--GdsP688.js.map +1 -0
- package/dist/place-node-SIp4XYQH.cjs +7833 -0
- package/dist/place-node-SIp4XYQH.cjs.map +1 -0
- package/dist/related-list-cards-B6x9HQQp.js +42 -0
- package/dist/related-list-cards-B6x9HQQp.js.map +1 -0
- package/dist/related-list-cards-nxuODlIA.cjs +42 -0
- package/dist/related-list-cards-nxuODlIA.cjs.map +1 -0
- package/dist/related-list-timeline-BYJKEbmA.cjs +142 -0
- package/dist/related-list-timeline-BYJKEbmA.cjs.map +1 -0
- package/dist/related-list-timeline-DEdfd-rr.js +142 -0
- package/dist/related-list-timeline-DEdfd-rr.js.map +1 -0
- package/dist/related-rows-B4levHcR.js +186 -0
- package/dist/related-rows-B4levHcR.js.map +1 -0
- package/dist/related-rows-zh5f_4QR.cjs +209 -0
- package/dist/related-rows-zh5f_4QR.cjs.map +1 -0
- package/dist/relation-create-BOaUe12G.cjs +362 -0
- package/dist/relation-create-BOaUe12G.cjs.map +1 -0
- package/dist/relation-create-Bg-eEJLs.js +337 -0
- package/dist/relation-create-Bg-eEJLs.js.map +1 -0
- package/dist/relation-many-picker-B-NCEUgX.cjs +465 -0
- package/dist/relation-many-picker-B-NCEUgX.cjs.map +1 -0
- package/dist/relation-many-picker-gdAOD-qK.js +464 -0
- package/dist/relation-many-picker-gdAOD-qK.js.map +1 -0
- package/dist/relation-picker-BAY77ivO.js +462 -0
- package/dist/relation-picker-BAY77ivO.js.map +1 -0
- package/dist/relation-picker-Da_uhFvA.cjs +479 -0
- package/dist/relation-picker-Da_uhFvA.cjs.map +1 -0
- package/dist/relation-picker-dialog-M0pQaWlp.cjs +300 -0
- package/dist/relation-picker-dialog-M0pQaWlp.cjs.map +1 -0
- package/dist/relation-picker-dialog-hA9rYrZB.js +299 -0
- package/dist/relation-picker-dialog-hA9rYrZB.js.map +1 -0
- package/dist/resource-page-router-OSQyRA5b.cjs +1779 -0
- package/dist/resource-page-router-OSQyRA5b.cjs.map +1 -0
- package/dist/resource-page-router-T4vS5gbJ.js +1582 -0
- package/dist/resource-page-router-T4vS5gbJ.js.map +1 -0
- package/dist/rich-text-DFerywgz.js +457 -0
- package/dist/rich-text-DFerywgz.js.map +1 -0
- package/dist/rich-text-vTyVjDoa.cjs +460 -0
- package/dist/rich-text-vTyVjDoa.cjs.map +1 -0
- package/dist/search-access-B7G5oR8n.cjs +812 -0
- package/dist/search-access-B7G5oR8n.cjs.map +1 -0
- package/dist/search-access-CURsWn-U.js +669 -0
- package/dist/search-access-CURsWn-U.js.map +1 -0
- package/dist/shell-BPlk8hEa.js +205 -0
- package/dist/shell-BPlk8hEa.js.map +1 -0
- package/dist/shell-DxhlsPwm.cjs +271 -0
- package/dist/shell-DxhlsPwm.cjs.map +1 -0
- package/dist/skeleton-U2noefj5.js +13 -0
- package/dist/skeleton-U2noefj5.js.map +1 -0
- package/dist/skeleton-_1gP7wan.cjs +18 -0
- package/dist/skeleton-_1gP7wan.cjs.map +1 -0
- package/dist/styles.css +255 -17
- package/dist/theme/theme-css.cjs +95 -96
- package/dist/theme/theme-css.cjs.map +1 -1
- package/dist/theme/theme-css.d.cts +10 -8
- package/dist/theme/theme-css.d.ts +10 -8
- package/dist/theme/theme-css.js +94 -94
- package/dist/theme/theme-css.js.map +1 -1
- package/dist/theme/theme-storage.cjs +34 -39
- package/dist/theme/theme-storage.cjs.map +1 -1
- package/dist/theme/theme-storage.d.cts +3 -1
- package/dist/theme/theme-storage.d.ts +3 -1
- package/dist/theme/theme-storage.js +33 -37
- package/dist/theme/theme-storage.js.map +1 -1
- package/dist/theme-storage-key-pYlp4aDS.d.cts +31 -0
- package/dist/theme-storage-key-pYlp4aDS.d.ts +31 -0
- package/dist/toaster-C7CiYA4Z.cjs +248 -0
- package/dist/toaster-C7CiYA4Z.cjs.map +1 -0
- package/dist/toaster-CfCRLgR-.js +164 -0
- package/dist/toaster-CfCRLgR-.js.map +1 -0
- package/dist/use-dialog-filter-state-BBCC0OEK.cjs +92 -0
- package/dist/use-dialog-filter-state-BBCC0OEK.cjs.map +1 -0
- package/dist/use-dialog-filter-state-BDcgS5Oz.js +87 -0
- package/dist/use-dialog-filter-state-BDcgS5Oz.js.map +1 -0
- package/dist/use-theme-DFlpXils.cjs +257 -0
- package/dist/use-theme-DFlpXils.cjs.map +1 -0
- package/dist/use-theme-dnE3Od3I.js +175 -0
- package/dist/use-theme-dnE3Od3I.js.map +1 -0
- package/package.json +18 -17
- package/dist/chunk-ABUQPOOE.js +0 -11
- package/dist/chunk-ABUQPOOE.js.map +0 -1
- package/dist/chunk-DBGGWBFG.cjs +0 -199
- package/dist/chunk-DBGGWBFG.cjs.map +0 -1
- package/dist/chunk-FMX4GLCQ.js +0 -6
- package/dist/chunk-FMX4GLCQ.js.map +0 -1
- package/dist/chunk-UC57Z243.js +0 -143
- package/dist/chunk-UC57Z243.js.map +0 -1
- package/dist/chunk-UPGPO75B.js +0 -164
- package/dist/chunk-UPGPO75B.js.map +0 -1
- package/dist/chunk-VXJAXJ3U.cjs +0 -8
- package/dist/chunk-VXJAXJ3U.cjs.map +0 -1
- package/dist/chunk-W7AEYE7A.cjs +0 -13
- package/dist/chunk-W7AEYE7A.cjs.map +0 -1
- package/dist/chunk-YF5IW525.cjs +0 -155
- package/dist/chunk-YF5IW525.cjs.map +0 -1
- package/dist/rich-text-6V7WZ3WV.cjs +0 -518
- package/dist/rich-text-6V7WZ3WV.cjs.map +0 -1
- package/dist/rich-text-N2FZEJJV.js +0 -491
- package/dist/rich-text-N2FZEJJV.js.map +0 -1
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
const require_check_confirm_dialog = require("./check-confirm-dialog-BRByTFpg.cjs");
|
|
2
|
+
const require_button = require("./button-BxnnE28H.cjs");
|
|
3
|
+
const require_flow_screen = require("./flow-screen-CX05b3G9.cjs");
|
|
4
|
+
let _burojs_react = require("@burojs/react");
|
|
5
|
+
let _tabler_icons_react = require("@tabler/icons-react");
|
|
6
|
+
let react = require("react");
|
|
7
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
8
|
+
let _burojs_react_flows = require("@burojs/react/flows");
|
|
9
|
+
//#region src/flows/inline-flow-host.tsx
|
|
10
|
+
function InlineFlowHost({ resource = "", name = "", target: givenTarget, label, record, lease, placementKey, stale = false, onDiscard }) {
|
|
11
|
+
const tid = (0, _burojs_react.useTestIds)();
|
|
12
|
+
const own = require_check_confirm_dialog.useFlowChrome(resource, name);
|
|
13
|
+
const chrome = label === void 0 ? own : {
|
|
14
|
+
...own,
|
|
15
|
+
label,
|
|
16
|
+
labelText: label
|
|
17
|
+
};
|
|
18
|
+
const target = (0, react.useMemo)(() => givenTarget ?? {
|
|
19
|
+
resource,
|
|
20
|
+
action: name
|
|
21
|
+
}, [
|
|
22
|
+
givenTarget,
|
|
23
|
+
resource,
|
|
24
|
+
name
|
|
25
|
+
]);
|
|
26
|
+
const flow = (0, _burojs_react_flows.useFlowRun)(target, {
|
|
27
|
+
...record === void 0 ? {} : { record },
|
|
28
|
+
surface: "inline",
|
|
29
|
+
...lease === void 0 ? {} : { lease }
|
|
30
|
+
});
|
|
31
|
+
flow.holdThen(true);
|
|
32
|
+
const { run, snapshot, compiled } = flow;
|
|
33
|
+
const binding = (0, react.useMemo)(() => ({
|
|
34
|
+
kind: "inline",
|
|
35
|
+
close: () => flow.reset(),
|
|
36
|
+
finish: () => {
|
|
37
|
+
flow.runThen();
|
|
38
|
+
flow.reset();
|
|
39
|
+
}
|
|
40
|
+
}), [flow.reset, flow.runThen]);
|
|
41
|
+
const holder = (0, _burojs_react.useScreenState)()?.inline;
|
|
42
|
+
const t = (0, _burojs_react.useOptionalT)();
|
|
43
|
+
(0, react.useEffect)(() => {
|
|
44
|
+
if (lease === void 0 || holder === void 0) return;
|
|
45
|
+
lease.mounted += 1;
|
|
46
|
+
lease.label = chrome.labelText;
|
|
47
|
+
holder.touch();
|
|
48
|
+
return () => {
|
|
49
|
+
lease.mounted -= 1;
|
|
50
|
+
holder.touch();
|
|
51
|
+
};
|
|
52
|
+
}, [
|
|
53
|
+
lease,
|
|
54
|
+
holder,
|
|
55
|
+
chrome.labelText
|
|
56
|
+
]);
|
|
57
|
+
(0, react.useEffect)(() => {
|
|
58
|
+
if (lease === void 0 || holder === void 0 || run === null) return;
|
|
59
|
+
const sync = () => {
|
|
60
|
+
const now = run.getSnapshot();
|
|
61
|
+
if (lease.initial === void 0 && now.history.includes("open")) lease.initial = JSON.stringify(now.values);
|
|
62
|
+
const dirty = now.outcome?.outcome !== "success" && (now.outcome?.outcome === "unknown" || lease.initial !== void 0 && JSON.stringify(now.values) !== lease.initial);
|
|
63
|
+
const locked = now.control === "running";
|
|
64
|
+
if (dirty === lease.dirty && locked === lease.locked) return;
|
|
65
|
+
lease.dirty = dirty;
|
|
66
|
+
lease.locked = locked;
|
|
67
|
+
holder.touch();
|
|
68
|
+
};
|
|
69
|
+
sync();
|
|
70
|
+
return run.subscribe(sync);
|
|
71
|
+
}, [
|
|
72
|
+
lease,
|
|
73
|
+
holder,
|
|
74
|
+
run
|
|
75
|
+
]);
|
|
76
|
+
const opened = run !== null && compiled !== null && (snapshot.history.includes("open") || snapshot.step === "outcome");
|
|
77
|
+
return (0, react_jsx_runtime.jsxs)("div", {
|
|
78
|
+
"data-testid": tid.inlineFlow(compiled?.flowId ?? `${resource}/actions/${name}`, placementKey),
|
|
79
|
+
"data-buro-host": "inline",
|
|
80
|
+
className: "flex min-h-0 flex-col gap-4",
|
|
81
|
+
children: [stale ? (0, react_jsx_runtime.jsxs)("div", {
|
|
82
|
+
role: "status",
|
|
83
|
+
"data-buro-flow-state": "stale",
|
|
84
|
+
className: "flex flex-wrap items-center gap-2 text-sm text-muted-foreground",
|
|
85
|
+
children: [(0, react_jsx_runtime.jsx)("span", { children: require_check_confirm_dialog.text(t, "flow.noLongerApplies", "This action no longer applies") }), (0, react_jsx_runtime.jsx)(require_button.Button, {
|
|
86
|
+
type: "button",
|
|
87
|
+
size: "sm",
|
|
88
|
+
variant: "outline",
|
|
89
|
+
onClick: onDiscard,
|
|
90
|
+
children: require_check_confirm_dialog.text(t, "flow.discard", "Discard")
|
|
91
|
+
})]
|
|
92
|
+
}) : null, opened ? (0, react_jsx_runtime.jsx)("fieldset", {
|
|
93
|
+
disabled: stale,
|
|
94
|
+
className: "m-0 min-w-0 border-0 p-0",
|
|
95
|
+
children: (0, react_jsx_runtime.jsx)(require_flow_screen.HostedFlowScreen, {
|
|
96
|
+
binding,
|
|
97
|
+
host: "inline",
|
|
98
|
+
run,
|
|
99
|
+
compiled,
|
|
100
|
+
label: chrome.labelText,
|
|
101
|
+
record
|
|
102
|
+
})
|
|
103
|
+
}) : (0, react_jsx_runtime.jsx)(_tabler_icons_react.IconLoader2, {
|
|
104
|
+
className: "h-5 w-5 animate-spin self-center",
|
|
105
|
+
"aria-hidden": "true"
|
|
106
|
+
})]
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
//#endregion
|
|
110
|
+
exports.InlineFlowHost = InlineFlowHost;
|
|
111
|
+
|
|
112
|
+
//# sourceMappingURL=inline-flow-host-B7U1OJUe.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inline-flow-host-B7U1OJUe.cjs","names":["useTestIds","useFlowChrome","useMemo","useFlowRun","useScreenState","useOptionalT","text","Button","HostedFlowScreen","IconLoader2"],"sources":["../src/flows/inline-flow-host.tsx"],"sourcesContent":["'use client';\n/**\n * The inline host (P6 3.12): an item flow drawn in place in a show tree. The run lives in the\n * placement's lease, held by the screen, so a tab switch away and back finds the typed input and\n * a write in flight, and the flow's attempt slot stays the one P4 keys on (user, flow, record).\n */\nimport type { FlowTarget, Row } from '@burojs/core';\nimport type { InlineLease } from '@burojs/react';\nimport { useOptionalT, useScreenState, useTestIds } from '@burojs/react';\nimport { useFlowRun } from '@burojs/react/flows';\nimport { IconLoader2 } from '@tabler/icons-react';\nimport { type ReactElement, useEffect, useMemo } from 'react';\nimport { Button } from '../primitives/button.js';\nimport { text, useFlowChrome } from './chrome.js';\nimport { type FlowHostBinding, HostedFlowScreen } from './flow-screen.js';\n\nexport interface InlineFlowHostProps {\n /** The resource of an item flow on a record screen; a page names `target` instead. */\n readonly resource?: string;\n readonly name?: string;\n /** The flow, when it is not an item flow of the screen's resource (a page's, P7 3.15). */\n readonly target?: FlowTarget;\n /** The label of a flow with no resource to ask (an app flow's). */\n readonly label?: string;\n /** The record an item flow runs on; none on a page. */\n readonly record?: Row;\n readonly lease?: InlineLease;\n readonly placementKey: string;\n /**\n * The flow no longer applies to the record (its `when` turned false) while the input is dirty\n * or the attempt unresolved: the node stays, read-only, with \"no longer applies\" and Discard.\n */\n readonly stale?: boolean;\n readonly onDiscard?: () => void;\n}\n\nexport function InlineFlowHost({\n resource = '',\n name = '',\n target: givenTarget,\n label,\n record,\n lease,\n placementKey,\n stale = false,\n onDiscard,\n}: InlineFlowHostProps): ReactElement {\n const tid = useTestIds();\n const own = useFlowChrome(resource, name);\n const chrome = label === undefined ? own : { ...own, label, labelText: label };\n const target = useMemo<FlowTarget>(\n () => givenTarget ?? { resource, action: name },\n [givenTarget, resource, name],\n );\n const flow = useFlowRun(target, {\n ...(record === undefined ? {} : { record }),\n surface: 'inline',\n ...(lease === undefined ? {} : { lease }),\n });\n // `then` is this host's to run, once the form it succeeded in has started over.\n flow.holdThen(true);\n const { run, snapshot, compiled } = flow;\n const binding = useMemo<FlowHostBinding>(\n () => ({\n kind: 'inline',\n close: () => flow.reset(),\n finish: () => {\n flow.runThen();\n flow.reset();\n },\n }),\n // biome-ignore lint/correctness/useExhaustiveDependencies: reset and runThen are stable callbacks\n [flow.reset, flow.runThen],\n );\n const holder = useScreenState()?.inline;\n const t = useOptionalT();\n // The lease's guard state, from the run: unsaved input or an unresolved attempt (dirty), a\n // write in flight (locked), and whether a node shows it. The screen's blockers read these\n // when the node is not on screen (tab switched, placement hidden).\n useEffect(() => {\n if (lease === undefined || holder === undefined) return;\n lease.mounted += 1;\n lease.label = chrome.labelText;\n holder.touch();\n return () => {\n lease.mounted -= 1;\n holder.touch();\n };\n }, [lease, holder, chrome.labelText]);\n useEffect(() => {\n if (lease === undefined || holder === undefined || run === null) return;\n const sync = () => {\n const now = run.getSnapshot();\n if (lease.initial === undefined && now.history.includes('open'))\n lease.initial = JSON.stringify(now.values);\n const dirty =\n now.outcome?.outcome !== 'success' &&\n (now.outcome?.outcome === 'unknown' ||\n (lease.initial !== undefined && JSON.stringify(now.values) !== lease.initial));\n const locked = now.control === 'running';\n if (dirty === lease.dirty && locked === lease.locked) return;\n lease.dirty = dirty;\n lease.locked = locked;\n holder.touch();\n };\n sync();\n return run.subscribe(sync);\n }, [lease, holder, run]);\n const opened =\n run !== null &&\n compiled !== null &&\n (snapshot.history.includes('open') || snapshot.step === 'outcome');\n return (\n <div\n data-testid={tid.inlineFlow(compiled?.flowId ?? `${resource}/actions/${name}`, placementKey)}\n data-buro-host=\"inline\"\n className=\"flex min-h-0 flex-col gap-4\"\n >\n {stale ? (\n <div\n role=\"status\"\n data-buro-flow-state=\"stale\"\n className=\"flex flex-wrap items-center gap-2 text-sm text-muted-foreground\"\n >\n <span>{text(t, 'flow.noLongerApplies', 'This action no longer applies')}</span>\n <Button type=\"button\" size=\"sm\" variant=\"outline\" onClick={onDiscard}>\n {text(t, 'flow.discard', 'Discard')}\n </Button>\n </div>\n ) : null}\n {opened ? (\n <fieldset disabled={stale} className=\"m-0 min-w-0 border-0 p-0\">\n <HostedFlowScreen\n binding={binding}\n host=\"inline\"\n run={run}\n compiled={compiled}\n label={chrome.labelText}\n record={record}\n />\n </fieldset>\n ) : (\n <IconLoader2 className=\"h-5 w-5 animate-spin self-center\" aria-hidden=\"true\" />\n )}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;AAoCA,SAAgB,eAAe,EAC7B,WAAW,IACX,OAAO,IACP,QAAQ,aACR,OACA,QACA,OACA,cACA,QAAQ,OACR,aACoC;CACpC,MAAM,OAAA,GAAMA,cAAAA,WAAAA,CAAW;CACvB,MAAM,MAAMC,6BAAAA,cAAc,UAAU,IAAI;CACxC,MAAM,SAAS,UAAU,KAAA,IAAY,MAAM;EAAE,GAAG;EAAK;EAAO,WAAW;CAAM;CAC7E,MAAM,UAAA,GAASC,MAAAA,QAAAA,OACP,eAAe;EAAE;EAAU,QAAQ;CAAK,GAC9C;EAAC;EAAa;EAAU;CAAI,CAC9B;CACA,MAAM,QAAA,GAAOC,oBAAAA,WAAAA,CAAW,QAAQ;EAC9B,GAAI,WAAW,KAAA,IAAY,CAAC,IAAI,EAAE,OAAO;EACzC,SAAS;EACT,GAAI,UAAU,KAAA,IAAY,CAAC,IAAI,EAAE,MAAM;CACzC,CAAC;CAED,KAAK,SAAS,IAAI;CAClB,MAAM,EAAE,KAAK,UAAU,aAAa;CACpC,MAAM,WAAA,GAAUD,MAAAA,QAAAA,QACP;EACL,MAAM;EACN,aAAa,KAAK,MAAM;EACxB,cAAc;GACZ,KAAK,QAAQ;GACb,KAAK,MAAM;EACb;CACF,IAEA,CAAC,KAAK,OAAO,KAAK,OAAO,CAC3B;CACA,MAAM,UAAA,GAASE,cAAAA,eAAAA,CAAe,CAAC,EAAE;CACjC,MAAM,KAAA,GAAIC,cAAAA,aAAAA,CAAa;CAIvB,CAAA,GAAA,MAAA,UAAA,OAAgB;EACd,IAAI,UAAU,KAAA,KAAa,WAAW,KAAA,GAAW;EACjD,MAAM,WAAW;EACjB,MAAM,QAAQ,OAAO;EACrB,OAAO,MAAM;EACb,aAAa;GACX,MAAM,WAAW;GACjB,OAAO,MAAM;EACf;CACF,GAAG;EAAC;EAAO;EAAQ,OAAO;CAAS,CAAC;CACpC,CAAA,GAAA,MAAA,UAAA,OAAgB;EACd,IAAI,UAAU,KAAA,KAAa,WAAW,KAAA,KAAa,QAAQ,MAAM;EACjE,MAAM,aAAa;GACjB,MAAM,MAAM,IAAI,YAAY;GAC5B,IAAI,MAAM,YAAY,KAAA,KAAa,IAAI,QAAQ,SAAS,MAAM,GAC5D,MAAM,UAAU,KAAK,UAAU,IAAI,MAAM;GAC3C,MAAM,QACJ,IAAI,SAAS,YAAY,cACxB,IAAI,SAAS,YAAY,aACvB,MAAM,YAAY,KAAA,KAAa,KAAK,UAAU,IAAI,MAAM,MAAM,MAAM;GACzE,MAAM,SAAS,IAAI,YAAY;GAC/B,IAAI,UAAU,MAAM,SAAS,WAAW,MAAM,QAAQ;GACtD,MAAM,QAAQ;GACd,MAAM,SAAS;GACf,OAAO,MAAM;EACf;EACA,KAAK;EACL,OAAO,IAAI,UAAU,IAAI;CAC3B,GAAG;EAAC;EAAO;EAAQ;CAAG,CAAC;CACvB,MAAM,SACJ,QAAQ,QACR,aAAa,SACZ,SAAS,QAAQ,SAAS,MAAM,KAAK,SAAS,SAAS;CAC1D,QACE,GAAA,kBAAA,KAAA,CAAC,OAAD;EACE,eAAa,IAAI,WAAW,UAAU,UAAU,GAAG,SAAS,WAAW,QAAQ,YAAY;EAC3F,kBAAe;EACf,WAAU;EAHZ,UAAA,CAKG,SACC,GAAA,kBAAA,KAAA,CAAC,OAAD;GACE,MAAK;GACL,wBAAqB;GACrB,WAAU;GAHZ,UAAA,EAKE,GAAA,kBAAA,IAAA,CAAC,QAAD,EAAA,UAAOC,6BAAAA,KAAK,GAAG,wBAAwB,+BAA+B,EAAQ,CAAA,IAC9E,GAAA,kBAAA,IAAA,CAACC,eAAAA,QAAD;IAAQ,MAAK;IAAS,MAAK;IAAK,SAAQ;IAAU,SAAS;IACxDD,UAAAA,6BAAAA,KAAK,GAAG,gBAAgB,SAAS;GAC5B,CAAA,CACL;EACH,CAAA,IAAA,MACH,UACC,GAAA,kBAAA,IAAA,CAAC,YAAD;GAAU,UAAU;GAAO,WAAU;GACnC,WAAA,GAAA,kBAAA,IAAA,CAACE,oBAAAA,kBAAD;IACW;IACT,MAAK;IACA;IACK;IACV,OAAO,OAAO;IACN;GACT,CAAA;EACO,CAAA,KAEV,GAAA,kBAAA,IAAA,CAACC,oBAAAA,aAAD;GAAa,WAAU;GAAmC,eAAY;EAAQ,CAAA,CAE7E;;AAET"}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { h as useFlowChrome, m as text } from "./check-confirm-dialog-CkaVTPT9.js";
|
|
2
|
+
import { t as Button } from "./button-MWVeZaqj.js";
|
|
3
|
+
import { HostedFlowScreen } from "./flow-screen-CmbARSqg.js";
|
|
4
|
+
import { useOptionalT, useScreenState, useTestIds } from "@burojs/react";
|
|
5
|
+
import { IconLoader2 } from "@tabler/icons-react";
|
|
6
|
+
import { useEffect, useMemo } from "react";
|
|
7
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
+
import { useFlowRun } from "@burojs/react/flows";
|
|
9
|
+
//#region src/flows/inline-flow-host.tsx
|
|
10
|
+
function InlineFlowHost({ resource = "", name = "", target: givenTarget, label, record, lease, placementKey, stale = false, onDiscard }) {
|
|
11
|
+
const tid = useTestIds();
|
|
12
|
+
const own = useFlowChrome(resource, name);
|
|
13
|
+
const chrome = label === void 0 ? own : {
|
|
14
|
+
...own,
|
|
15
|
+
label,
|
|
16
|
+
labelText: label
|
|
17
|
+
};
|
|
18
|
+
const target = useMemo(() => givenTarget ?? {
|
|
19
|
+
resource,
|
|
20
|
+
action: name
|
|
21
|
+
}, [
|
|
22
|
+
givenTarget,
|
|
23
|
+
resource,
|
|
24
|
+
name
|
|
25
|
+
]);
|
|
26
|
+
const flow = useFlowRun(target, {
|
|
27
|
+
...record === void 0 ? {} : { record },
|
|
28
|
+
surface: "inline",
|
|
29
|
+
...lease === void 0 ? {} : { lease }
|
|
30
|
+
});
|
|
31
|
+
flow.holdThen(true);
|
|
32
|
+
const { run, snapshot, compiled } = flow;
|
|
33
|
+
const binding = useMemo(() => ({
|
|
34
|
+
kind: "inline",
|
|
35
|
+
close: () => flow.reset(),
|
|
36
|
+
finish: () => {
|
|
37
|
+
flow.runThen();
|
|
38
|
+
flow.reset();
|
|
39
|
+
}
|
|
40
|
+
}), [flow.reset, flow.runThen]);
|
|
41
|
+
const holder = useScreenState()?.inline;
|
|
42
|
+
const t = useOptionalT();
|
|
43
|
+
useEffect(() => {
|
|
44
|
+
if (lease === void 0 || holder === void 0) return;
|
|
45
|
+
lease.mounted += 1;
|
|
46
|
+
lease.label = chrome.labelText;
|
|
47
|
+
holder.touch();
|
|
48
|
+
return () => {
|
|
49
|
+
lease.mounted -= 1;
|
|
50
|
+
holder.touch();
|
|
51
|
+
};
|
|
52
|
+
}, [
|
|
53
|
+
lease,
|
|
54
|
+
holder,
|
|
55
|
+
chrome.labelText
|
|
56
|
+
]);
|
|
57
|
+
useEffect(() => {
|
|
58
|
+
if (lease === void 0 || holder === void 0 || run === null) return;
|
|
59
|
+
const sync = () => {
|
|
60
|
+
const now = run.getSnapshot();
|
|
61
|
+
if (lease.initial === void 0 && now.history.includes("open")) lease.initial = JSON.stringify(now.values);
|
|
62
|
+
const dirty = now.outcome?.outcome !== "success" && (now.outcome?.outcome === "unknown" || lease.initial !== void 0 && JSON.stringify(now.values) !== lease.initial);
|
|
63
|
+
const locked = now.control === "running";
|
|
64
|
+
if (dirty === lease.dirty && locked === lease.locked) return;
|
|
65
|
+
lease.dirty = dirty;
|
|
66
|
+
lease.locked = locked;
|
|
67
|
+
holder.touch();
|
|
68
|
+
};
|
|
69
|
+
sync();
|
|
70
|
+
return run.subscribe(sync);
|
|
71
|
+
}, [
|
|
72
|
+
lease,
|
|
73
|
+
holder,
|
|
74
|
+
run
|
|
75
|
+
]);
|
|
76
|
+
const opened = run !== null && compiled !== null && (snapshot.history.includes("open") || snapshot.step === "outcome");
|
|
77
|
+
return jsxs("div", {
|
|
78
|
+
"data-testid": tid.inlineFlow(compiled?.flowId ?? `${resource}/actions/${name}`, placementKey),
|
|
79
|
+
"data-buro-host": "inline",
|
|
80
|
+
className: "flex min-h-0 flex-col gap-4",
|
|
81
|
+
children: [stale ? jsxs("div", {
|
|
82
|
+
role: "status",
|
|
83
|
+
"data-buro-flow-state": "stale",
|
|
84
|
+
className: "flex flex-wrap items-center gap-2 text-sm text-muted-foreground",
|
|
85
|
+
children: [jsx("span", { children: text(t, "flow.noLongerApplies", "This action no longer applies") }), jsx(Button, {
|
|
86
|
+
type: "button",
|
|
87
|
+
size: "sm",
|
|
88
|
+
variant: "outline",
|
|
89
|
+
onClick: onDiscard,
|
|
90
|
+
children: text(t, "flow.discard", "Discard")
|
|
91
|
+
})]
|
|
92
|
+
}) : null, opened ? jsx("fieldset", {
|
|
93
|
+
disabled: stale,
|
|
94
|
+
className: "m-0 min-w-0 border-0 p-0",
|
|
95
|
+
children: jsx(HostedFlowScreen, {
|
|
96
|
+
binding,
|
|
97
|
+
host: "inline",
|
|
98
|
+
run,
|
|
99
|
+
compiled,
|
|
100
|
+
label: chrome.labelText,
|
|
101
|
+
record
|
|
102
|
+
})
|
|
103
|
+
}) : jsx(IconLoader2, {
|
|
104
|
+
className: "h-5 w-5 animate-spin self-center",
|
|
105
|
+
"aria-hidden": "true"
|
|
106
|
+
})]
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
//#endregion
|
|
110
|
+
export { InlineFlowHost };
|
|
111
|
+
|
|
112
|
+
//# sourceMappingURL=inline-flow-host-C3H2UpSA.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inline-flow-host-C3H2UpSA.js","names":[],"sources":["../src/flows/inline-flow-host.tsx"],"sourcesContent":["'use client';\n/**\n * The inline host (P6 3.12): an item flow drawn in place in a show tree. The run lives in the\n * placement's lease, held by the screen, so a tab switch away and back finds the typed input and\n * a write in flight, and the flow's attempt slot stays the one P4 keys on (user, flow, record).\n */\nimport type { FlowTarget, Row } from '@burojs/core';\nimport type { InlineLease } from '@burojs/react';\nimport { useOptionalT, useScreenState, useTestIds } from '@burojs/react';\nimport { useFlowRun } from '@burojs/react/flows';\nimport { IconLoader2 } from '@tabler/icons-react';\nimport { type ReactElement, useEffect, useMemo } from 'react';\nimport { Button } from '../primitives/button.js';\nimport { text, useFlowChrome } from './chrome.js';\nimport { type FlowHostBinding, HostedFlowScreen } from './flow-screen.js';\n\nexport interface InlineFlowHostProps {\n /** The resource of an item flow on a record screen; a page names `target` instead. */\n readonly resource?: string;\n readonly name?: string;\n /** The flow, when it is not an item flow of the screen's resource (a page's, P7 3.15). */\n readonly target?: FlowTarget;\n /** The label of a flow with no resource to ask (an app flow's). */\n readonly label?: string;\n /** The record an item flow runs on; none on a page. */\n readonly record?: Row;\n readonly lease?: InlineLease;\n readonly placementKey: string;\n /**\n * The flow no longer applies to the record (its `when` turned false) while the input is dirty\n * or the attempt unresolved: the node stays, read-only, with \"no longer applies\" and Discard.\n */\n readonly stale?: boolean;\n readonly onDiscard?: () => void;\n}\n\nexport function InlineFlowHost({\n resource = '',\n name = '',\n target: givenTarget,\n label,\n record,\n lease,\n placementKey,\n stale = false,\n onDiscard,\n}: InlineFlowHostProps): ReactElement {\n const tid = useTestIds();\n const own = useFlowChrome(resource, name);\n const chrome = label === undefined ? own : { ...own, label, labelText: label };\n const target = useMemo<FlowTarget>(\n () => givenTarget ?? { resource, action: name },\n [givenTarget, resource, name],\n );\n const flow = useFlowRun(target, {\n ...(record === undefined ? {} : { record }),\n surface: 'inline',\n ...(lease === undefined ? {} : { lease }),\n });\n // `then` is this host's to run, once the form it succeeded in has started over.\n flow.holdThen(true);\n const { run, snapshot, compiled } = flow;\n const binding = useMemo<FlowHostBinding>(\n () => ({\n kind: 'inline',\n close: () => flow.reset(),\n finish: () => {\n flow.runThen();\n flow.reset();\n },\n }),\n // biome-ignore lint/correctness/useExhaustiveDependencies: reset and runThen are stable callbacks\n [flow.reset, flow.runThen],\n );\n const holder = useScreenState()?.inline;\n const t = useOptionalT();\n // The lease's guard state, from the run: unsaved input or an unresolved attempt (dirty), a\n // write in flight (locked), and whether a node shows it. The screen's blockers read these\n // when the node is not on screen (tab switched, placement hidden).\n useEffect(() => {\n if (lease === undefined || holder === undefined) return;\n lease.mounted += 1;\n lease.label = chrome.labelText;\n holder.touch();\n return () => {\n lease.mounted -= 1;\n holder.touch();\n };\n }, [lease, holder, chrome.labelText]);\n useEffect(() => {\n if (lease === undefined || holder === undefined || run === null) return;\n const sync = () => {\n const now = run.getSnapshot();\n if (lease.initial === undefined && now.history.includes('open'))\n lease.initial = JSON.stringify(now.values);\n const dirty =\n now.outcome?.outcome !== 'success' &&\n (now.outcome?.outcome === 'unknown' ||\n (lease.initial !== undefined && JSON.stringify(now.values) !== lease.initial));\n const locked = now.control === 'running';\n if (dirty === lease.dirty && locked === lease.locked) return;\n lease.dirty = dirty;\n lease.locked = locked;\n holder.touch();\n };\n sync();\n return run.subscribe(sync);\n }, [lease, holder, run]);\n const opened =\n run !== null &&\n compiled !== null &&\n (snapshot.history.includes('open') || snapshot.step === 'outcome');\n return (\n <div\n data-testid={tid.inlineFlow(compiled?.flowId ?? `${resource}/actions/${name}`, placementKey)}\n data-buro-host=\"inline\"\n className=\"flex min-h-0 flex-col gap-4\"\n >\n {stale ? (\n <div\n role=\"status\"\n data-buro-flow-state=\"stale\"\n className=\"flex flex-wrap items-center gap-2 text-sm text-muted-foreground\"\n >\n <span>{text(t, 'flow.noLongerApplies', 'This action no longer applies')}</span>\n <Button type=\"button\" size=\"sm\" variant=\"outline\" onClick={onDiscard}>\n {text(t, 'flow.discard', 'Discard')}\n </Button>\n </div>\n ) : null}\n {opened ? (\n <fieldset disabled={stale} className=\"m-0 min-w-0 border-0 p-0\">\n <HostedFlowScreen\n binding={binding}\n host=\"inline\"\n run={run}\n compiled={compiled}\n label={chrome.labelText}\n record={record}\n />\n </fieldset>\n ) : (\n <IconLoader2 className=\"h-5 w-5 animate-spin self-center\" aria-hidden=\"true\" />\n )}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;AAoCA,SAAgB,eAAe,EAC7B,WAAW,IACX,OAAO,IACP,QAAQ,aACR,OACA,QACA,OACA,cACA,QAAQ,OACR,aACoC;CACpC,MAAM,MAAM,WAAW;CACvB,MAAM,MAAM,cAAc,UAAU,IAAI;CACxC,MAAM,SAAS,UAAU,KAAA,IAAY,MAAM;EAAE,GAAG;EAAK;EAAO,WAAW;CAAM;CAC7E,MAAM,SAAS,cACP,eAAe;EAAE;EAAU,QAAQ;CAAK,GAC9C;EAAC;EAAa;EAAU;CAAI,CAC9B;CACA,MAAM,OAAO,WAAW,QAAQ;EAC9B,GAAI,WAAW,KAAA,IAAY,CAAC,IAAI,EAAE,OAAO;EACzC,SAAS;EACT,GAAI,UAAU,KAAA,IAAY,CAAC,IAAI,EAAE,MAAM;CACzC,CAAC;CAED,KAAK,SAAS,IAAI;CAClB,MAAM,EAAE,KAAK,UAAU,aAAa;CACpC,MAAM,UAAU,eACP;EACL,MAAM;EACN,aAAa,KAAK,MAAM;EACxB,cAAc;GACZ,KAAK,QAAQ;GACb,KAAK,MAAM;EACb;CACF,IAEA,CAAC,KAAK,OAAO,KAAK,OAAO,CAC3B;CACA,MAAM,SAAS,eAAe,CAAC,EAAE;CACjC,MAAM,IAAI,aAAa;CAIvB,gBAAgB;EACd,IAAI,UAAU,KAAA,KAAa,WAAW,KAAA,GAAW;EACjD,MAAM,WAAW;EACjB,MAAM,QAAQ,OAAO;EACrB,OAAO,MAAM;EACb,aAAa;GACX,MAAM,WAAW;GACjB,OAAO,MAAM;EACf;CACF,GAAG;EAAC;EAAO;EAAQ,OAAO;CAAS,CAAC;CACpC,gBAAgB;EACd,IAAI,UAAU,KAAA,KAAa,WAAW,KAAA,KAAa,QAAQ,MAAM;EACjE,MAAM,aAAa;GACjB,MAAM,MAAM,IAAI,YAAY;GAC5B,IAAI,MAAM,YAAY,KAAA,KAAa,IAAI,QAAQ,SAAS,MAAM,GAC5D,MAAM,UAAU,KAAK,UAAU,IAAI,MAAM;GAC3C,MAAM,QACJ,IAAI,SAAS,YAAY,cACxB,IAAI,SAAS,YAAY,aACvB,MAAM,YAAY,KAAA,KAAa,KAAK,UAAU,IAAI,MAAM,MAAM,MAAM;GACzE,MAAM,SAAS,IAAI,YAAY;GAC/B,IAAI,UAAU,MAAM,SAAS,WAAW,MAAM,QAAQ;GACtD,MAAM,QAAQ;GACd,MAAM,SAAS;GACf,OAAO,MAAM;EACf;EACA,KAAK;EACL,OAAO,IAAI,UAAU,IAAI;CAC3B,GAAG;EAAC;EAAO;EAAQ;CAAG,CAAC;CACvB,MAAM,SACJ,QAAQ,QACR,aAAa,SACZ,SAAS,QAAQ,SAAS,MAAM,KAAK,SAAS,SAAS;CAC1D,OACE,KAAC,OAAD;EACE,eAAa,IAAI,WAAW,UAAU,UAAU,GAAG,SAAS,WAAW,QAAQ,YAAY;EAC3F,kBAAe;EACf,WAAU;EAHZ,UAAA,CAKG,QACC,KAAC,OAAD;GACE,MAAK;GACL,wBAAqB;GACrB,WAAU;GAHZ,UAAA,CAKE,IAAC,QAAD,EAAA,UAAO,KAAK,GAAG,wBAAwB,+BAA+B,EAAQ,CAAA,GAC9E,IAAC,QAAD;IAAQ,MAAK;IAAS,MAAK;IAAK,SAAQ;IAAU,SAAS;IACxD,UAAA,KAAK,GAAG,gBAAgB,SAAS;GAC5B,CAAA,CACL;EACH,CAAA,IAAA,MACH,SACC,IAAC,YAAD;GAAU,UAAU;GAAO,WAAU;GACnC,UAAA,IAAC,kBAAD;IACW;IACT,MAAK;IACA;IACK;IACV,OAAO,OAAO;IACN;GACT,CAAA;EACO,CAAA,IAEV,IAAC,aAAD;GAAa,WAAU;GAAmC,eAAY;EAAQ,CAAA,CAE7E;;AAET"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
const require_use_theme = require("./use-theme-DFlpXils.cjs");
|
|
2
|
+
let react = require("react");
|
|
3
|
+
react = require_use_theme.__toESM(react, 1);
|
|
4
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
5
|
+
//#region src/primitives/input.tsx
|
|
6
|
+
const Input = react.forwardRef(({ className, type, ...props }, ref) => {
|
|
7
|
+
return (0, react_jsx_runtime.jsx)("input", {
|
|
8
|
+
type,
|
|
9
|
+
className: require_use_theme.cn("flex h-9 w-full rounded-md border border-input bg-background text-foreground px-3 py-1 text-base md:text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 disabled:bg-input-disabled", className),
|
|
10
|
+
ref,
|
|
11
|
+
...props
|
|
12
|
+
});
|
|
13
|
+
});
|
|
14
|
+
Input.displayName = "Input";
|
|
15
|
+
//#endregion
|
|
16
|
+
Object.defineProperty(exports, "Input", {
|
|
17
|
+
enumerable: true,
|
|
18
|
+
get: function() {
|
|
19
|
+
return Input;
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
//# sourceMappingURL=input-BI0czGyI.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"input-BI0czGyI.cjs","names":["React","cn"],"sources":["../src/primitives/input.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { cn } from '../lib/cn.js';\n\nexport type InputProps = React.InputHTMLAttributes<HTMLInputElement>;\n\nconst Input = React.forwardRef<HTMLInputElement, InputProps>(\n ({ className, type, ...props }, ref) => {\n return (\n <input\n type={type}\n className={cn(\n 'flex h-9 w-full rounded-md border border-input bg-background text-foreground px-3 py-1 text-base md:text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 disabled:bg-input-disabled',\n className,\n )}\n ref={ref}\n {...props}\n />\n );\n },\n);\nInput.displayName = 'Input';\n\nexport { Input };\n"],"mappings":";;;;;AAOA,MAAM,QAAQA,MAAM,YACjB,EAAE,WAAW,MAAM,GAAG,SAAS,QAAQ;CACtC,QACE,GAAA,kBAAA,IAAA,CAAC,SAAD;EACQ;EACN,WAAWC,kBAAAA,GACT,yZACA,SACF;EACK;EACL,GAAI;CACL,CAAA;AAEL,CACF;AACA,MAAM,cAAc"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { l as cn } from "./use-theme-dnE3Od3I.js";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
//#region src/primitives/input.tsx
|
|
5
|
+
const Input = React.forwardRef(({ className, type, ...props }, ref) => {
|
|
6
|
+
return jsx("input", {
|
|
7
|
+
type,
|
|
8
|
+
className: cn("flex h-9 w-full rounded-md border border-input bg-background text-foreground px-3 py-1 text-base md:text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 disabled:bg-input-disabled", className),
|
|
9
|
+
ref,
|
|
10
|
+
...props
|
|
11
|
+
});
|
|
12
|
+
});
|
|
13
|
+
Input.displayName = "Input";
|
|
14
|
+
//#endregion
|
|
15
|
+
export { Input as t };
|
|
16
|
+
|
|
17
|
+
//# sourceMappingURL=input-CUPStzZO.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"input-CUPStzZO.js","names":[],"sources":["../src/primitives/input.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { cn } from '../lib/cn.js';\n\nexport type InputProps = React.InputHTMLAttributes<HTMLInputElement>;\n\nconst Input = React.forwardRef<HTMLInputElement, InputProps>(\n ({ className, type, ...props }, ref) => {\n return (\n <input\n type={type}\n className={cn(\n 'flex h-9 w-full rounded-md border border-input bg-background text-foreground px-3 py-1 text-base md:text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 disabled:bg-input-disabled',\n className,\n )}\n ref={ref}\n {...props}\n />\n );\n },\n);\nInput.displayName = 'Input';\n\nexport { Input };\n"],"mappings":";;;;AAOA,MAAM,QAAQ,MAAM,YACjB,EAAE,WAAW,MAAM,GAAG,SAAS,QAAQ;CACtC,OACE,IAAC,SAAD;EACQ;EACN,WAAW,GACT,yZACA,SACF;EACK;EACL,GAAI;CACL,CAAA;AAEL,CACF;AACA,MAAM,cAAc"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { l as cn } from "./use-theme-dnE3Od3I.js";
|
|
2
|
+
import { useOptionalT } from "@burojs/react";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { cva } from "class-variance-authority";
|
|
6
|
+
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
7
|
+
//#region src/primitives/label.tsx
|
|
8
|
+
const labelVariants = cva("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70");
|
|
9
|
+
const Label = React.forwardRef(({ className, required, children, ...props }, ref) => {
|
|
10
|
+
const t = useOptionalT();
|
|
11
|
+
return jsxs(LabelPrimitive.Root, {
|
|
12
|
+
ref,
|
|
13
|
+
className: cn(labelVariants(), className),
|
|
14
|
+
...props,
|
|
15
|
+
children: [children, required && jsxs(Fragment$1, { children: [jsx("span", {
|
|
16
|
+
className: "ml-0.5 text-destructive",
|
|
17
|
+
"aria-hidden": "true",
|
|
18
|
+
children: "*"
|
|
19
|
+
}), jsxs("span", {
|
|
20
|
+
className: "sr-only",
|
|
21
|
+
children: [" ", t("validation.requiredHint", { defaultValue: "(required)" })]
|
|
22
|
+
})] })]
|
|
23
|
+
});
|
|
24
|
+
});
|
|
25
|
+
Label.displayName = LabelPrimitive.Root.displayName;
|
|
26
|
+
//#endregion
|
|
27
|
+
export { Label as t };
|
|
28
|
+
|
|
29
|
+
//# sourceMappingURL=label-66W1qbke.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"label-66W1qbke.js","names":[],"sources":["../src/primitives/label.tsx"],"sourcesContent":["'use client';\nimport { useOptionalT } from '@burojs/react';\n\nimport * as React from 'react';\nimport * as LabelPrimitive from '@radix-ui/react-label';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { cn } from '../lib/cn.js';\n\nconst labelVariants = cva(\n 'text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70',\n);\n\nexport type LabelProps = React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root> &\n VariantProps<typeof labelVariants> & {\n /**\n * When true, append a destructive-colored asterisk after the label text\n * plus a screen-reader-only \"(required)\" hint. This is the single-source\n * required-indicator style — every form should render its required-field\n * label as `<Label required>...</Label>` rather than hand-rolling the\n * asterisk markup. The visual asterisk is `aria-hidden`; AT users get\n * the spoken hint via the sr-only span. (Inputs are still expected to\n * carry their own `aria-required` / `required` HTML attributes for the\n * native semantics.)\n */\n required?: boolean;\n };\n\nconst Label = React.forwardRef<React.ElementRef<typeof LabelPrimitive.Root>, LabelProps>(\n ({ className, required, children, ...props }, ref) => {\n // Localized because this renders inside a Russian-primary product; a\n // screen-reader user should not hear an English \"(required)\".\n const t = useOptionalT();\n return (\n <LabelPrimitive.Root ref={ref} className={cn(labelVariants(), className)} {...props}>\n {children}\n {required && (\n <>\n <span className=\"ml-0.5 text-destructive\" aria-hidden=\"true\">\n *\n </span>\n <span className=\"sr-only\">\n {' '}\n {t('validation.requiredHint', { defaultValue: '(required)' })}\n </span>\n </>\n )}\n </LabelPrimitive.Root>\n );\n },\n);\nLabel.displayName = LabelPrimitive.Root.displayName;\n\nexport { Label };\n"],"mappings":";;;;;;;AAQA,MAAM,gBAAgB,IACpB,4FACF;AAiBA,MAAM,QAAQ,MAAM,YACjB,EAAE,WAAW,UAAU,UAAU,GAAG,SAAS,QAAQ;CAGpD,MAAM,IAAI,aAAa;CACvB,OACE,KAAC,eAAe,MAAhB;EAA0B;EAAK,WAAW,GAAG,cAAc,GAAG,SAAS;EAAG,GAAI;EAA9E,UAAA,CACG,UACA,YACC,KAAA,YAAA,EAAA,UAAA,CACE,IAAC,QAAD;GAAM,WAAU;GAA0B,eAAY;GAAO,UAAA;EAEvD,CAAA,GACN,KAAC,QAAD;GAAM,WAAU;GAAhB,UAAA,CACG,KACA,EAAE,2BAA2B,EAAE,cAAc,aAAa,CAAC,CACxD;EACN,CAAA,CAAA,EAAA,CAAA,CAEe;;AAEzB,CACF;AACA,MAAM,cAAc,eAAe,KAAK"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
const require_use_theme = require("./use-theme-DFlpXils.cjs");
|
|
2
|
+
let _burojs_react = require("@burojs/react");
|
|
3
|
+
let react = require("react");
|
|
4
|
+
react = require_use_theme.__toESM(react, 1);
|
|
5
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
6
|
+
let class_variance_authority = require("class-variance-authority");
|
|
7
|
+
let _radix_ui_react_label = require("@radix-ui/react-label");
|
|
8
|
+
_radix_ui_react_label = require_use_theme.__toESM(_radix_ui_react_label, 1);
|
|
9
|
+
//#region src/primitives/label.tsx
|
|
10
|
+
const labelVariants = (0, class_variance_authority.cva)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70");
|
|
11
|
+
const Label = react.forwardRef(({ className, required, children, ...props }, ref) => {
|
|
12
|
+
const t = (0, _burojs_react.useOptionalT)();
|
|
13
|
+
return (0, react_jsx_runtime.jsxs)(_radix_ui_react_label.Root, {
|
|
14
|
+
ref,
|
|
15
|
+
className: require_use_theme.cn(labelVariants(), className),
|
|
16
|
+
...props,
|
|
17
|
+
children: [children, required && (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [(0, react_jsx_runtime.jsx)("span", {
|
|
18
|
+
className: "ml-0.5 text-destructive",
|
|
19
|
+
"aria-hidden": "true",
|
|
20
|
+
children: "*"
|
|
21
|
+
}), (0, react_jsx_runtime.jsxs)("span", {
|
|
22
|
+
className: "sr-only",
|
|
23
|
+
children: [" ", t("validation.requiredHint", { defaultValue: "(required)" })]
|
|
24
|
+
})] })]
|
|
25
|
+
});
|
|
26
|
+
});
|
|
27
|
+
Label.displayName = _radix_ui_react_label.Root.displayName;
|
|
28
|
+
//#endregion
|
|
29
|
+
Object.defineProperty(exports, "Label", {
|
|
30
|
+
enumerable: true,
|
|
31
|
+
get: function() {
|
|
32
|
+
return Label;
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
//# sourceMappingURL=label-w6JYf2cF.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"label-w6JYf2cF.cjs","names":["cva","React","useOptionalT","LabelPrimitive","cn"],"sources":["../src/primitives/label.tsx"],"sourcesContent":["'use client';\nimport { useOptionalT } from '@burojs/react';\n\nimport * as React from 'react';\nimport * as LabelPrimitive from '@radix-ui/react-label';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { cn } from '../lib/cn.js';\n\nconst labelVariants = cva(\n 'text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70',\n);\n\nexport type LabelProps = React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root> &\n VariantProps<typeof labelVariants> & {\n /**\n * When true, append a destructive-colored asterisk after the label text\n * plus a screen-reader-only \"(required)\" hint. This is the single-source\n * required-indicator style — every form should render its required-field\n * label as `<Label required>...</Label>` rather than hand-rolling the\n * asterisk markup. The visual asterisk is `aria-hidden`; AT users get\n * the spoken hint via the sr-only span. (Inputs are still expected to\n * carry their own `aria-required` / `required` HTML attributes for the\n * native semantics.)\n */\n required?: boolean;\n };\n\nconst Label = React.forwardRef<React.ElementRef<typeof LabelPrimitive.Root>, LabelProps>(\n ({ className, required, children, ...props }, ref) => {\n // Localized because this renders inside a Russian-primary product; a\n // screen-reader user should not hear an English \"(required)\".\n const t = useOptionalT();\n return (\n <LabelPrimitive.Root ref={ref} className={cn(labelVariants(), className)} {...props}>\n {children}\n {required && (\n <>\n <span className=\"ml-0.5 text-destructive\" aria-hidden=\"true\">\n *\n </span>\n <span className=\"sr-only\">\n {' '}\n {t('validation.requiredHint', { defaultValue: '(required)' })}\n </span>\n </>\n )}\n </LabelPrimitive.Root>\n );\n },\n);\nLabel.displayName = LabelPrimitive.Root.displayName;\n\nexport { Label };\n"],"mappings":";;;;;;;;;AAQA,MAAM,iBAAA,GAAgBA,yBAAAA,IAAAA,CACpB,4FACF;AAiBA,MAAM,QAAQC,MAAM,YACjB,EAAE,WAAW,UAAU,UAAU,GAAG,SAAS,QAAQ;CAGpD,MAAM,KAAA,GAAIC,cAAAA,aAAAA,CAAa;CACvB,QACE,GAAA,kBAAA,KAAA,CAACC,sBAAe,MAAhB;EAA0B;EAAK,WAAWC,kBAAAA,GAAG,cAAc,GAAG,SAAS;EAAG,GAAI;EAA9E,UAAA,CACG,UACA,aACC,GAAA,kBAAA,KAAA,CAAA,kBAAA,UAAA,EAAA,UAAA,EACE,GAAA,kBAAA,IAAA,CAAC,QAAD;GAAM,WAAU;GAA0B,eAAY;GAAO,UAAA;EAEvD,CAAA,IACN,GAAA,kBAAA,KAAA,CAAC,QAAD;GAAM,WAAU;GAAhB,UAAA,CACG,KACA,EAAE,2BAA2B,EAAE,cAAc,aAAa,CAAC,CACxD;EACN,CAAA,CAAA,EAAA,CAAA,CAEe;;AAEzB,CACF;AACA,MAAM,cAAcD,sBAAe,KAAK"}
|
|
@@ -1,12 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
//#region src/layout/theme-storage-key.ts
|
|
3
|
+
const THEME_STORAGE_KEY = "buro-theme";
|
|
4
|
+
//#endregion
|
|
5
|
+
exports.THEME_STORAGE_KEY = THEME_STORAGE_KEY;
|
|
2
6
|
|
|
3
|
-
var chunkVXJAXJ3U_cjs = require('../chunk-VXJAXJ3U.cjs');
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
Object.defineProperty(exports, "THEME_STORAGE_KEY", {
|
|
8
|
-
enumerable: true,
|
|
9
|
-
get: function () { return chunkVXJAXJ3U_cjs.THEME_STORAGE_KEY; }
|
|
10
|
-
});
|
|
11
|
-
//# sourceMappingURL=theme-storage-key.cjs.map
|
|
12
7
|
//# sourceMappingURL=theme-storage-key.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"theme-storage-key.cjs","names":[],"sources":["../../src/layout/theme-storage-key.ts"],"sourcesContent":["/**\n * The ONE localStorage key every theme-aware place in the app must agree on.\n * Exported so nothing re-types the string — two files agreeing on a literal\n * is how they drift.\n *\n * Deliberately its own module: no `'use client'`, no React import, nothing\n * that would pull in `use-theme.ts`'s hook (or the rest of the kit's client\n * component tree). That matters because the consumer that needs this\n * constant outside a hook is a pre-paint bootstrap `<script>` in a Next root\n * `app/layout.tsx` — a Server Component, which cannot itself carry\n * `'use client'`. `examples/next/app/layout.tsx` is that consumer, and after\n * SP9 deleted `apps/playground` it is the only one; a plain-HTML host has the\n * same need but no module graph to satisfy it from, which is why\n * `examples/marketplace-ops/index.html` spells the key as a literal and pins\n * it against this constant in a test instead.\n * Importing from the package's main entry (`@burojs/ui-shadcn`)\n * there fails Next's server/client boundary check, because that entry\n * bundles the whole kit — including many components that call hooks —\n * into one file without a top-level `'use client'` directive (the bundler\n * drops it when merging multiple client modules together — true of tsdown,\n * as it was of tsup). Importing this file\n * directly via the `@burojs/ui-shadcn/theme-storage-key` subpath sidesteps\n * that: it has no hooks, so a Server Component can import the real string\n * value at build/SSR time. `use-theme.ts` re-exports the same constant for\n * everyone else, so there is exactly one literal in the whole codebase.\n */\nexport const THEME_STORAGE_KEY = 'buro-theme';\n"],"mappings":";;AA0BA,MAAa,oBAAoB"}
|
|
@@ -1,23 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
* Exported so nothing re-types the string — two files agreeing on a literal
|
|
4
|
-
* is how they drift.
|
|
5
|
-
*
|
|
6
|
-
* Deliberately its own module: no `'use client'`, no React import, nothing
|
|
7
|
-
* that would pull in `use-theme.ts`'s hook (or the rest of the kit's client
|
|
8
|
-
* component tree). That matters because the ONE consumer that needs this
|
|
9
|
-
* constant outside a hook is the bootstrap `<script>` in the playground's
|
|
10
|
-
* root `app/layout.tsx` — a Server Component, which cannot itself carry
|
|
11
|
-
* `'use client'`. Importing from the package's main entry (`@burojs/ui-shadcn`)
|
|
12
|
-
* there fails Next's server/client boundary check, because that entry
|
|
13
|
-
* bundles the whole kit — including many components that call hooks —
|
|
14
|
-
* into one file without a top-level `'use client'` directive (tsup drops it
|
|
15
|
-
* when bundling multiple client modules together). Importing this file
|
|
16
|
-
* directly via the `@burojs/ui-shadcn/theme-storage-key` subpath sidesteps
|
|
17
|
-
* that: it has no hooks, so a Server Component can import the real string
|
|
18
|
-
* value at build/SSR time. `use-theme.ts` re-exports the same constant for
|
|
19
|
-
* everyone else, so there is exactly one literal in the whole codebase.
|
|
20
|
-
*/
|
|
21
|
-
declare const THEME_STORAGE_KEY = "buro-theme";
|
|
22
|
-
|
|
23
|
-
export { THEME_STORAGE_KEY };
|
|
1
|
+
import { t as THEME_STORAGE_KEY } from "../theme-storage-key-pYlp4aDS.cjs";
|
|
2
|
+
export { THEME_STORAGE_KEY };
|
|
@@ -1,23 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
* Exported so nothing re-types the string — two files agreeing on a literal
|
|
4
|
-
* is how they drift.
|
|
5
|
-
*
|
|
6
|
-
* Deliberately its own module: no `'use client'`, no React import, nothing
|
|
7
|
-
* that would pull in `use-theme.ts`'s hook (or the rest of the kit's client
|
|
8
|
-
* component tree). That matters because the ONE consumer that needs this
|
|
9
|
-
* constant outside a hook is the bootstrap `<script>` in the playground's
|
|
10
|
-
* root `app/layout.tsx` — a Server Component, which cannot itself carry
|
|
11
|
-
* `'use client'`. Importing from the package's main entry (`@burojs/ui-shadcn`)
|
|
12
|
-
* there fails Next's server/client boundary check, because that entry
|
|
13
|
-
* bundles the whole kit — including many components that call hooks —
|
|
14
|
-
* into one file without a top-level `'use client'` directive (tsup drops it
|
|
15
|
-
* when bundling multiple client modules together). Importing this file
|
|
16
|
-
* directly via the `@burojs/ui-shadcn/theme-storage-key` subpath sidesteps
|
|
17
|
-
* that: it has no hooks, so a Server Component can import the real string
|
|
18
|
-
* value at build/SSR time. `use-theme.ts` re-exports the same constant for
|
|
19
|
-
* everyone else, so there is exactly one literal in the whole codebase.
|
|
20
|
-
*/
|
|
21
|
-
declare const THEME_STORAGE_KEY = "buro-theme";
|
|
22
|
-
|
|
23
|
-
export { THEME_STORAGE_KEY };
|
|
1
|
+
import { t as THEME_STORAGE_KEY } from "../theme-storage-key-pYlp4aDS.js";
|
|
2
|
+
export { THEME_STORAGE_KEY };
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
//#region src/layout/theme-storage-key.ts
|
|
2
|
+
const THEME_STORAGE_KEY = "buro-theme";
|
|
3
|
+
//#endregion
|
|
4
|
+
export { THEME_STORAGE_KEY };
|
|
5
|
+
|
|
3
6
|
//# sourceMappingURL=theme-storage-key.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"theme-storage-key.js","names":[],"sources":["../../src/layout/theme-storage-key.ts"],"sourcesContent":["/**\n * The ONE localStorage key every theme-aware place in the app must agree on.\n * Exported so nothing re-types the string — two files agreeing on a literal\n * is how they drift.\n *\n * Deliberately its own module: no `'use client'`, no React import, nothing\n * that would pull in `use-theme.ts`'s hook (or the rest of the kit's client\n * component tree). That matters because the consumer that needs this\n * constant outside a hook is a pre-paint bootstrap `<script>` in a Next root\n * `app/layout.tsx` — a Server Component, which cannot itself carry\n * `'use client'`. `examples/next/app/layout.tsx` is that consumer, and after\n * SP9 deleted `apps/playground` it is the only one; a plain-HTML host has the\n * same need but no module graph to satisfy it from, which is why\n * `examples/marketplace-ops/index.html` spells the key as a literal and pins\n * it against this constant in a test instead.\n * Importing from the package's main entry (`@burojs/ui-shadcn`)\n * there fails Next's server/client boundary check, because that entry\n * bundles the whole kit — including many components that call hooks —\n * into one file without a top-level `'use client'` directive (the bundler\n * drops it when merging multiple client modules together — true of tsdown,\n * as it was of tsup). Importing this file\n * directly via the `@burojs/ui-shadcn/theme-storage-key` subpath sidesteps\n * that: it has no hooks, so a Server Component can import the real string\n * value at build/SSR time. `use-theme.ts` re-exports the same constant for\n * everyone else, so there is exactly one literal in the whole codebase.\n */\nexport const THEME_STORAGE_KEY = 'buro-theme';\n"],"mappings":";AA0BA,MAAa,oBAAoB"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Suspense, lazy } from "react";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
//#region src/fields/lazy-relation-picker-dialog.tsx
|
|
4
|
+
const Dialog = lazy(() => import("./relation-picker-dialog-hA9rYrZB.js").then((module) => ({ default: module.RelationPickerDialog })));
|
|
5
|
+
function LazyRelationPickerDialog(props) {
|
|
6
|
+
return jsx(Suspense, {
|
|
7
|
+
fallback: null,
|
|
8
|
+
children: jsx(Dialog, { ...props })
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
//#endregion
|
|
12
|
+
export { LazyRelationPickerDialog as t };
|
|
13
|
+
|
|
14
|
+
//# sourceMappingURL=lazy-relation-picker-dialog-2oxnA6IR.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lazy-relation-picker-dialog-2oxnA6IR.js","names":[],"sources":["../src/fields/lazy-relation-picker-dialog.tsx"],"sourcesContent":["import { type ComponentProps, type ReactElement, Suspense, lazy } from 'react';\nimport type { RelationPickerDialog } from './relation-picker-dialog.js';\n\nconst Dialog = lazy(() =>\n import('./relation-picker-dialog.js').then((module) => ({\n default: module.RelationPickerDialog,\n })),\n);\n\n/** The \"Advanced search\" dialog, loaded on the first open: nothing is drawn until it arrives. */\nexport function LazyRelationPickerDialog(\n props: ComponentProps<typeof RelationPickerDialog>,\n): ReactElement {\n return (\n <Suspense fallback={null}>\n <Dialog {...props} />\n </Suspense>\n );\n}\n"],"mappings":";;;AAGA,MAAM,SAAS,WACb,OAAO,uCAA8B,CAAC,MAAM,YAAY,EACtD,SAAS,OAAO,qBAClB,EAAE,CACJ;AAGA,SAAgB,yBACd,OACc;CACd,OACE,IAAC,UAAD;EAAU,UAAU;EAClB,UAAA,IAAC,QAAD,EAAQ,GAAI,MAAQ,CAAA;CACZ,CAAA;AAEd"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
let react = require("react");
|
|
2
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
3
|
+
//#region src/fields/lazy-relation-picker-dialog.tsx
|
|
4
|
+
const Dialog = (0, react.lazy)(() => Promise.resolve().then(() => require("./relation-picker-dialog-M0pQaWlp.cjs")).then((module) => ({ default: module.RelationPickerDialog })));
|
|
5
|
+
function LazyRelationPickerDialog(props) {
|
|
6
|
+
return (0, react_jsx_runtime.jsx)(react.Suspense, {
|
|
7
|
+
fallback: null,
|
|
8
|
+
children: (0, react_jsx_runtime.jsx)(Dialog, { ...props })
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
//#endregion
|
|
12
|
+
Object.defineProperty(exports, "LazyRelationPickerDialog", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function() {
|
|
15
|
+
return LazyRelationPickerDialog;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
//# sourceMappingURL=lazy-relation-picker-dialog-BfAGKzUG.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lazy-relation-picker-dialog-BfAGKzUG.cjs","names":["lazy","Suspense"],"sources":["../src/fields/lazy-relation-picker-dialog.tsx"],"sourcesContent":["import { type ComponentProps, type ReactElement, Suspense, lazy } from 'react';\nimport type { RelationPickerDialog } from './relation-picker-dialog.js';\n\nconst Dialog = lazy(() =>\n import('./relation-picker-dialog.js').then((module) => ({\n default: module.RelationPickerDialog,\n })),\n);\n\n/** The \"Advanced search\" dialog, loaded on the first open: nothing is drawn until it arrives. */\nexport function LazyRelationPickerDialog(\n props: ComponentProps<typeof RelationPickerDialog>,\n): ReactElement {\n return (\n <Suspense fallback={null}>\n <Dialog {...props} />\n </Suspense>\n );\n}\n"],"mappings":";;;AAGA,MAAM,UAAA,GAASA,MAAAA,KAAAA,OAAAA,QAAAA,QAAAA,CAAAA,CAAAA,WAAAA,QACb,uCAAA,CAAA,CAAA,CAAsC,MAAM,YAAY,EACtD,SAAS,OAAO,qBAClB,EAAE,CACJ;AAGA,SAAgB,yBACd,OACc;CACd,QACE,GAAA,kBAAA,IAAA,CAACC,MAAAA,UAAD;EAAU,UAAU;EAClB,WAAA,GAAA,kBAAA,IAAA,CAAC,QAAD,EAAQ,GAAI,MAAQ,CAAA;CACZ,CAAA;AAEd"}
|