@conductor-by-89soone/react 0.3.0 → 0.4.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 +231 -0
- package/dist/action.js +62 -3
- package/dist/cx.js +10 -1
- package/dist/data.js +65 -2
- package/dist/feedback.js +65 -2
- package/dist/form.js +115 -2
- package/dist/index.d.ts +7 -1
- package/dist/index.js +70 -15
- package/dist/interaction.d.ts +37 -0
- package/dist/interaction.js +47 -0
- package/dist/overlay.js +227 -2
- package/dist/relation.d.ts +56 -0
- package/dist/relation.js +215 -0
- package/dist/shell.d.ts +7 -1
- package/dist/shell.js +158 -2
- package/dist/status.js +35 -2
- package/dist/stylesheet-warning.d.ts +8 -0
- package/dist/{chunk-WEIMKRZV.js → stylesheet-warning.js} +5 -13
- package/dist/surface.js +45 -2
- package/dist/types.js +0 -1
- package/dist/workbench.d.ts +125 -0
- package/dist/workbench.js +200 -0
- package/package.json +13 -5
- package/dist/chunk-3YDK2JBK.js +0 -103
- package/dist/chunk-535YGQAR.js +0 -32
- package/dist/chunk-G7TRTZRR.js +0 -60
- package/dist/chunk-MR7FIZKV.js +0 -221
- package/dist/chunk-NF3ZHADJ.js +0 -60
- package/dist/chunk-R5BLKHR2.js +0 -81
- package/dist/chunk-RBD5Z2LR.js +0 -58
- package/dist/chunk-TUHWL5JC.js +0 -42
package/dist/chunk-MR7FIZKV.js
DELETED
|
@@ -1,221 +0,0 @@
|
|
|
1
|
-
import { cx } from './chunk-WEIMKRZV.js';
|
|
2
|
-
import * as RadixDialog from '@radix-ui/react-dialog';
|
|
3
|
-
import * as RadixDropdownMenu from '@radix-ui/react-dropdown-menu';
|
|
4
|
-
import * as RadixTooltip from '@radix-ui/react-tooltip';
|
|
5
|
-
import { forwardRef } from 'react';
|
|
6
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
7
|
-
|
|
8
|
-
var DialogContent = forwardRef(
|
|
9
|
-
function DialogContent2({ children, className, size = "md", ...props }, ref) {
|
|
10
|
-
return /* @__PURE__ */ jsxs(RadixDialog.Portal, { children: [
|
|
11
|
-
/* @__PURE__ */ jsx(RadixDialog.Overlay, { className: "cdt-overlay" }),
|
|
12
|
-
/* @__PURE__ */ jsx(
|
|
13
|
-
RadixDialog.Content,
|
|
14
|
-
{
|
|
15
|
-
...props,
|
|
16
|
-
ref,
|
|
17
|
-
className: cx(
|
|
18
|
-
"cdt-dialog",
|
|
19
|
-
size === "sm" && "cdt-dialog--sm",
|
|
20
|
-
className
|
|
21
|
-
),
|
|
22
|
-
children
|
|
23
|
-
}
|
|
24
|
-
)
|
|
25
|
-
] });
|
|
26
|
-
}
|
|
27
|
-
);
|
|
28
|
-
DialogContent.displayName = "Dialog.Content";
|
|
29
|
-
var DialogTitle = forwardRef(function DialogTitle2({ className, ...props }, ref) {
|
|
30
|
-
return /* @__PURE__ */ jsx(
|
|
31
|
-
RadixDialog.Title,
|
|
32
|
-
{
|
|
33
|
-
...props,
|
|
34
|
-
ref,
|
|
35
|
-
className: cx("cdt-dialog__title", className)
|
|
36
|
-
}
|
|
37
|
-
);
|
|
38
|
-
});
|
|
39
|
-
DialogTitle.displayName = "Dialog.Title";
|
|
40
|
-
var DialogDescription = forwardRef(function DialogDescription2({ className, ...props }, ref) {
|
|
41
|
-
return /* @__PURE__ */ jsx(
|
|
42
|
-
RadixDialog.Description,
|
|
43
|
-
{
|
|
44
|
-
...props,
|
|
45
|
-
ref,
|
|
46
|
-
className: cx("cdt-dialog__description", className)
|
|
47
|
-
}
|
|
48
|
-
);
|
|
49
|
-
});
|
|
50
|
-
DialogDescription.displayName = "Dialog.Description";
|
|
51
|
-
var DialogClose = forwardRef(
|
|
52
|
-
function DialogClose2({ asChild = false, className, ...props }, ref) {
|
|
53
|
-
return /* @__PURE__ */ jsx(
|
|
54
|
-
RadixDialog.Close,
|
|
55
|
-
{
|
|
56
|
-
...props,
|
|
57
|
-
ref,
|
|
58
|
-
asChild,
|
|
59
|
-
className: cx(
|
|
60
|
-
"cdt-dialog__close",
|
|
61
|
-
!asChild && "cdt-btn",
|
|
62
|
-
!asChild && "cdt-btn--secondary",
|
|
63
|
-
!asChild && "cdt-btn--sm",
|
|
64
|
-
className
|
|
65
|
-
)
|
|
66
|
-
}
|
|
67
|
-
);
|
|
68
|
-
}
|
|
69
|
-
);
|
|
70
|
-
DialogClose.displayName = "Dialog.Close";
|
|
71
|
-
var Dialog = {
|
|
72
|
-
Root: RadixDialog.Root,
|
|
73
|
-
Trigger: RadixDialog.Trigger,
|
|
74
|
-
Content: DialogContent,
|
|
75
|
-
Title: DialogTitle,
|
|
76
|
-
Description: DialogDescription,
|
|
77
|
-
Close: DialogClose
|
|
78
|
-
};
|
|
79
|
-
var DrawerContent = forwardRef(
|
|
80
|
-
function DrawerContent2({ children, className, side = "right", ...props }, ref) {
|
|
81
|
-
return /* @__PURE__ */ jsxs(RadixDialog.Portal, { children: [
|
|
82
|
-
/* @__PURE__ */ jsx(RadixDialog.Overlay, { className: "cdt-overlay" }),
|
|
83
|
-
/* @__PURE__ */ jsx(
|
|
84
|
-
RadixDialog.Content,
|
|
85
|
-
{
|
|
86
|
-
...props,
|
|
87
|
-
ref,
|
|
88
|
-
className: cx("cdt-drawer", `cdt-drawer--${side}`, className),
|
|
89
|
-
children
|
|
90
|
-
}
|
|
91
|
-
)
|
|
92
|
-
] });
|
|
93
|
-
}
|
|
94
|
-
);
|
|
95
|
-
DrawerContent.displayName = "Drawer.Content";
|
|
96
|
-
var DrawerTitle = forwardRef(function DrawerTitle2({ className, ...props }, ref) {
|
|
97
|
-
return /* @__PURE__ */ jsx(
|
|
98
|
-
RadixDialog.Title,
|
|
99
|
-
{
|
|
100
|
-
...props,
|
|
101
|
-
ref,
|
|
102
|
-
className: cx("cdt-drawer__title", className)
|
|
103
|
-
}
|
|
104
|
-
);
|
|
105
|
-
});
|
|
106
|
-
DrawerTitle.displayName = "Drawer.Title";
|
|
107
|
-
var DrawerClose = forwardRef(
|
|
108
|
-
function DrawerClose2({ asChild = false, className, ...props }, ref) {
|
|
109
|
-
return /* @__PURE__ */ jsx(
|
|
110
|
-
RadixDialog.Close,
|
|
111
|
-
{
|
|
112
|
-
...props,
|
|
113
|
-
ref,
|
|
114
|
-
asChild,
|
|
115
|
-
className: cx(
|
|
116
|
-
"cdt-drawer__close",
|
|
117
|
-
!asChild && "cdt-btn",
|
|
118
|
-
!asChild && "cdt-btn--secondary",
|
|
119
|
-
!asChild && "cdt-btn--sm",
|
|
120
|
-
className
|
|
121
|
-
)
|
|
122
|
-
}
|
|
123
|
-
);
|
|
124
|
-
}
|
|
125
|
-
);
|
|
126
|
-
DrawerClose.displayName = "Drawer.Close";
|
|
127
|
-
var Drawer = {
|
|
128
|
-
Root: RadixDialog.Root,
|
|
129
|
-
Trigger: RadixDialog.Trigger,
|
|
130
|
-
Content: DrawerContent,
|
|
131
|
-
Title: DrawerTitle,
|
|
132
|
-
Description: RadixDialog.Description,
|
|
133
|
-
Close: DrawerClose
|
|
134
|
-
};
|
|
135
|
-
var TooltipContent = forwardRef(
|
|
136
|
-
function TooltipContent2({ children, className, showArrow = true, ...props }, ref) {
|
|
137
|
-
return /* @__PURE__ */ jsx(RadixTooltip.Portal, { children: /* @__PURE__ */ jsxs(
|
|
138
|
-
RadixTooltip.Content,
|
|
139
|
-
{
|
|
140
|
-
...props,
|
|
141
|
-
ref,
|
|
142
|
-
className: cx("cdt-tooltip", className),
|
|
143
|
-
children: [
|
|
144
|
-
children,
|
|
145
|
-
showArrow ? /* @__PURE__ */ jsx(RadixTooltip.Arrow, { className: "cdt-tooltip__arrow" }) : null
|
|
146
|
-
]
|
|
147
|
-
}
|
|
148
|
-
) });
|
|
149
|
-
}
|
|
150
|
-
);
|
|
151
|
-
TooltipContent.displayName = "Tooltip.Content";
|
|
152
|
-
var Tooltip = {
|
|
153
|
-
Provider: RadixTooltip.Provider,
|
|
154
|
-
Root: RadixTooltip.Root,
|
|
155
|
-
Trigger: RadixTooltip.Trigger,
|
|
156
|
-
Content: TooltipContent
|
|
157
|
-
};
|
|
158
|
-
var DropdownMenuContent = forwardRef(function DropdownMenuContent2({ className, ...props }, ref) {
|
|
159
|
-
return /* @__PURE__ */ jsx(RadixDropdownMenu.Portal, { children: /* @__PURE__ */ jsx(
|
|
160
|
-
RadixDropdownMenu.Content,
|
|
161
|
-
{
|
|
162
|
-
...props,
|
|
163
|
-
ref,
|
|
164
|
-
className: cx("cdt-menu", className)
|
|
165
|
-
}
|
|
166
|
-
) });
|
|
167
|
-
});
|
|
168
|
-
DropdownMenuContent.displayName = "DropdownMenu.Content";
|
|
169
|
-
var DropdownMenuItem = forwardRef(
|
|
170
|
-
function DropdownMenuItem2({ children, className, icon, tone = "neutral", ...props }, ref) {
|
|
171
|
-
return /* @__PURE__ */ jsxs(
|
|
172
|
-
RadixDropdownMenu.Item,
|
|
173
|
-
{
|
|
174
|
-
...props,
|
|
175
|
-
ref,
|
|
176
|
-
className: cx(
|
|
177
|
-
"cdt-menu__item",
|
|
178
|
-
tone === "danger" && "cdt-menu__item--danger",
|
|
179
|
-
className
|
|
180
|
-
),
|
|
181
|
-
children: [
|
|
182
|
-
icon === void 0 ? null : /* @__PURE__ */ jsx("span", { className: "cdt-menu__item-icon", "aria-hidden": "true", children: icon }),
|
|
183
|
-
children
|
|
184
|
-
]
|
|
185
|
-
}
|
|
186
|
-
);
|
|
187
|
-
}
|
|
188
|
-
);
|
|
189
|
-
DropdownMenuItem.displayName = "DropdownMenu.Item";
|
|
190
|
-
var DropdownMenuLabel = forwardRef(function DropdownMenuLabel2({ className, ...props }, ref) {
|
|
191
|
-
return /* @__PURE__ */ jsx(
|
|
192
|
-
RadixDropdownMenu.Label,
|
|
193
|
-
{
|
|
194
|
-
...props,
|
|
195
|
-
ref,
|
|
196
|
-
className: cx("cdt-menu__label", className)
|
|
197
|
-
}
|
|
198
|
-
);
|
|
199
|
-
});
|
|
200
|
-
DropdownMenuLabel.displayName = "DropdownMenu.Label";
|
|
201
|
-
var DropdownMenuSeparator = forwardRef(function DropdownMenuSeparator2({ className, ...props }, ref) {
|
|
202
|
-
return /* @__PURE__ */ jsx(
|
|
203
|
-
RadixDropdownMenu.Separator,
|
|
204
|
-
{
|
|
205
|
-
...props,
|
|
206
|
-
ref,
|
|
207
|
-
className: cx("cdt-menu__separator", className)
|
|
208
|
-
}
|
|
209
|
-
);
|
|
210
|
-
});
|
|
211
|
-
DropdownMenuSeparator.displayName = "DropdownMenu.Separator";
|
|
212
|
-
var DropdownMenu = {
|
|
213
|
-
Root: RadixDropdownMenu.Root,
|
|
214
|
-
Trigger: RadixDropdownMenu.Trigger,
|
|
215
|
-
Content: DropdownMenuContent,
|
|
216
|
-
Item: DropdownMenuItem,
|
|
217
|
-
Label: DropdownMenuLabel,
|
|
218
|
-
Separator: DropdownMenuSeparator
|
|
219
|
-
};
|
|
220
|
-
|
|
221
|
-
export { Dialog, Drawer, DropdownMenu, Tooltip };
|
package/dist/chunk-NF3ZHADJ.js
DELETED
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { cx } from './chunk-WEIMKRZV.js';
|
|
2
|
-
import { forwardRef, useEffect } from 'react';
|
|
3
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
4
|
-
|
|
5
|
-
var Banner = forwardRef(function Banner2({ action, children, className, icon, title, tone = "info", ...props }, ref) {
|
|
6
|
-
useEffect(() => {
|
|
7
|
-
if (process.env.NODE_ENV !== "production" && tone === "danger" && action === void 0) console.warn('[conductor] Banner tone="danger" requires a recovery action.');
|
|
8
|
-
}, [action, tone]);
|
|
9
|
-
return /* @__PURE__ */ jsxs("div", { ...props, ref, role: tone === "danger" ? "alert" : "status", className: cx("cdt-banner", `cdt-banner--${tone}`, className), children: [
|
|
10
|
-
icon === void 0 ? null : /* @__PURE__ */ jsx("span", { className: "cdt-banner__icon", "aria-hidden": "true", children: icon }),
|
|
11
|
-
/* @__PURE__ */ jsxs("div", { className: "cdt-banner__body", children: [
|
|
12
|
-
title === void 0 ? null : /* @__PURE__ */ jsx("div", { className: "cdt-banner__title", children: title }),
|
|
13
|
-
children
|
|
14
|
-
] }),
|
|
15
|
-
action === void 0 ? null : /* @__PURE__ */ jsx("div", { className: "cdt-banner__action", children: action })
|
|
16
|
-
] });
|
|
17
|
-
});
|
|
18
|
-
Banner.displayName = "Banner";
|
|
19
|
-
var EmptyState = forwardRef(function EmptyState2({ action, className, description, icon, title, ...props }, ref) {
|
|
20
|
-
return /* @__PURE__ */ jsxs("div", { ...props, ref, className: cx("cdt-empty-state", className), children: [
|
|
21
|
-
icon === void 0 ? null : /* @__PURE__ */ jsx("div", { className: "cdt-empty-state__icon", "aria-hidden": "true", children: icon }),
|
|
22
|
-
/* @__PURE__ */ jsx("div", { className: "cdt-empty-state__title", children: title }),
|
|
23
|
-
description === void 0 ? null : /* @__PURE__ */ jsx("div", { className: "cdt-empty-state__description", children: description }),
|
|
24
|
-
action === void 0 ? null : /* @__PURE__ */ jsx("div", { className: "cdt-empty-state__action", children: action })
|
|
25
|
-
] });
|
|
26
|
-
});
|
|
27
|
-
EmptyState.displayName = "EmptyState";
|
|
28
|
-
var ratio = (value, min, max) => max <= min ? 0 : Math.min(1, Math.max(0, (value - min) / (max - min)));
|
|
29
|
-
var Meter = forwardRef(function Meter2({ "aria-label": ariaLabel, className, exceededAt, max = 100, min = 0, style, value, valueText, warningAt, ...props }, ref) {
|
|
30
|
-
const tone = exceededAt !== void 0 && value >= exceededAt ? "exceeded" : warningAt !== void 0 && value >= warningAt ? "warning" : "normal";
|
|
31
|
-
const meterStyle = { ...style, "--cdt-meter-ratio": String(ratio(value, min, max)) };
|
|
32
|
-
return /* @__PURE__ */ jsxs("div", { ...props, ref, style: meterStyle, role: "meter", "aria-label": ariaLabel, "aria-valuenow": value, "aria-valuemin": min, "aria-valuemax": max, "aria-valuetext": valueText, className: cx("cdt-meter", `cdt-meter--${tone}`, className), children: [
|
|
33
|
-
/* @__PURE__ */ jsx("div", { className: "cdt-meter__track", children: /* @__PURE__ */ jsx("div", { className: "cdt-meter__fill" }) }),
|
|
34
|
-
/* @__PURE__ */ jsx("span", { className: "cdt-meter__value", children: valueText })
|
|
35
|
-
] });
|
|
36
|
-
});
|
|
37
|
-
Meter.displayName = "Meter";
|
|
38
|
-
var ProgressRing = forwardRef(function ProgressRing2({ "aria-label": ariaLabel, className, max = 100, size = "md", style, value, valueText, ...props }, ref) {
|
|
39
|
-
const ringStyle = { ...style, "--cdt-progress-ring-ratio": String(ratio(value, 0, max)) };
|
|
40
|
-
return /* @__PURE__ */ jsxs("div", { ...props, ref, style: ringStyle, role: "progressbar", "aria-label": ariaLabel, "aria-valuenow": value, "aria-valuemin": 0, "aria-valuemax": max, "aria-valuetext": valueText, className: cx("cdt-progress-ring", size === "sm" && "cdt-progress-ring--sm", className), children: [
|
|
41
|
-
/* @__PURE__ */ jsxs("svg", { "aria-hidden": "true", viewBox: "0 0 32 32", children: [
|
|
42
|
-
/* @__PURE__ */ jsx("circle", { className: "cdt-progress-ring__track", cx: "16", cy: "16", r: "14" }),
|
|
43
|
-
/* @__PURE__ */ jsx("circle", { className: "cdt-progress-ring__indicator", cx: "16", cy: "16", r: "14" })
|
|
44
|
-
] }),
|
|
45
|
-
/* @__PURE__ */ jsx("span", { className: "cdt-progress-ring__label", children: valueText })
|
|
46
|
-
] });
|
|
47
|
-
});
|
|
48
|
-
ProgressRing.displayName = "ProgressRing";
|
|
49
|
-
var Spinner = forwardRef(function Spinner2({ className, label, size = "md", ...props }, ref) {
|
|
50
|
-
return /* @__PURE__ */ jsxs("div", { ...props, ref, role: "status", "aria-live": "polite", className: cx("cdt-spinner", size === "sm" && "cdt-spinner--sm", className), children: [
|
|
51
|
-
/* @__PURE__ */ jsxs("svg", { "aria-hidden": "true", viewBox: "0 0 32 32", children: [
|
|
52
|
-
/* @__PURE__ */ jsx("circle", { className: "cdt-spinner__track", cx: "16", cy: "16", r: "14" }),
|
|
53
|
-
/* @__PURE__ */ jsx("circle", { className: "cdt-spinner__indicator", cx: "16", cy: "16", r: "14" })
|
|
54
|
-
] }),
|
|
55
|
-
/* @__PURE__ */ jsx("span", { className: "cdt-spinner__label", children: label })
|
|
56
|
-
] });
|
|
57
|
-
});
|
|
58
|
-
Spinner.displayName = "Spinner";
|
|
59
|
-
|
|
60
|
-
export { Banner, EmptyState, Meter, ProgressRing, Spinner };
|
package/dist/chunk-R5BLKHR2.js
DELETED
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import { cx } from './chunk-WEIMKRZV.js';
|
|
2
|
-
import * as RadixDialog from '@radix-ui/react-dialog';
|
|
3
|
-
import { forwardRef, useRef, Fragment as Fragment$1 } from 'react';
|
|
4
|
-
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
5
|
-
|
|
6
|
-
var AppShell = forwardRef(function AppShell2({
|
|
7
|
-
children,
|
|
8
|
-
className,
|
|
9
|
-
mainId = "cdt-main",
|
|
10
|
-
nav,
|
|
11
|
-
navCloseLabel = "Close navigation",
|
|
12
|
-
navOpen,
|
|
13
|
-
onNavOpenChange,
|
|
14
|
-
skipLinkLabel,
|
|
15
|
-
topBar,
|
|
16
|
-
...props
|
|
17
|
-
}, ref) {
|
|
18
|
-
const mainRef = useRef(null);
|
|
19
|
-
return /* @__PURE__ */ jsxs(RadixDialog.Root, { modal: false, open: navOpen, onOpenChange: onNavOpenChange, children: [
|
|
20
|
-
/* @__PURE__ */ jsxs("div", { ...props, ref, className: cx("cdt-app-shell", className), children: [
|
|
21
|
-
/* @__PURE__ */ jsx(
|
|
22
|
-
"a",
|
|
23
|
-
{
|
|
24
|
-
className: "cdt-skip-link",
|
|
25
|
-
href: `#${mainId}`,
|
|
26
|
-
onClick: (event) => {
|
|
27
|
-
event.preventDefault();
|
|
28
|
-
mainRef.current?.focus();
|
|
29
|
-
},
|
|
30
|
-
children: skipLinkLabel
|
|
31
|
-
}
|
|
32
|
-
),
|
|
33
|
-
/* @__PURE__ */ jsx("aside", { className: "cdt-app-shell__nav", "aria-hidden": navOpen || void 0, children: navOpen ? null : nav }),
|
|
34
|
-
/* @__PURE__ */ jsxs("div", { className: "cdt-app-shell__content", children: [
|
|
35
|
-
topBar,
|
|
36
|
-
/* @__PURE__ */ jsx("main", { ref: mainRef, id: mainId, className: "cdt-app-shell__main", tabIndex: -1, children })
|
|
37
|
-
] })
|
|
38
|
-
] }),
|
|
39
|
-
/* @__PURE__ */ jsxs(RadixDialog.Portal, { children: [
|
|
40
|
-
/* @__PURE__ */ jsx(RadixDialog.Close, { asChild: true, children: /* @__PURE__ */ jsx("button", { type: "button", className: "cdt-app-shell__overlay", "aria-label": navCloseLabel }) }),
|
|
41
|
-
/* @__PURE__ */ jsxs(RadixDialog.Content, { className: "cdt-app-shell__nav", "data-mobile": "", children: [
|
|
42
|
-
/* @__PURE__ */ jsx(RadixDialog.Title, { className: "cdt-sr-only", children: "Navigation" }),
|
|
43
|
-
nav
|
|
44
|
-
] })
|
|
45
|
-
] })
|
|
46
|
-
] });
|
|
47
|
-
});
|
|
48
|
-
AppShell.displayName = "AppShell";
|
|
49
|
-
var NavList = forwardRef(function NavList2({ className, items, renderLink, ...props }, ref) {
|
|
50
|
-
let previousSection;
|
|
51
|
-
return /* @__PURE__ */ jsx("nav", { ...props, ref, className: cx("cdt-nav-list", className), children: /* @__PURE__ */ jsx("ul", { className: "cdt-nav-list__items", children: items.map((item) => {
|
|
52
|
-
const showSection = item.section !== void 0 && item.section !== previousSection;
|
|
53
|
-
previousSection = item.section;
|
|
54
|
-
const linkProps = {
|
|
55
|
-
className: cx("cdt-nav-list__item", item.active && "cdt-nav-list__item--active"),
|
|
56
|
-
"aria-current": item.active ? "page" : void 0,
|
|
57
|
-
children: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
58
|
-
item.icon === void 0 ? null : /* @__PURE__ */ jsx("span", { className: "cdt-nav-list__icon", "aria-hidden": "true", children: item.icon }),
|
|
59
|
-
/* @__PURE__ */ jsx("span", { children: item.label })
|
|
60
|
-
] })
|
|
61
|
-
};
|
|
62
|
-
return /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
63
|
-
showSection ? /* @__PURE__ */ jsx("li", { className: "cdt-nav-list__section-label", children: item.section }) : null,
|
|
64
|
-
/* @__PURE__ */ jsx("li", { children: renderLink(item, linkProps) })
|
|
65
|
-
] }, item.id);
|
|
66
|
-
}) }) });
|
|
67
|
-
});
|
|
68
|
-
NavList.displayName = "NavList";
|
|
69
|
-
var TopBar = forwardRef(function TopBar2({ actions, className, eyebrow, menuButton, title, ...props }, ref) {
|
|
70
|
-
return /* @__PURE__ */ jsxs("header", { ...props, ref, className: cx("cdt-topbar", className), title: typeof title === "string" ? title : void 0, children: [
|
|
71
|
-
menuButton === void 0 ? null : /* @__PURE__ */ jsx("div", { className: "cdt-topbar__menu-button", children: menuButton }),
|
|
72
|
-
eyebrow === void 0 && title === void 0 ? null : /* @__PURE__ */ jsxs("div", { className: "cdt-topbar__context", children: [
|
|
73
|
-
eyebrow === void 0 ? null : /* @__PURE__ */ jsx("div", { className: "cdt-topbar__eyebrow", children: eyebrow }),
|
|
74
|
-
title === void 0 ? null : /* @__PURE__ */ jsx("div", { className: "cdt-topbar__title", children: title })
|
|
75
|
-
] }),
|
|
76
|
-
actions === void 0 ? null : /* @__PURE__ */ jsx("div", { className: "cdt-topbar__actions", children: actions })
|
|
77
|
-
] });
|
|
78
|
-
});
|
|
79
|
-
TopBar.displayName = "TopBar";
|
|
80
|
-
|
|
81
|
-
export { AppShell, NavList, TopBar };
|
package/dist/chunk-RBD5Z2LR.js
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { cx } from './chunk-WEIMKRZV.js';
|
|
2
|
-
import { forwardRef, useEffect } from 'react';
|
|
3
|
-
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
4
|
-
|
|
5
|
-
var TableHead = forwardRef(function TableHead2({ className, ...props }, ref) {
|
|
6
|
-
return /* @__PURE__ */ jsx("thead", { ...props, ref, className: cx("cdt-table__head", className) });
|
|
7
|
-
});
|
|
8
|
-
TableHead.displayName = "Table.Head";
|
|
9
|
-
var TableBody = forwardRef(function TableBody2({ className, ...props }, ref) {
|
|
10
|
-
return /* @__PURE__ */ jsx("tbody", { ...props, ref, className: cx("cdt-table__body", className) });
|
|
11
|
-
});
|
|
12
|
-
TableBody.displayName = "Table.Body";
|
|
13
|
-
var TableRow = forwardRef(function TableRow2({ className, ...props }, ref) {
|
|
14
|
-
return /* @__PURE__ */ jsx("tr", { ...props, ref, className: cx("cdt-table__row", className) });
|
|
15
|
-
});
|
|
16
|
-
TableRow.displayName = "Table.Row";
|
|
17
|
-
var TableHeaderCell = forwardRef(function TableHeaderCell2({ className, scope = "col", ...props }, ref) {
|
|
18
|
-
return /* @__PURE__ */ jsx("th", { ...props, ref, scope, className: cx("cdt-table__header-cell", className) });
|
|
19
|
-
});
|
|
20
|
-
TableHeaderCell.displayName = "Table.HeaderCell";
|
|
21
|
-
var TableCell = forwardRef(function TableCell2({ className, numeric = false, ...props }, ref) {
|
|
22
|
-
return /* @__PURE__ */ jsx("td", { ...props, ref, className: cx("cdt-table__cell", numeric && "cdt-num", className) });
|
|
23
|
-
});
|
|
24
|
-
TableCell.displayName = "Table.Cell";
|
|
25
|
-
var Table = Object.assign(forwardRef(function Table2({ "aria-label": ariaLabel, caption, children, className, scrollContainerProps, ...props }, ref) {
|
|
26
|
-
useEffect(() => {
|
|
27
|
-
if (process.env.NODE_ENV !== "production" && caption == null && ariaLabel === void 0) {
|
|
28
|
-
console.warn("[conductor] Table requires a caption or aria-label.");
|
|
29
|
-
}
|
|
30
|
-
}, [ariaLabel, caption]);
|
|
31
|
-
return /* @__PURE__ */ jsx("div", { ...scrollContainerProps, ...props, ref, tabIndex: props.tabIndex ?? scrollContainerProps?.tabIndex ?? 0, "aria-label": ariaLabel, className: cx("cdt-table__scroll", scrollContainerProps?.className, className), children: /* @__PURE__ */ jsxs("table", { "aria-label": ariaLabel, className: "cdt-table", children: [
|
|
32
|
-
caption == null ? null : /* @__PURE__ */ jsx("caption", { children: caption }),
|
|
33
|
-
children
|
|
34
|
-
] }) });
|
|
35
|
-
}), { Head: TableHead, Body: TableBody, Row: TableRow, HeaderCell: TableHeaderCell, Cell: TableCell });
|
|
36
|
-
var TimelineStep = forwardRef(function TimelineStep2({ children, className, marker, onSelect, selected = false, ...props }, ref) {
|
|
37
|
-
const stepClassName = cx("cdt-timeline__step", onSelect !== void 0 && "cdt-timeline__step--interactive", className);
|
|
38
|
-
const markerNode = /* @__PURE__ */ jsx("span", { className: "cdt-timeline__marker", "aria-hidden": "true", children: marker });
|
|
39
|
-
const content = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
40
|
-
markerNode,
|
|
41
|
-
children
|
|
42
|
-
] });
|
|
43
|
-
return /* @__PURE__ */ jsx("li", { ref, children: onSelect === void 0 ? /* @__PURE__ */ jsx("div", { ...props, "aria-current": selected ? "step" : void 0, className: stepClassName, children: content }) : /* @__PURE__ */ jsx("button", { ...props, type: "button", "aria-current": selected ? "step" : void 0, onClick: () => onSelect(), className: stepClassName, children: content }) });
|
|
44
|
-
});
|
|
45
|
-
TimelineStep.displayName = "Timeline.Step";
|
|
46
|
-
var Timeline = Object.assign(forwardRef(function Timeline2({ className, ...props }, ref) {
|
|
47
|
-
return /* @__PURE__ */ jsx("ol", { ...props, ref, className: cx("cdt-timeline", className) });
|
|
48
|
-
}), { Step: TimelineStep });
|
|
49
|
-
var CodeBlock = forwardRef(function CodeBlock2({ className, code, language, ...props }, ref) {
|
|
50
|
-
return /* @__PURE__ */ jsx("div", { ...props, ref, role: "region", tabIndex: 0, "data-language": language, className: cx("cdt-code-block", className), children: /* @__PURE__ */ jsx("pre", { className: "cdt-code-block__pre", children: /* @__PURE__ */ jsx("code", { className: "cdt-code-block__code", children: code }) }) });
|
|
51
|
-
});
|
|
52
|
-
CodeBlock.displayName = "CodeBlock";
|
|
53
|
-
var Kbd = forwardRef(function Kbd2({ className, ...props }, ref) {
|
|
54
|
-
return /* @__PURE__ */ jsx("kbd", { ...props, ref, className: cx("cdt-kbd", className) });
|
|
55
|
-
});
|
|
56
|
-
Kbd.displayName = "Kbd";
|
|
57
|
-
|
|
58
|
-
export { CodeBlock, Kbd, Table, Timeline };
|
package/dist/chunk-TUHWL5JC.js
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { cx } from './chunk-WEIMKRZV.js';
|
|
2
|
-
import { forwardRef, useRef, useEffect } from 'react';
|
|
3
|
-
import { jsx } from 'react/jsx-runtime';
|
|
4
|
-
|
|
5
|
-
var nestedInteractive = "a,button,input,select,textarea,[role=button]";
|
|
6
|
-
var Card = forwardRef(function Card2({ as, children, className, href, onClick, size = "md", ...props }, forwardedRef) {
|
|
7
|
-
const rootRef = useRef(null);
|
|
8
|
-
const interactive = as === "a" || as === "button" || href !== void 0 || onClick !== void 0;
|
|
9
|
-
const element = as ?? (href === void 0 ? onClick === void 0 ? "div" : "button" : "a");
|
|
10
|
-
useEffect(() => {
|
|
11
|
-
if (process.env.NODE_ENV !== "production" && interactive && rootRef.current?.querySelector(nestedInteractive) !== null) {
|
|
12
|
-
console.warn("[conductor] Interactive Card must not contain nested interactive elements.");
|
|
13
|
-
}
|
|
14
|
-
}, [interactive]);
|
|
15
|
-
const setRef = (node) => {
|
|
16
|
-
rootRef.current = node;
|
|
17
|
-
if (typeof forwardedRef === "function") forwardedRef(node);
|
|
18
|
-
else if (forwardedRef !== null) forwardedRef.current = node;
|
|
19
|
-
};
|
|
20
|
-
const classes = cx("cdt-card", interactive && "cdt-card--interactive", size === "sm" && "cdt-card--sm", className);
|
|
21
|
-
if (element === "a") {
|
|
22
|
-
return /* @__PURE__ */ jsx("a", { ...props, ref: setRef, href, className: classes, children });
|
|
23
|
-
}
|
|
24
|
-
if (element === "button") {
|
|
25
|
-
return /* @__PURE__ */ jsx("button", { ...props, ref: setRef, type: "button", onClick, className: classes, children });
|
|
26
|
-
}
|
|
27
|
-
return /* @__PURE__ */ jsx("div", { ...props, ref: setRef, className: classes, children });
|
|
28
|
-
});
|
|
29
|
-
Card.displayName = "Card";
|
|
30
|
-
var CardGrid = forwardRef(function CardGrid2({ className, ...props }, ref) {
|
|
31
|
-
return /* @__PURE__ */ jsx("div", { ...props, ref, className: cx("cdt-card-grid", className) });
|
|
32
|
-
});
|
|
33
|
-
CardGrid.displayName = "CardGrid";
|
|
34
|
-
var Panel = forwardRef(function Panel2({ as = "div", className, size = "md", ...props }, ref) {
|
|
35
|
-
const classes = cx("cdt-panel", size === "sm" && "cdt-panel--sm", className);
|
|
36
|
-
if (as === "section") return /* @__PURE__ */ jsx("section", { ...props, ref, className: classes });
|
|
37
|
-
if (as === "aside") return /* @__PURE__ */ jsx("aside", { ...props, ref, className: classes });
|
|
38
|
-
return /* @__PURE__ */ jsx("div", { ...props, ref, className: classes });
|
|
39
|
-
});
|
|
40
|
-
Panel.displayName = "Panel";
|
|
41
|
-
|
|
42
|
-
export { Card, CardGrid, Panel };
|