/* @ds-bundle: {"format":3,"namespace":"ChicoryTVDesignSystem_eb3b61","components":[{"name":"Badge","sourcePath":"components/data-display/Badge.jsx"},{"name":"Card","sourcePath":"components/data-display/Card.jsx"},{"name":"ChannelLogo","sourcePath":"components/data-display/ChannelLogo.jsx"},{"name":"ProgressBar","sourcePath":"components/data-display/ProgressBar.jsx"},{"name":"Stat","sourcePath":"components/data-display/Stat.jsx"},{"name":"StatusDot","sourcePath":"components/data-display/StatusDot.jsx"},{"name":"Tag","sourcePath":"components/data-display/Tag.jsx"},{"name":"Spinner","sourcePath":"components/feedback/Spinner.jsx"},{"name":"Toast","sourcePath":"components/feedback/Toast.jsx"},{"name":"Tooltip","sourcePath":"components/feedback/Tooltip.jsx"},{"name":"Button","sourcePath":"components/forms/Button.jsx"},{"name":"Checkbox","sourcePath":"components/forms/Checkbox.jsx"},{"name":"IconButton","sourcePath":"components/forms/IconButton.jsx"},{"name":"Input","sourcePath":"components/forms/Input.jsx"},{"name":"Select","sourcePath":"components/forms/Select.jsx"},{"name":"Switch","sourcePath":"components/forms/Switch.jsx"},{"name":"NavItem","sourcePath":"components/navigation/NavItem.jsx"},{"name":"NavSection","sourcePath":"components/navigation/NavItem.jsx"},{"name":"Tabs","sourcePath":"components/navigation/Tabs.jsx"}],"sourceHashes":{"components/data-display/Badge.jsx":"a2d5da49e43f","components/data-display/Card.jsx":"b6e830c9f9f0","components/data-display/ChannelLogo.jsx":"af406aecdc6a","components/data-display/ProgressBar.jsx":"54ab9452240b","components/data-display/Stat.jsx":"695d12eae330","components/data-display/StatusDot.jsx":"a924e27b2a1c","components/data-display/Tag.jsx":"bdf96d4cdf7f","components/feedback/Spinner.jsx":"13341131fe7d","components/feedback/Toast.jsx":"f18ffea8c6ce","components/feedback/Tooltip.jsx":"f17876ac005e","components/forms/Button.jsx":"fa14c86210e0","components/forms/Checkbox.jsx":"81750526a791","components/forms/IconButton.jsx":"1ea757879b1c","components/forms/Input.jsx":"8759cd8e610f","components/forms/Select.jsx":"2a3af2c7bce8","components/forms/Switch.jsx":"1fce47dca064","components/navigation/NavItem.jsx":"8b46c82d5c25","components/navigation/Tabs.jsx":"95d81be93d0f","design_handoff_channel_builder/ChannelBuilder.jsx":"904a465a69fd"},"inlinedExternals":[],"unexposedExports":[]} */ (() => { const __ds_ns = (window.ChicoryTVDesignSystem_eb3b61 = window.ChicoryTVDesignSystem_eb3b61 || {}); const __ds_scope = {}; (__ds_ns.__errors = __ds_ns.__errors || []); // components/data-display/Badge.jsx try { (() => { const tones = { neutral: { fg: "var(--text-secondary)", bg: "var(--ctv-surface-3)", bd: "var(--border-hairline)" }, accent: { fg: "var(--ctv-accent)", bg: "var(--ctv-accent-soft)", bd: "rgba(91,124,250,0.35)" }, ok: { fg: "var(--status-ok)", bg: "var(--ctv-ok-soft)", bd: "rgba(63,185,132,0.35)" }, warn: { fg: "var(--status-warn)", bg: "var(--ctv-warn-soft)", bd: "rgba(224,168,61,0.35)" }, error: { fg: "var(--status-error)", bg: "var(--ctv-error-soft)", bd: "rgba(229,72,77,0.35)" } }; /** * Small status/label badge. Soft (tinted) or solid. */ function Badge({ children, tone = "neutral", solid = false, dot = false, style = {} }) { const t = tones[tone] || tones.neutral; const solidBg = { neutral: "var(--ctv-surface-3)", accent: "var(--ctv-accent)", ok: "var(--status-ok)", warn: "var(--status-warn)", error: "var(--status-error)" }; return /*#__PURE__*/React.createElement("span", { style: { display: "inline-flex", alignItems: "center", gap: "5px", height: "20px", padding: dot ? "0 8px 0 6px" : "0 8px", borderRadius: "var(--radius-xs)", font: `var(--weight-medium) var(--text-2xs)/1 var(--font-sans)`, letterSpacing: "0.02em", color: solid ? tone === "warn" ? "#1A1206" : "#fff" : t.fg, background: solid ? solidBg[tone] : t.bg, border: solid ? "1px solid transparent" : `1px solid ${t.bd}`, whiteSpace: "nowrap", ...style } }, dot && /*#__PURE__*/React.createElement("span", { style: { width: 6, height: 6, borderRadius: "50%", background: solid ? "rgba(255,255,255,0.9)" : t.fg } }), children); } Object.assign(__ds_scope, { Badge }); })(); } catch (e) { __ds_ns.__errors.push({ path: "components/data-display/Badge.jsx", error: String((e && e.message) || e) }); } // components/data-display/Card.jsx try { (() => { /** * Surface container. Optional header (title + actions) and body padding. */ function Card({ title, subtitle, actions = null, children, padded = true, inset = false, style = {} }) { return /*#__PURE__*/React.createElement("div", { style: { background: inset ? "var(--ctv-bg-sunken)" : "var(--surface-card)", border: "1px solid var(--border-hairline)", borderRadius: "var(--radius-md)", overflow: "hidden", ...style } }, (title || actions) && /*#__PURE__*/React.createElement("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between", gap: "12px", padding: "13px 16px", borderBottom: "1px solid var(--border-hairline)" } }, /*#__PURE__*/React.createElement("div", { style: { minWidth: 0 } }, title && /*#__PURE__*/React.createElement("div", { style: { font: "var(--weight-semibold) var(--text-md)/1.2 var(--font-sans)", color: "var(--text-primary)" } }, title), subtitle && /*#__PURE__*/React.createElement("div", { style: { marginTop: 3, font: "var(--text-xs)/1.3 var(--font-sans)", color: "var(--text-secondary)" } }, subtitle)), actions && /*#__PURE__*/React.createElement("div", { style: { display: "flex", alignItems: "center", gap: "8px", flex: "0 0 auto" } }, actions)), /*#__PURE__*/React.createElement("div", { style: { padding: padded ? "16px" : 0 } }, children)); } Object.assign(__ds_scope, { Card }); })(); } catch (e) { __ds_ns.__errors.push({ path: "components/data-display/Card.jsx", error: String((e && e.message) || e) }); } // components/data-display/ChannelLogo.jsx try { (() => { const palette = [["#5B7CFA", "#2E3A66"], ["#3FB984", "#1E4536"], ["#E0A83D", "#4A3818"], ["#E5484D", "#4A1F21"], ["#B06CF0", "#38235A"], ["#48B0C8", "#193E47"]]; function hashIndex(str) { let h = 0; for (let i = 0; i < str.length; i++) h = h * 31 + str.charCodeAt(i) >>> 0; return h % palette.length; } /** * Channel logo tile. Renders an image when given, else a generated * initials chip keyed to the channel name — mirrors ErsatzTV's logo/gen. */ function ChannelLogo({ name = "", src = null, size = 40, radius = "var(--radius-sm)", style = {} }) { const [fg, bg] = palette[hashIndex(name)]; const initials = name.split(/[\s\-|:]+/).filter(Boolean).slice(0, 2).map(w => w[0]).join("").toUpperCase() || "?"; return /*#__PURE__*/React.createElement("span", { style: { display: "inline-flex", alignItems: "center", justifyContent: "center", width: size, height: size, flex: "0 0 auto", overflow: "hidden", borderRadius: radius, background: src ? "var(--ctv-bg-sunken)" : bg, border: "1px solid var(--border-hairline)", ...style } }, src ? /*#__PURE__*/React.createElement("img", { src: src, alt: name, style: { maxWidth: "100%", maxHeight: "100%", objectFit: "contain" } }) : /*#__PURE__*/React.createElement("span", { style: { font: `var(--weight-semibold) ${Math.round(size * 0.34)}px/1 var(--font-mono)`, color: fg, letterSpacing: "0.02em" } }, initials)); } Object.assign(__ds_scope, { ChannelLogo }); })(); } catch (e) { __ds_ns.__errors.push({ path: "components/data-display/ChannelLogo.jsx", error: String((e && e.message) || e) }); } // components/data-display/ProgressBar.jsx try { (() => { const toneColor = { accent: "var(--action-primary)", ok: "var(--status-ok)", warn: "var(--status-warn)", error: "var(--status-error)" }; /** * Thin determinate/indeterminate progress bar — library scans, transcodes. */ function ProgressBar({ value = null, tone = "accent", height = 6, showLabel = false, style = {} }) { const c = toneColor[tone] || toneColor.accent; const indeterminate = value == null; const pct = Math.max(0, Math.min(100, value ?? 0)); return /*#__PURE__*/React.createElement("div", { style: { display: "flex", alignItems: "center", gap: "10px", ...style } }, /*#__PURE__*/React.createElement("div", { style: { position: "relative", flex: 1, height, borderRadius: "var(--radius-pill)", background: "var(--ctv-surface-3)", overflow: "hidden" } }, /*#__PURE__*/React.createElement("style", null, `@keyframes ctv-indet{0%{left:-40%}100%{left:100%}}`), indeterminate ? /*#__PURE__*/React.createElement("span", { style: { position: "absolute", top: 0, bottom: 0, width: "40%", borderRadius: "inherit", background: c, animation: "ctv-indet 1.1s var(--ease-standard) infinite" } }) : /*#__PURE__*/React.createElement("span", { style: { position: "absolute", top: 0, left: 0, bottom: 0, width: `${pct}%`, borderRadius: "inherit", background: c, transition: "width var(--dur-slow) var(--ease-out)" } })), showLabel && !indeterminate && /*#__PURE__*/React.createElement("span", { style: { font: "var(--weight-medium) var(--text-xs)/1 var(--font-mono)", color: "var(--text-secondary)", minWidth: 34, textAlign: "right", fontVariantNumeric: "tabular-nums" } }, Math.round(pct), "%")); } Object.assign(__ds_scope, { ProgressBar }); })(); } catch (e) { __ds_ns.__errors.push({ path: "components/data-display/ProgressBar.jsx", error: String((e && e.message) || e) }); } // components/data-display/Stat.jsx try { (() => { /** * Dashboard metric. Big mono value, label, optional delta + icon. */ function Stat({ label, value, unit, delta = null, deltaTone = "neutral", icon = null, style = {} }) { const dc = { up: "var(--status-ok)", down: "var(--status-error)", neutral: "var(--text-secondary)" }; return /*#__PURE__*/React.createElement("div", { style: { display: "flex", flexDirection: "column", gap: "8px", ...style } }, /*#__PURE__*/React.createElement("div", { style: { display: "flex", alignItems: "center", gap: "7px" } }, icon && /*#__PURE__*/React.createElement("span", { style: { display: "inline-flex", color: "var(--text-disabled)" } }, icon), /*#__PURE__*/React.createElement("span", { style: { font: "var(--weight-medium) var(--text-xs)/1 var(--font-sans)", letterSpacing: "0.03em", color: "var(--text-secondary)" } }, label)), /*#__PURE__*/React.createElement("div", { style: { display: "flex", alignItems: "baseline", gap: "6px" } }, /*#__PURE__*/React.createElement("span", { style: { font: "var(--weight-semibold) var(--text-2xl)/1 var(--font-mono)", color: "var(--text-primary)", letterSpacing: "-0.01em", fontVariantNumeric: "tabular-nums" } }, value), unit && /*#__PURE__*/React.createElement("span", { style: { font: "var(--text-sm)/1 var(--font-sans)", color: "var(--text-disabled)" } }, unit), delta != null && /*#__PURE__*/React.createElement("span", { style: { marginLeft: 2, font: "var(--weight-medium) var(--text-xs)/1 var(--font-mono)", color: dc[deltaTone] } }, delta))); } Object.assign(__ds_scope, { Stat }); })(); } catch (e) { __ds_ns.__errors.push({ path: "components/data-display/Stat.jsx", error: String((e && e.message) || e) }); } // components/data-display/StatusDot.jsx try { (() => { const colors = { live: "var(--status-live)", ok: "var(--status-ok)", warn: "var(--status-warn)", error: "var(--status-error)", idle: "var(--text-disabled)" }; /** * Status dot with optional pulsing ring — on-air / live indicators. */ function StatusDot({ status = "idle", pulse = false, size = 8, label, style = {} }) { const c = colors[status] || colors.idle; const doPulse = pulse || status === "live"; return /*#__PURE__*/React.createElement("span", { style: { display: "inline-flex", alignItems: "center", gap: "7px", ...style } }, /*#__PURE__*/React.createElement("span", { style: { position: "relative", width: size, height: size, flex: "0 0 auto" } }, doPulse && /*#__PURE__*/React.createElement("span", { style: { position: "absolute", inset: 0, borderRadius: "50%", background: c, animation: "ctv-ping 1.6s cubic-bezier(0,0,0.2,1) infinite" } }), /*#__PURE__*/React.createElement("span", { style: { position: "absolute", inset: 0, borderRadius: "50%", background: c, boxShadow: doPulse ? `0 0 6px ${c}` : "none" } }), /*#__PURE__*/React.createElement("style", null, `@keyframes ctv-ping{0%{transform:scale(1);opacity:.55}70%,100%{transform:scale(2.4);opacity:0}}`)), label && /*#__PURE__*/React.createElement("span", { style: { font: "var(--text-xs)/1 var(--font-sans)", color: "var(--text-secondary)" } }, label)); } Object.assign(__ds_scope, { StatusDot }); })(); } catch (e) { __ds_ns.__errors.push({ path: "components/data-display/StatusDot.jsx", error: String((e && e.message) || e) }); } // components/data-display/Tag.jsx try { (() => { /** * Removable chip/tag — smart-collection filters, tags on media. */ function Tag({ children, onRemove, icon = null, tone = "neutral", style = {} }) { const [hover, setHover] = React.useState(false); const tint = tone === "accent"; return /*#__PURE__*/React.createElement("span", { style: { display: "inline-flex", alignItems: "center", gap: "6px", height: "22px", padding: onRemove ? "0 5px 0 8px" : "0 9px", borderRadius: "var(--radius-xs)", font: "var(--weight-medium) var(--text-xs)/1 var(--font-sans)", color: tint ? "var(--ctv-accent)" : "var(--text-primary)", background: tint ? "var(--ctv-accent-soft)" : "var(--ctv-surface-3)", border: `1px solid ${tint ? "rgba(91,124,250,0.35)" : "var(--border-hairline)"}`, whiteSpace: "nowrap", ...style } }, icon && /*#__PURE__*/React.createElement("span", { style: { display: "inline-flex", color: "var(--text-disabled)" } }, icon), children, onRemove && /*#__PURE__*/React.createElement("button", { type: "button", onClick: onRemove, onMouseEnter: () => setHover(true), onMouseLeave: () => setHover(false), "aria-label": "Remove", style: { display: "inline-flex", alignItems: "center", justifyContent: "center", width: 15, height: 15, padding: 0, border: "none", borderRadius: "3px", cursor: "pointer", color: hover ? "var(--text-primary)" : "var(--text-disabled)", background: hover ? "rgba(255,255,255,0.08)" : "transparent" } }, /*#__PURE__*/React.createElement("svg", { width: "10", height: "10", viewBox: "0 0 24 24", fill: "none" }, /*#__PURE__*/React.createElement("path", { d: "M6 6l12 12M18 6L6 18", stroke: "currentColor", strokeWidth: "2.4", strokeLinecap: "round" })))); } Object.assign(__ds_scope, { Tag }); })(); } catch (e) { __ds_ns.__errors.push({ path: "components/data-display/Tag.jsx", error: String((e && e.message) || e) }); } // components/feedback/Spinner.jsx try { (() => { /** * Indeterminate ring spinner. */ function Spinner({ size = 18, tone = "accent", stroke = 2.4, style = {} }) { const c = { accent: "var(--action-primary)", muted: "var(--text-disabled)", ok: "var(--status-ok)" }[tone] || "var(--action-primary)"; return /*#__PURE__*/React.createElement("span", { style: { display: "inline-flex", ...style } }, /*#__PURE__*/React.createElement("style", null, `@keyframes ctv-spin{to{transform:rotate(360deg)}}`), /*#__PURE__*/React.createElement("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", style: { animation: "ctv-spin 0.7s linear infinite" } }, /*#__PURE__*/React.createElement("circle", { cx: "12", cy: "12", r: "9", stroke: c, strokeOpacity: "0.2", strokeWidth: stroke }), /*#__PURE__*/React.createElement("path", { d: "M21 12a9 9 0 0 0-9-9", stroke: c, strokeWidth: stroke, strokeLinecap: "round" }))); } Object.assign(__ds_scope, { Spinner }); })(); } catch (e) { __ds_ns.__errors.push({ path: "components/feedback/Spinner.jsx", error: String((e && e.message) || e) }); } // components/feedback/Toast.jsx try { (() => { const map = { ok: { c: "var(--status-ok)", bg: "var(--ctv-ok-soft)", icon: "M5 12.5l4.5 4.5L19 7" }, warn: { c: "var(--status-warn)", bg: "var(--ctv-warn-soft)", icon: "M12 8v5M12 17h.01" }, error: { c: "var(--status-error)", bg: "var(--ctv-error-soft)", icon: "M12 8v5M12 17h.01" }, info: { c: "var(--ctv-accent)", bg: "var(--ctv-accent-soft)", icon: "M12 11v5M12 8h.01" } }; /** * Toast / inline alert. Icon, message, optional close. */ function Toast({ tone = "info", title, message, onClose, style = {} }) { const t = map[tone] || map.info; return /*#__PURE__*/React.createElement("div", { role: "status", style: { display: "flex", alignItems: "flex-start", gap: "11px", width: "min(380px, 100%)", padding: "12px 13px", background: "var(--surface-raised)", border: "1px solid var(--border-hairline)", borderLeft: `2px solid ${t.c}`, borderRadius: "var(--radius-md)", boxShadow: "var(--shadow-md)", ...style } }, /*#__PURE__*/React.createElement("span", { style: { display: "inline-flex", alignItems: "center", justifyContent: "center", width: 22, height: 22, borderRadius: "var(--radius-xs)", background: t.bg, flex: "0 0 auto", marginTop: 1 } }, /*#__PURE__*/React.createElement("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none" }, /*#__PURE__*/React.createElement("circle", { cx: "12", cy: "12", r: "9", stroke: t.c, strokeWidth: "0", fill: "none" }), /*#__PURE__*/React.createElement("path", { d: t.icon, stroke: t.c, strokeWidth: "2.2", strokeLinecap: "round", strokeLinejoin: "round" }))), /*#__PURE__*/React.createElement("div", { style: { flex: 1, minWidth: 0 } }, title && /*#__PURE__*/React.createElement("div", { style: { font: "var(--weight-semibold) var(--text-sm)/1.3 var(--font-sans)", color: "var(--text-primary)" } }, title), message && /*#__PURE__*/React.createElement("div", { style: { marginTop: title ? 2 : 0, font: "var(--text-xs)/1.45 var(--font-sans)", color: "var(--text-secondary)" } }, message)), onClose && /*#__PURE__*/React.createElement("button", { type: "button", onClick: onClose, "aria-label": "Dismiss", style: { display: "inline-flex", padding: 3, border: "none", background: "transparent", color: "var(--text-disabled)", cursor: "pointer", flex: "0 0 auto" } }, /*#__PURE__*/React.createElement("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none" }, /*#__PURE__*/React.createElement("path", { d: "M6 6l12 12M18 6L6 18", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" })))); } Object.assign(__ds_scope, { Toast }); })(); } catch (e) { __ds_ns.__errors.push({ path: "components/feedback/Toast.jsx", error: String((e && e.message) || e) }); } // components/feedback/Tooltip.jsx try { (() => { /** * Hover tooltip. Wraps a trigger; shows a small dark label. */ function Tooltip({ label, placement = "top", children, style = {} }) { const [show, setShow] = React.useState(false); const pos = { top: { bottom: "calc(100% + 7px)", left: "50%", transform: "translateX(-50%)" }, bottom: { top: "calc(100% + 7px)", left: "50%", transform: "translateX(-50%)" }, left: { right: "calc(100% + 7px)", top: "50%", transform: "translateY(-50%)" }, right: { left: "calc(100% + 7px)", top: "50%", transform: "translateY(-50%)" } }[placement]; return /*#__PURE__*/React.createElement("span", { onMouseEnter: () => setShow(true), onMouseLeave: () => setShow(false), style: { position: "relative", display: "inline-flex", ...style } }, children, show && label && /*#__PURE__*/React.createElement("span", { role: "tooltip", style: { position: "absolute", zIndex: 50, ...pos, padding: "5px 9px", borderRadius: "var(--radius-sm)", background: "var(--ctv-surface-3)", border: "1px solid var(--border-control)", boxShadow: "var(--shadow-pop)", color: "var(--text-primary)", font: "var(--weight-medium) var(--text-xs)/1.2 var(--font-sans)", whiteSpace: "nowrap", pointerEvents: "none" } }, label)); } Object.assign(__ds_scope, { Tooltip }); })(); } catch (e) { __ds_ns.__errors.push({ path: "components/feedback/Tooltip.jsx", error: String((e && e.message) || e) }); } // components/forms/Button.jsx try { (() => { function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); } const sizeMap = { sm: { height: "var(--control-h-sm)", padding: "0 12px", font: "var(--text-xs)" }, md: { height: "var(--control-h)", padding: "0 14px", font: "var(--text-sm)" } }; const variantStyle = { primary: { background: "var(--action-primary)", color: "var(--text-on-accent)", border: "1px solid transparent" }, secondary: { background: "var(--ctv-surface-2)", color: "var(--text-primary)", border: "1px solid var(--border-control)" }, ghost: { background: "transparent", color: "var(--text-secondary)", border: "1px solid transparent" }, danger: { background: "var(--ctv-error-soft)", color: "var(--status-error)", border: "1px solid rgba(229,72,77,0.35)" } }; const hoverBg = { primary: "var(--action-primary-hover)", secondary: "var(--ctv-surface-3)", ghost: "var(--ctv-surface-2)", danger: "rgba(229,72,77,0.22)" }; /** * ChicoryTV primary action button. */ function Button({ children, variant = "primary", size = "md", startIcon = null, endIcon = null, disabled = false, loading = false, fullWidth = false, onClick, type = "button", style = {}, ...rest }) { const [hover, setHover] = React.useState(false); const [active, setActive] = React.useState(false); const s = sizeMap[size] || sizeMap.md; const v = variantStyle[variant] || variantStyle.primary; const isDisabled = disabled || loading; return /*#__PURE__*/React.createElement("button", _extends({ type: type, disabled: isDisabled, onClick: onClick, onMouseEnter: () => setHover(true), onMouseLeave: () => { setHover(false); setActive(false); }, onMouseDown: () => setActive(true), onMouseUp: () => setActive(false), style: { display: "inline-flex", alignItems: "center", justifyContent: "center", gap: "7px", height: s.height, padding: s.padding, width: fullWidth ? "100%" : "auto", font: `var(--weight-medium) ${s.font}/1 var(--font-sans)`, letterSpacing: "0.01em", borderRadius: "var(--radius-sm)", cursor: isDisabled ? "not-allowed" : "pointer", opacity: isDisabled ? 0.45 : 1, whiteSpace: "nowrap", transition: "background var(--dur-fast) var(--ease-standard), transform var(--dur-fast) var(--ease-standard)", transform: active && !isDisabled ? "translateY(0.5px)" : "none", ...v, background: !isDisabled && hover ? hoverBg[variant] : v.background, ...style } }, rest), loading ? /*#__PURE__*/React.createElement(Spinner16, null) : startIcon, children, !loading && endIcon); } function Spinner16() { return /*#__PURE__*/React.createElement("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", style: { animation: "ctv-spin 0.7s linear infinite" } }, /*#__PURE__*/React.createElement("style", null, `@keyframes ctv-spin{to{transform:rotate(360deg)}}`), /*#__PURE__*/React.createElement("circle", { cx: "12", cy: "12", r: "9", stroke: "currentColor", strokeOpacity: "0.25", strokeWidth: "3" }), /*#__PURE__*/React.createElement("path", { d: "M21 12a9 9 0 0 0-9-9", stroke: "currentColor", strokeWidth: "3", strokeLinecap: "round" })); } Object.assign(__ds_scope, { Button }); })(); } catch (e) { __ds_ns.__errors.push({ path: "components/forms/Button.jsx", error: String((e && e.message) || e) }); } // components/forms/Checkbox.jsx try { (() => { /** * Checkbox with label. Controlled via checked/onChange. */ function Checkbox({ checked = false, onChange, disabled = false, label, indeterminate = false, style = {} }) { const toggle = () => { if (!disabled && onChange) onChange(!checked); }; const on = checked || indeterminate; return /*#__PURE__*/React.createElement("label", { style: { display: "inline-flex", alignItems: "center", gap: "8px", cursor: disabled ? "not-allowed" : "pointer", opacity: disabled ? 0.5 : 1, ...style } }, /*#__PURE__*/React.createElement("span", { role: "checkbox", "aria-checked": indeterminate ? "mixed" : checked, onClick: toggle, style: { display: "inline-flex", alignItems: "center", justifyContent: "center", width: 17, height: 17, flex: "0 0 auto", borderRadius: "var(--radius-xs)", background: on ? "var(--action-primary)" : "var(--ctv-bg-sunken)", border: `1px solid ${on ? "transparent" : "var(--border-control)"}`, transition: "background var(--dur-fast), border-color var(--dur-fast)" } }, indeterminate ? /*#__PURE__*/React.createElement("svg", { width: "11", height: "11", viewBox: "0 0 24 24" }, /*#__PURE__*/React.createElement("path", { d: "M6 12h12", stroke: "#fff", strokeWidth: "3", strokeLinecap: "round" })) : checked ? /*#__PURE__*/React.createElement("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none" }, /*#__PURE__*/React.createElement("path", { d: "M5 12.5l4.5 4.5L19 7", stroke: "#fff", strokeWidth: "3", strokeLinecap: "round", strokeLinejoin: "round" })) : null), label && /*#__PURE__*/React.createElement("span", { style: { font: "var(--text-sm)/1 var(--font-sans)", color: "var(--text-primary)" } }, label)); } Object.assign(__ds_scope, { Checkbox }); })(); } catch (e) { __ds_ns.__errors.push({ path: "components/forms/Checkbox.jsx", error: String((e && e.message) || e) }); } // components/forms/IconButton.jsx try { (() => { function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); } /** * Compact square icon button — table row actions, toolbars. */ function IconButton({ children, size = "md", variant = "ghost", disabled = false, active = false, title, onClick, style = {}, ...rest }) { const [hover, setHover] = React.useState(false); const dim = size === "sm" ? 28 : 32; const base = variant === "solid" ? { background: "var(--action-primary)", color: "var(--text-on-accent)" } : { background: active ? "var(--ctv-surface-3)" : "transparent", color: active ? "var(--text-primary)" : "var(--text-secondary)" }; const hoverBg = variant === "solid" ? "var(--action-primary-hover)" : "var(--ctv-surface-2)"; return /*#__PURE__*/React.createElement("button", _extends({ type: "button", title: title, "aria-label": title, disabled: disabled, onClick: onClick, onMouseEnter: () => setHover(true), onMouseLeave: () => setHover(false), style: { display: "inline-flex", alignItems: "center", justifyContent: "center", width: dim, height: dim, flex: "0 0 auto", borderRadius: "var(--radius-sm)", border: "1px solid transparent", cursor: disabled ? "not-allowed" : "pointer", opacity: disabled ? 0.4 : 1, color: base.color, background: !disabled && hover ? hoverBg : base.background, transition: "background var(--dur-fast) var(--ease-standard), color var(--dur-fast) var(--ease-standard)", ...(!disabled && hover && variant !== "solid" ? { color: "var(--text-primary)" } : {}), ...style } }, rest), children); } Object.assign(__ds_scope, { IconButton }); })(); } catch (e) { __ds_ns.__errors.push({ path: "components/forms/IconButton.jsx", error: String((e && e.message) || e) }); } // components/forms/Input.jsx try { (() => { function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); } /** * Text input with optional label, leading icon and error state. */ function Input({ label, value, onChange, placeholder, leadingIcon = null, trailing = null, error = null, disabled = false, size = "md", type = "text", fullWidth = true, style = {}, ...rest }) { const [focus, setFocus] = React.useState(false); const height = size === "sm" ? "var(--control-h-sm)" : "var(--control-h)"; const borderColor = error ? "var(--status-error)" : focus ? "var(--action-primary)" : "var(--border-control)"; return /*#__PURE__*/React.createElement("label", { style: { display: "block", width: fullWidth ? "100%" : "auto" } }, label && /*#__PURE__*/React.createElement("span", { style: { display: "block", marginBottom: "6px", font: "var(--weight-medium) var(--text-xs)/1 var(--font-sans)", color: "var(--text-secondary)" } }, label), /*#__PURE__*/React.createElement("span", { style: { display: "flex", alignItems: "center", gap: "8px", height, padding: "0 10px", background: "var(--ctv-bg-sunken)", border: `1px solid ${borderColor}`, borderRadius: "var(--radius-sm)", boxShadow: focus && !error ? "0 0 0 3px var(--focus-ring)" : "none", transition: "border-color var(--dur-fast) var(--ease-standard), box-shadow var(--dur-fast) var(--ease-standard)", opacity: disabled ? 0.5 : 1, ...style } }, leadingIcon && /*#__PURE__*/React.createElement("span", { style: { display: "flex", color: "var(--text-disabled)", flex: "0 0 auto" } }, leadingIcon), /*#__PURE__*/React.createElement("input", _extends({ type: type, value: value, onChange: onChange, placeholder: placeholder, disabled: disabled, onFocus: () => setFocus(true), onBlur: () => setFocus(false), style: { flex: 1, minWidth: 0, background: "transparent", border: "none", outline: "none", color: "var(--text-primary)", font: "var(--weight-normal) var(--text-sm)/1 var(--font-sans)" } }, rest)), trailing && /*#__PURE__*/React.createElement("span", { style: { display: "flex", flex: "0 0 auto" } }, trailing)), error && /*#__PURE__*/React.createElement("span", { style: { display: "block", marginTop: "5px", font: "var(--text-xs)/1.3 var(--font-sans)", color: "var(--status-error)" } }, error)); } Object.assign(__ds_scope, { Input }); })(); } catch (e) { __ds_ns.__errors.push({ path: "components/forms/Input.jsx", error: String((e && e.message) || e) }); } // components/forms/Select.jsx try { (() => { function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); } /** * Styled select built on a native