@bridger-kr/react 0.1.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 +62 -0
- package/dist/components/core/Badge.cjs +36 -0
- package/dist/components/core/Badge.cjs.map +1 -0
- package/dist/components/core/Badge.d.cts +18 -0
- package/dist/components/core/Badge.d.ts +18 -0
- package/dist/components/core/Badge.mjs +34 -0
- package/dist/components/core/Badge.mjs.map +1 -0
- package/dist/components/core/Button.cjs +57 -0
- package/dist/components/core/Button.cjs.map +1 -0
- package/dist/components/core/Button.d.cts +26 -0
- package/dist/components/core/Button.d.ts +26 -0
- package/dist/components/core/Button.mjs +55 -0
- package/dist/components/core/Button.mjs.map +1 -0
- package/dist/components/core/Card.cjs +57 -0
- package/dist/components/core/Card.cjs.map +1 -0
- package/dist/components/core/Card.d.cts +27 -0
- package/dist/components/core/Card.d.ts +27 -0
- package/dist/components/core/Card.mjs +54 -0
- package/dist/components/core/Card.mjs.map +1 -0
- package/dist/components/core/FilterChip.cjs +54 -0
- package/dist/components/core/FilterChip.cjs.map +1 -0
- package/dist/components/core/FilterChip.d.cts +23 -0
- package/dist/components/core/FilterChip.d.ts +23 -0
- package/dist/components/core/FilterChip.mjs +52 -0
- package/dist/components/core/FilterChip.mjs.map +1 -0
- package/dist/components/core/Input.cjs +67 -0
- package/dist/components/core/Input.cjs.map +1 -0
- package/dist/components/core/Input.d.cts +20 -0
- package/dist/components/core/Input.d.ts +20 -0
- package/dist/components/core/Input.mjs +65 -0
- package/dist/components/core/Input.mjs.map +1 -0
- package/dist/components/core/StatusPill.cjs +57 -0
- package/dist/components/core/StatusPill.cjs.map +1 -0
- package/dist/components/core/StatusPill.d.cts +19 -0
- package/dist/components/core/StatusPill.d.ts +19 -0
- package/dist/components/core/StatusPill.mjs +55 -0
- package/dist/components/core/StatusPill.mjs.map +1 -0
- package/dist/components/core/Surface.cjs +52 -0
- package/dist/components/core/Surface.cjs.map +1 -0
- package/dist/components/core/Surface.d.cts +24 -0
- package/dist/components/core/Surface.d.ts +24 -0
- package/dist/components/core/Surface.mjs +47 -0
- package/dist/components/core/Surface.mjs.map +1 -0
- package/dist/components/core/Tabs.cjs +64 -0
- package/dist/components/core/Tabs.cjs.map +1 -0
- package/dist/components/core/Tabs.d.cts +24 -0
- package/dist/components/core/Tabs.d.ts +24 -0
- package/dist/components/core/Tabs.mjs +62 -0
- package/dist/components/core/Tabs.mjs.map +1 -0
- package/dist/components/data/Avatar.cjs +40 -0
- package/dist/components/data/Avatar.cjs.map +1 -0
- package/dist/components/data/Avatar.d.cts +24 -0
- package/dist/components/data/Avatar.d.ts +24 -0
- package/dist/components/data/Avatar.mjs +38 -0
- package/dist/components/data/Avatar.mjs.map +1 -0
- package/dist/components/data/CodeBlock.cjs +92 -0
- package/dist/components/data/CodeBlock.cjs.map +1 -0
- package/dist/components/data/CodeBlock.d.cts +20 -0
- package/dist/components/data/CodeBlock.d.ts +20 -0
- package/dist/components/data/CodeBlock.mjs +90 -0
- package/dist/components/data/CodeBlock.mjs.map +1 -0
- package/dist/components/data/KeyValue.cjs +55 -0
- package/dist/components/data/KeyValue.cjs.map +1 -0
- package/dist/components/data/KeyValue.d.cts +24 -0
- package/dist/components/data/KeyValue.d.ts +24 -0
- package/dist/components/data/KeyValue.mjs +53 -0
- package/dist/components/data/KeyValue.mjs.map +1 -0
- package/dist/components/data/LogRow.cjs +55 -0
- package/dist/components/data/LogRow.cjs.map +1 -0
- package/dist/components/data/LogRow.d.cts +23 -0
- package/dist/components/data/LogRow.d.ts +23 -0
- package/dist/components/data/LogRow.mjs +53 -0
- package/dist/components/data/LogRow.mjs.map +1 -0
- package/dist/components/data/Pagination.cjs +44 -0
- package/dist/components/data/Pagination.cjs.map +1 -0
- package/dist/components/data/Pagination.d.cts +13 -0
- package/dist/components/data/Pagination.d.ts +13 -0
- package/dist/components/data/Pagination.mjs +42 -0
- package/dist/components/data/Pagination.mjs.map +1 -0
- package/dist/components/data/StatTile.cjs +20 -0
- package/dist/components/data/StatTile.cjs.map +1 -0
- package/dist/components/data/StatTile.d.cts +19 -0
- package/dist/components/data/StatTile.d.ts +19 -0
- package/dist/components/data/StatTile.mjs +18 -0
- package/dist/components/data/StatTile.mjs.map +1 -0
- package/dist/components/data/Table.cjs +45 -0
- package/dist/components/data/Table.cjs.map +1 -0
- package/dist/components/data/Table.d.cts +27 -0
- package/dist/components/data/Table.d.ts +27 -0
- package/dist/components/data/Table.mjs +43 -0
- package/dist/components/data/Table.mjs.map +1 -0
- package/dist/components/data/UsageMeter.cjs +28 -0
- package/dist/components/data/UsageMeter.cjs.map +1 -0
- package/dist/components/data/UsageMeter.d.cts +19 -0
- package/dist/components/data/UsageMeter.d.ts +19 -0
- package/dist/components/data/UsageMeter.mjs +26 -0
- package/dist/components/data/UsageMeter.mjs.map +1 -0
- package/dist/components/feedback/Alert.cjs +78 -0
- package/dist/components/feedback/Alert.cjs.map +1 -0
- package/dist/components/feedback/Alert.d.cts +29 -0
- package/dist/components/feedback/Alert.d.ts +29 -0
- package/dist/components/feedback/Alert.mjs +74 -0
- package/dist/components/feedback/Alert.mjs.map +1 -0
- package/dist/components/feedback/Dialog.cjs +62 -0
- package/dist/components/feedback/Dialog.cjs.map +1 -0
- package/dist/components/feedback/Dialog.d.cts +17 -0
- package/dist/components/feedback/Dialog.d.ts +17 -0
- package/dist/components/feedback/Dialog.mjs +60 -0
- package/dist/components/feedback/Dialog.mjs.map +1 -0
- package/dist/components/feedback/Drawer.cjs +58 -0
- package/dist/components/feedback/Drawer.cjs.map +1 -0
- package/dist/components/feedback/Drawer.d.cts +22 -0
- package/dist/components/feedback/Drawer.d.ts +22 -0
- package/dist/components/feedback/Drawer.mjs +56 -0
- package/dist/components/feedback/Drawer.mjs.map +1 -0
- package/dist/components/feedback/EmptyState.cjs +36 -0
- package/dist/components/feedback/EmptyState.cjs.map +1 -0
- package/dist/components/feedback/EmptyState.d.cts +14 -0
- package/dist/components/feedback/EmptyState.d.ts +14 -0
- package/dist/components/feedback/EmptyState.mjs +34 -0
- package/dist/components/feedback/EmptyState.mjs.map +1 -0
- package/dist/components/feedback/Skeleton.cjs +19 -0
- package/dist/components/feedback/Skeleton.cjs.map +1 -0
- package/dist/components/feedback/Skeleton.d.cts +12 -0
- package/dist/components/feedback/Skeleton.d.ts +12 -0
- package/dist/components/feedback/Skeleton.mjs +17 -0
- package/dist/components/feedback/Skeleton.mjs.map +1 -0
- package/dist/components/feedback/Spinner.cjs +17 -0
- package/dist/components/feedback/Spinner.cjs.map +1 -0
- package/dist/components/feedback/Spinner.d.cts +12 -0
- package/dist/components/feedback/Spinner.d.ts +12 -0
- package/dist/components/feedback/Spinner.mjs +15 -0
- package/dist/components/feedback/Spinner.mjs.map +1 -0
- package/dist/components/feedback/Toast.cjs +32 -0
- package/dist/components/feedback/Toast.cjs.map +1 -0
- package/dist/components/feedback/Toast.d.cts +20 -0
- package/dist/components/feedback/Toast.d.ts +20 -0
- package/dist/components/feedback/Toast.mjs +30 -0
- package/dist/components/feedback/Toast.mjs.map +1 -0
- package/dist/components/feedback/Tooltip.cjs +51 -0
- package/dist/components/feedback/Tooltip.cjs.map +1 -0
- package/dist/components/feedback/Tooltip.d.cts +11 -0
- package/dist/components/feedback/Tooltip.d.ts +11 -0
- package/dist/components/feedback/Tooltip.mjs +49 -0
- package/dist/components/feedback/Tooltip.mjs.map +1 -0
- package/dist/components/forms/Checkbox.cjs +74 -0
- package/dist/components/forms/Checkbox.cjs.map +1 -0
- package/dist/components/forms/Checkbox.d.cts +16 -0
- package/dist/components/forms/Checkbox.d.ts +16 -0
- package/dist/components/forms/Checkbox.mjs +72 -0
- package/dist/components/forms/Checkbox.mjs.map +1 -0
- package/dist/components/forms/Combobox.cjs +217 -0
- package/dist/components/forms/Combobox.cjs.map +1 -0
- package/dist/components/forms/Combobox.d.cts +27 -0
- package/dist/components/forms/Combobox.d.ts +27 -0
- package/dist/components/forms/Combobox.mjs +215 -0
- package/dist/components/forms/Combobox.mjs.map +1 -0
- package/dist/components/forms/FileUpload.cjs +187 -0
- package/dist/components/forms/FileUpload.cjs.map +1 -0
- package/dist/components/forms/FileUpload.d.cts +26 -0
- package/dist/components/forms/FileUpload.d.ts +26 -0
- package/dist/components/forms/FileUpload.mjs +185 -0
- package/dist/components/forms/FileUpload.mjs.map +1 -0
- package/dist/components/forms/RadioGroup.cjs +73 -0
- package/dist/components/forms/RadioGroup.cjs.map +1 -0
- package/dist/components/forms/RadioGroup.d.cts +21 -0
- package/dist/components/forms/RadioGroup.d.ts +21 -0
- package/dist/components/forms/RadioGroup.mjs +71 -0
- package/dist/components/forms/RadioGroup.mjs.map +1 -0
- package/dist/components/forms/SegmentedControl.cjs +67 -0
- package/dist/components/forms/SegmentedControl.cjs.map +1 -0
- package/dist/components/forms/SegmentedControl.d.cts +19 -0
- package/dist/components/forms/SegmentedControl.d.ts +19 -0
- package/dist/components/forms/SegmentedControl.mjs +65 -0
- package/dist/components/forms/SegmentedControl.mjs.map +1 -0
- package/dist/components/forms/Select.cjs +67 -0
- package/dist/components/forms/Select.cjs.map +1 -0
- package/dist/components/forms/Select.d.cts +23 -0
- package/dist/components/forms/Select.d.ts +23 -0
- package/dist/components/forms/Select.mjs +65 -0
- package/dist/components/forms/Select.mjs.map +1 -0
- package/dist/components/forms/Slider.cjs +129 -0
- package/dist/components/forms/Slider.cjs.map +1 -0
- package/dist/components/forms/Slider.d.cts +24 -0
- package/dist/components/forms/Slider.d.ts +24 -0
- package/dist/components/forms/Slider.mjs +127 -0
- package/dist/components/forms/Slider.mjs.map +1 -0
- package/dist/components/forms/Switch.cjs +101 -0
- package/dist/components/forms/Switch.cjs.map +1 -0
- package/dist/components/forms/Switch.d.cts +24 -0
- package/dist/components/forms/Switch.d.ts +24 -0
- package/dist/components/forms/Switch.mjs +98 -0
- package/dist/components/forms/Switch.mjs.map +1 -0
- package/dist/components/forms/Textarea.cjs +35 -0
- package/dist/components/forms/Textarea.cjs.map +1 -0
- package/dist/components/forms/Textarea.d.cts +15 -0
- package/dist/components/forms/Textarea.d.ts +15 -0
- package/dist/components/forms/Textarea.mjs +33 -0
- package/dist/components/forms/Textarea.mjs.map +1 -0
- package/dist/components/navigation/Breadcrumb.cjs +27 -0
- package/dist/components/navigation/Breadcrumb.cjs.map +1 -0
- package/dist/components/navigation/Breadcrumb.d.cts +15 -0
- package/dist/components/navigation/Breadcrumb.d.ts +15 -0
- package/dist/components/navigation/Breadcrumb.mjs +25 -0
- package/dist/components/navigation/Breadcrumb.mjs.map +1 -0
- package/dist/components/navigation/CommandPalette.cjs +136 -0
- package/dist/components/navigation/CommandPalette.cjs.map +1 -0
- package/dist/components/navigation/CommandPalette.d.cts +26 -0
- package/dist/components/navigation/CommandPalette.d.ts +26 -0
- package/dist/components/navigation/CommandPalette.mjs +134 -0
- package/dist/components/navigation/CommandPalette.mjs.map +1 -0
- package/dist/components/navigation/Menu.cjs +104 -0
- package/dist/components/navigation/Menu.cjs.map +1 -0
- package/dist/components/navigation/Menu.d.cts +20 -0
- package/dist/components/navigation/Menu.d.ts +20 -0
- package/dist/components/navigation/Menu.mjs +102 -0
- package/dist/components/navigation/Menu.mjs.map +1 -0
- package/dist/components/navigation/Sidebar.cjs +60 -0
- package/dist/components/navigation/Sidebar.cjs.map +1 -0
- package/dist/components/navigation/Sidebar.d.cts +30 -0
- package/dist/components/navigation/Sidebar.d.ts +30 -0
- package/dist/components/navigation/Sidebar.mjs +58 -0
- package/dist/components/navigation/Sidebar.mjs.map +1 -0
- package/dist/components/navigation/Stepper.cjs +55 -0
- package/dist/components/navigation/Stepper.cjs.map +1 -0
- package/dist/components/navigation/Stepper.d.cts +21 -0
- package/dist/components/navigation/Stepper.d.ts +21 -0
- package/dist/components/navigation/Stepper.mjs +53 -0
- package/dist/components/navigation/Stepper.mjs.map +1 -0
- package/dist/components/product/BrandLogo.cjs +159 -0
- package/dist/components/product/BrandLogo.cjs.map +1 -0
- package/dist/components/product/BrandLogo.d.cts +28 -0
- package/dist/components/product/BrandLogo.d.ts +28 -0
- package/dist/components/product/BrandLogo.mjs +156 -0
- package/dist/components/product/BrandLogo.mjs.map +1 -0
- package/dist/components/product/ProductActionPill.cjs +57 -0
- package/dist/components/product/ProductActionPill.cjs.map +1 -0
- package/dist/components/product/ProductActionPill.d.cts +31 -0
- package/dist/components/product/ProductActionPill.d.ts +31 -0
- package/dist/components/product/ProductActionPill.mjs +52 -0
- package/dist/components/product/ProductActionPill.mjs.map +1 -0
- package/dist/components/product/ProductCinematic.cjs +69 -0
- package/dist/components/product/ProductCinematic.cjs.map +1 -0
- package/dist/components/product/ProductCinematic.d.cts +33 -0
- package/dist/components/product/ProductCinematic.d.ts +33 -0
- package/dist/components/product/ProductCinematic.mjs +63 -0
- package/dist/components/product/ProductCinematic.mjs.map +1 -0
- package/dist/components/product/ProductPageHeader.cjs +35 -0
- package/dist/components/product/ProductPageHeader.cjs.map +1 -0
- package/dist/components/product/ProductPageHeader.d.cts +13 -0
- package/dist/components/product/ProductPageHeader.d.ts +13 -0
- package/dist/components/product/ProductPageHeader.mjs +33 -0
- package/dist/components/product/ProductPageHeader.mjs.map +1 -0
- package/dist/components/product/SectionCard.cjs +72 -0
- package/dist/components/product/SectionCard.cjs.map +1 -0
- package/dist/components/product/SectionCard.d.cts +20 -0
- package/dist/components/product/SectionCard.d.ts +20 -0
- package/dist/components/product/SectionCard.mjs +70 -0
- package/dist/components/product/SectionCard.mjs.map +1 -0
- package/dist/components/product/ToolCard.cjs +70 -0
- package/dist/components/product/ToolCard.cjs.map +1 -0
- package/dist/components/product/ToolCard.d.cts +22 -0
- package/dist/components/product/ToolCard.d.ts +22 -0
- package/dist/components/product/ToolCard.mjs +68 -0
- package/dist/components/product/ToolCard.mjs.map +1 -0
- package/dist/index.cjs +2593 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +49 -0
- package/dist/index.d.ts +49 -0
- package/dist/index.mjs +2532 -0
- package/dist/index.mjs.map +1 -0
- package/dist/styles.css +463 -0
- package/package.json +50 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { ReactNode, CSSProperties } from 'react';
|
|
3
|
+
|
|
4
|
+
interface FilterChipProps {
|
|
5
|
+
label: string;
|
|
6
|
+
/** Trailing count, rendered tabular-mono. */
|
|
7
|
+
count?: number;
|
|
8
|
+
active?: boolean;
|
|
9
|
+
removable?: boolean;
|
|
10
|
+
onToggle?: () => void;
|
|
11
|
+
onRemove?: () => void;
|
|
12
|
+
icon?: ReactNode;
|
|
13
|
+
style?: CSSProperties;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* FilterChip — a toggleable filter / tag for catalog facets (분야, 프로토콜, 상태).
|
|
17
|
+
* Crisp small-radius tag with a hairline, NOT a rounded-full cushion. Active =
|
|
18
|
+
* persimmon tint + border + bold. Optional count (mono) and a removable ✕.
|
|
19
|
+
* @startingPoint section="Core" subtitle="Toggleable catalog filter" viewport="520x80"
|
|
20
|
+
*/
|
|
21
|
+
declare function FilterChip({ label, count, active, removable, onToggle, onRemove, icon, style }: FilterChipProps): react.JSX.Element;
|
|
22
|
+
|
|
23
|
+
export { FilterChip, type FilterChipProps };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { ReactNode, CSSProperties } from 'react';
|
|
3
|
+
|
|
4
|
+
interface FilterChipProps {
|
|
5
|
+
label: string;
|
|
6
|
+
/** Trailing count, rendered tabular-mono. */
|
|
7
|
+
count?: number;
|
|
8
|
+
active?: boolean;
|
|
9
|
+
removable?: boolean;
|
|
10
|
+
onToggle?: () => void;
|
|
11
|
+
onRemove?: () => void;
|
|
12
|
+
icon?: ReactNode;
|
|
13
|
+
style?: CSSProperties;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* FilterChip — a toggleable filter / tag for catalog facets (분야, 프로토콜, 상태).
|
|
17
|
+
* Crisp small-radius tag with a hairline, NOT a rounded-full cushion. Active =
|
|
18
|
+
* persimmon tint + border + bold. Optional count (mono) and a removable ✕.
|
|
19
|
+
* @startingPoint section="Core" subtitle="Toggleable catalog filter" viewport="520x80"
|
|
20
|
+
*/
|
|
21
|
+
declare function FilterChip({ label, count, active, removable, onToggle, onRemove, icon, style }: FilterChipProps): react.JSX.Element;
|
|
22
|
+
|
|
23
|
+
export { FilterChip, type FilterChipProps };
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
// src/components/core/FilterChip.tsx
|
|
4
|
+
function FilterChip({ label, count, active = false, removable = false, onToggle, onRemove, icon, style }) {
|
|
5
|
+
return /* @__PURE__ */ jsxs(
|
|
6
|
+
"button",
|
|
7
|
+
{
|
|
8
|
+
type: "button",
|
|
9
|
+
onClick: onToggle,
|
|
10
|
+
"aria-pressed": active,
|
|
11
|
+
style: {
|
|
12
|
+
display: "inline-flex",
|
|
13
|
+
alignItems: "center",
|
|
14
|
+
gap: 7,
|
|
15
|
+
height: 30,
|
|
16
|
+
padding: "0 10px",
|
|
17
|
+
borderRadius: "var(--dt-radius-sm)",
|
|
18
|
+
cursor: "pointer",
|
|
19
|
+
fontFamily: "var(--dt-font-sans)",
|
|
20
|
+
fontSize: 13,
|
|
21
|
+
fontWeight: active ? 650 : 500,
|
|
22
|
+
background: active ? "var(--dt-tint-accent)" : "var(--dt-surface)",
|
|
23
|
+
color: active ? "var(--dt-accent)" : "var(--dt-muted-strong)",
|
|
24
|
+
boxShadow: `inset 0 0 0 1px ${active ? "color-mix(in srgb, var(--dt-accent) 40%, transparent)" : "var(--dt-border-strong)"}`,
|
|
25
|
+
transition: "background-color var(--dt-motion-fast), box-shadow var(--dt-motion-fast)",
|
|
26
|
+
...style
|
|
27
|
+
},
|
|
28
|
+
children: [
|
|
29
|
+
icon ? /* @__PURE__ */ jsx("span", { style: { display: "inline-flex", color: active ? "var(--dt-accent)" : "var(--dt-muted)" }, "aria-hidden": "true", children: icon }) : null,
|
|
30
|
+
/* @__PURE__ */ jsx("span", { children: label }),
|
|
31
|
+
count != null ? /* @__PURE__ */ jsx("span", { style: { fontFamily: "var(--dt-font-mono)", fontSize: 11, fontWeight: 600, color: active ? "var(--dt-accent)" : "var(--dt-muted)", fontVariantNumeric: "tabular-nums" }, children: count }) : null,
|
|
32
|
+
removable ? /* @__PURE__ */ jsx(
|
|
33
|
+
"span",
|
|
34
|
+
{
|
|
35
|
+
role: "button",
|
|
36
|
+
"aria-label": "\uC81C\uAC70",
|
|
37
|
+
onClick: (e) => {
|
|
38
|
+
e.stopPropagation();
|
|
39
|
+
onRemove?.();
|
|
40
|
+
},
|
|
41
|
+
style: { display: "inline-flex", marginRight: -2, color: active ? "var(--dt-accent)" : "var(--dt-muted)" },
|
|
42
|
+
children: /* @__PURE__ */ jsx("svg", { width: "13", height: "13", viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsx("path", { d: "M18 6L6 18M6 6l12 12", stroke: "currentColor", strokeWidth: "2.2", strokeLinecap: "round" }) })
|
|
43
|
+
}
|
|
44
|
+
) : null
|
|
45
|
+
]
|
|
46
|
+
}
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export { FilterChip };
|
|
51
|
+
//# sourceMappingURL=FilterChip.mjs.map
|
|
52
|
+
//# sourceMappingURL=FilterChip.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/core/FilterChip.tsx"],"names":[],"mappings":";;;AAoBO,SAAS,UAAA,CAAW,EAAE,KAAA,EAAO,KAAA,EAAO,MAAA,GAAS,KAAA,EAAO,SAAA,GAAY,KAAA,EAAO,QAAA,EAAU,QAAA,EAAU,IAAA,EAAM,KAAA,EAAM,EAAoB;AAChI,EAAA,uBACE,IAAA;AAAA,IAAC,QAAA;AAAA,IAAA;AAAA,MACC,IAAA,EAAK,QAAA;AAAA,MACL,OAAA,EAAS,QAAA;AAAA,MACT,cAAA,EAAc,MAAA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AAA,EAAW,cAAA;AAAA,YACzB,OAAA,EAAS,CAAC,CAAA,KAAM;AAAE,cAAA,CAAA,CAAE,eAAA,EAAgB;AAAG,cAAA,QAAA,IAAW;AAAA,YAAG,CAAA;AAAA,YACrD,KAAA,EAAO,EAAE,OAAA,EAAS,aAAA,EAAe,aAAa,EAAA,EAAI,KAAA,EAAO,MAAA,GAAS,kBAAA,GAAqB,iBAAA,EAAkB;AAAA,YAEzG,QAAA,kBAAA,GAAA,CAAC,SAAI,KAAA,EAAM,IAAA,EAAK,QAAO,IAAA,EAAK,OAAA,EAAQ,WAAA,EAAY,IAAA,EAAK,MAAA,EAAO,aAAA,EAAY,QAAO,QAAA,kBAAA,GAAA,CAAC,MAAA,EAAA,EAAK,GAAE,sBAAA,EAAuB,MAAA,EAAO,gBAAe,WAAA,EAAY,KAAA,EAAM,aAAA,EAAc,OAAA,EAAQ,CAAA,EAAE;AAAA;AAAA,SAChL,GACE;AAAA;AAAA;AAAA,GACN;AAEJ","file":"FilterChip.mjs","sourcesContent":["import type { CSSProperties, ReactNode } from 'react';\n\nexport interface FilterChipProps {\n label: string;\n /** Trailing count, rendered tabular-mono. */\n count?: number;\n active?: boolean;\n removable?: boolean;\n onToggle?: () => void;\n onRemove?: () => void;\n icon?: ReactNode;\n style?: CSSProperties;\n}\n\n/**\n * FilterChip — a toggleable filter / tag for catalog facets (분야, 프로토콜, 상태).\n * Crisp small-radius tag with a hairline, NOT a rounded-full cushion. Active =\n * persimmon tint + border + bold. Optional count (mono) and a removable ✕.\n * @startingPoint section=\"Core\" subtitle=\"Toggleable catalog filter\" viewport=\"520x80\"\n */\nexport function FilterChip({ label, count, active = false, removable = false, onToggle, onRemove, icon, style }: FilterChipProps) {\n return (\n <button\n type=\"button\"\n onClick={onToggle}\n aria-pressed={active}\n style={{\n display: 'inline-flex', alignItems: 'center', gap: 7, height: 30, padding: '0 10px',\n borderRadius: 'var(--dt-radius-sm)', cursor: 'pointer',\n fontFamily: 'var(--dt-font-sans)', fontSize: 13, fontWeight: active ? 650 : 500,\n background: active ? 'var(--dt-tint-accent)' : 'var(--dt-surface)',\n color: active ? 'var(--dt-accent)' : 'var(--dt-muted-strong)',\n boxShadow: `inset 0 0 0 1px ${active ? 'color-mix(in srgb, var(--dt-accent) 40%, transparent)' : 'var(--dt-border-strong)'}`,\n transition: 'background-color var(--dt-motion-fast), box-shadow var(--dt-motion-fast)',\n ...style,\n }}\n >\n {icon ? <span style={{ display: 'inline-flex', color: active ? 'var(--dt-accent)' : 'var(--dt-muted)' }} aria-hidden=\"true\">{icon}</span> : null}\n <span>{label}</span>\n {count != null ? (\n <span style={{ fontFamily: 'var(--dt-font-mono)', fontSize: 11, fontWeight: 600, color: active ? 'var(--dt-accent)' : 'var(--dt-muted)', fontVariantNumeric: 'tabular-nums' }}>{count}</span>\n ) : null}\n {removable ? (\n <span\n role=\"button\" aria-label=\"제거\"\n onClick={(e) => { e.stopPropagation(); onRemove?.(); }}\n style={{ display: 'inline-flex', marginRight: -2, color: active ? 'var(--dt-accent)' : 'var(--dt-muted)' }}\n >\n <svg width=\"13\" height=\"13\" viewBox=\"0 0 24 24\" fill=\"none\" aria-hidden=\"true\"><path d=\"M18 6L6 18M6 6l12 12\" stroke=\"currentColor\" strokeWidth=\"2.2\" strokeLinecap=\"round\" /></svg>\n </span>\n ) : null}\n </button>\n );\n}\n"]}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
+
|
|
5
|
+
// src/components/core/Input.tsx
|
|
6
|
+
function Input({
|
|
7
|
+
label,
|
|
8
|
+
hint,
|
|
9
|
+
mono = false,
|
|
10
|
+
id,
|
|
11
|
+
type = "text",
|
|
12
|
+
prefix = null,
|
|
13
|
+
invalid = false,
|
|
14
|
+
style,
|
|
15
|
+
...rest
|
|
16
|
+
}) {
|
|
17
|
+
const inputId = id || (label ? `in-${label.replace(/\s+/g, "-")}` : void 0);
|
|
18
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "grid", gap: 8 }, children: [
|
|
19
|
+
label ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
20
|
+
"label",
|
|
21
|
+
{
|
|
22
|
+
htmlFor: inputId,
|
|
23
|
+
style: { fontSize: 13, fontWeight: 600, color: "var(--dt-muted-strong)" },
|
|
24
|
+
children: label
|
|
25
|
+
}
|
|
26
|
+
) : null,
|
|
27
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
28
|
+
"div",
|
|
29
|
+
{
|
|
30
|
+
className: invalid ? "dt-field dt-field-invalid" : "dt-field",
|
|
31
|
+
style: {
|
|
32
|
+
display: "flex",
|
|
33
|
+
alignItems: "center",
|
|
34
|
+
gap: 8,
|
|
35
|
+
padding: "0 12px"
|
|
36
|
+
},
|
|
37
|
+
children: [
|
|
38
|
+
prefix ? /* @__PURE__ */ jsxRuntime.jsx("span", { style: { color: "var(--dt-muted)", display: "inline-flex" }, children: prefix }) : null,
|
|
39
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
40
|
+
"input",
|
|
41
|
+
{
|
|
42
|
+
id: inputId,
|
|
43
|
+
type,
|
|
44
|
+
style: {
|
|
45
|
+
flex: 1,
|
|
46
|
+
border: "none",
|
|
47
|
+
outline: "none",
|
|
48
|
+
background: "transparent",
|
|
49
|
+
color: "var(--dt-ink-strong)",
|
|
50
|
+
padding: "11px 0",
|
|
51
|
+
fontFamily: mono ? "var(--dt-font-mono)" : "var(--dt-font-sans)",
|
|
52
|
+
fontSize: mono ? 13 : 14,
|
|
53
|
+
...style
|
|
54
|
+
},
|
|
55
|
+
...rest
|
|
56
|
+
}
|
|
57
|
+
)
|
|
58
|
+
]
|
|
59
|
+
}
|
|
60
|
+
),
|
|
61
|
+
hint ? /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontSize: 12, color: "var(--dt-muted)" }, children: hint }) : null
|
|
62
|
+
] });
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
exports.Input = Input;
|
|
66
|
+
//# sourceMappingURL=Input.cjs.map
|
|
67
|
+
//# sourceMappingURL=Input.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/core/Input.tsx"],"names":["jsxs","jsx"],"mappings":";;;;;AAiBO,SAAS,KAAA,CAAM;AAAA,EACpB,KAAA;AAAA,EACA,IAAA;AAAA,EACA,IAAA,GAAO,KAAA;AAAA,EACP,EAAA;AAAA,EACA,IAAA,GAAO,MAAA;AAAA,EACP,MAAA,GAAS,IAAA;AAAA,EACT,OAAA,GAAU,KAAA;AAAA,EACV,KAAA;AAAA,EACA,GAAG;AACL,CAAA,EAAe;AACb,EAAA,MAAM,OAAA,GAAU,OAAO,KAAA,GAAQ,CAAA,GAAA,EAAM,MAAM,OAAA,CAAQ,MAAA,EAAQ,GAAG,CAAC,CAAA,CAAA,GAAK,MAAA,CAAA;AACpE,EAAA,uBACEA,eAAA,CAAC,SAAI,KAAA,EAAO,EAAE,SAAS,MAAA,EAAQ,GAAA,EAAK,GAAE,EACnC,QAAA,EAAA;AAAA,IAAA,KAAA,mBACCC,cAAA;AAAA,MAAC,OAAA;AAAA,MAAA;AAAA,QACC,OAAA,EAAS,OAAA;AAAA,QACT,OAAO,EAAE,QAAA,EAAU,IAAI,UAAA,EAAY,GAAA,EAAK,OAAO,wBAAA,EAAyB;AAAA,QAEvE,QAAA,EAAA;AAAA;AAAA,KACH,GACE,IAAA;AAAA,oBACJD,eAAA;AAAA,MAAC,KAAA;AAAA,MAAA;AAAA,QACC,SAAA,EAAW,UAAU,2BAAA,GAA8B,UAAA;AAAA,QACnD,KAAA,EAAO;AAAA,UACL,OAAA,EAAS,MAAA;AAAA,UACT,UAAA,EAAY,QAAA;AAAA,UACZ,GAAA,EAAK,CAAA;AAAA,UACL,OAAA,EAAS;AAAA,SACX;AAAA,QAEC,QAAA,EAAA;AAAA,UAAA,MAAA,mBAASC,cAAA,CAAC,MAAA,EAAA,EAAK,KAAA,EAAO,EAAE,KAAA,EAAO,mBAAmB,OAAA,EAAS,aAAA,EAAc,EAAI,QAAA,EAAA,MAAA,EAAO,CAAA,GAAU,IAAA;AAAA,0BAC/FA,cAAA;AAAA,YAAC,OAAA;AAAA,YAAA;AAAA,cACC,EAAA,EAAI,OAAA;AAAA,cACJ,IAAA;AAAA,cACA,KAAA,EAAO;AAAA,gBACL,IAAA,EAAM,CAAA;AAAA,gBACN,MAAA,EAAQ,MAAA;AAAA,gBACR,OAAA,EAAS,MAAA;AAAA,gBACT,UAAA,EAAY,aAAA;AAAA,gBACZ,KAAA,EAAO,sBAAA;AAAA,gBACP,OAAA,EAAS,QAAA;AAAA,gBACT,UAAA,EAAY,OAAO,qBAAA,GAAwB,qBAAA;AAAA,gBAC3C,QAAA,EAAU,OAAO,EAAA,GAAK,EAAA;AAAA,gBACtB,GAAG;AAAA,eACL;AAAA,cACC,GAAG;AAAA;AAAA;AACN;AAAA;AAAA,KACF;AAAA,IACC,IAAA,mBAAOA,cAAA,CAAC,MAAA,EAAA,EAAK,KAAA,EAAO,EAAE,QAAA,EAAU,EAAA,EAAI,KAAA,EAAO,iBAAA,EAAkB,EAAI,QAAA,EAAA,IAAA,EAAK,CAAA,GAAU;AAAA,GAAA,EACnF,CAAA;AAEJ","file":"Input.cjs","sourcesContent":["import type { CSSProperties, InputHTMLAttributes, ReactNode } from 'react';\n\nexport interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'prefix' | 'style'> {\n label?: string;\n hint?: string;\n /** Render the value in JetBrains Mono — for API paths, keys, IDs. */\n mono?: boolean;\n /** Leading adornment (icon or short text). */\n prefix?: ReactNode;\n invalid?: boolean;\n style?: CSSProperties;\n}\n\n/**\n * Compact labeled input, paired with a label or table context. Supports a\n * mono variant for API paths / keys / IDs.\n */\nexport function Input({\n label,\n hint,\n mono = false,\n id,\n type = 'text',\n prefix = null,\n invalid = false,\n style,\n ...rest\n}: InputProps) {\n const inputId = id || (label ? `in-${label.replace(/\\s+/g, '-')}` : undefined);\n return (\n <div style={{ display: 'grid', gap: 8 }}>\n {label ? (\n <label\n htmlFor={inputId}\n style={{ fontSize: 13, fontWeight: 600, color: 'var(--dt-muted-strong)' }}\n >\n {label}\n </label>\n ) : null}\n <div\n className={invalid ? 'dt-field dt-field-invalid' : 'dt-field'}\n style={{\n display: 'flex',\n alignItems: 'center',\n gap: 8,\n padding: '0 12px',\n }}\n >\n {prefix ? <span style={{ color: 'var(--dt-muted)', display: 'inline-flex' }}>{prefix}</span> : null}\n <input\n id={inputId}\n type={type}\n style={{\n flex: 1,\n border: 'none',\n outline: 'none',\n background: 'transparent',\n color: 'var(--dt-ink-strong)',\n padding: '11px 0',\n fontFamily: mono ? 'var(--dt-font-mono)' : 'var(--dt-font-sans)',\n fontSize: mono ? 13 : 14,\n ...style,\n }}\n {...rest}\n />\n </div>\n {hint ? <span style={{ fontSize: 12, color: 'var(--dt-muted)' }}>{hint}</span> : null}\n </div>\n );\n}\n"]}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { InputHTMLAttributes, ReactNode, CSSProperties } from 'react';
|
|
3
|
+
|
|
4
|
+
interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'prefix' | 'style'> {
|
|
5
|
+
label?: string;
|
|
6
|
+
hint?: string;
|
|
7
|
+
/** Render the value in JetBrains Mono — for API paths, keys, IDs. */
|
|
8
|
+
mono?: boolean;
|
|
9
|
+
/** Leading adornment (icon or short text). */
|
|
10
|
+
prefix?: ReactNode;
|
|
11
|
+
invalid?: boolean;
|
|
12
|
+
style?: CSSProperties;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Compact labeled input, paired with a label or table context. Supports a
|
|
16
|
+
* mono variant for API paths / keys / IDs.
|
|
17
|
+
*/
|
|
18
|
+
declare function Input({ label, hint, mono, id, type, prefix, invalid, style, ...rest }: InputProps): react.JSX.Element;
|
|
19
|
+
|
|
20
|
+
export { Input, type InputProps };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { InputHTMLAttributes, ReactNode, CSSProperties } from 'react';
|
|
3
|
+
|
|
4
|
+
interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'prefix' | 'style'> {
|
|
5
|
+
label?: string;
|
|
6
|
+
hint?: string;
|
|
7
|
+
/** Render the value in JetBrains Mono — for API paths, keys, IDs. */
|
|
8
|
+
mono?: boolean;
|
|
9
|
+
/** Leading adornment (icon or short text). */
|
|
10
|
+
prefix?: ReactNode;
|
|
11
|
+
invalid?: boolean;
|
|
12
|
+
style?: CSSProperties;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Compact labeled input, paired with a label or table context. Supports a
|
|
16
|
+
* mono variant for API paths / keys / IDs.
|
|
17
|
+
*/
|
|
18
|
+
declare function Input({ label, hint, mono, id, type, prefix, invalid, style, ...rest }: InputProps): react.JSX.Element;
|
|
19
|
+
|
|
20
|
+
export { Input, type InputProps };
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
// src/components/core/Input.tsx
|
|
4
|
+
function Input({
|
|
5
|
+
label,
|
|
6
|
+
hint,
|
|
7
|
+
mono = false,
|
|
8
|
+
id,
|
|
9
|
+
type = "text",
|
|
10
|
+
prefix = null,
|
|
11
|
+
invalid = false,
|
|
12
|
+
style,
|
|
13
|
+
...rest
|
|
14
|
+
}) {
|
|
15
|
+
const inputId = id || (label ? `in-${label.replace(/\s+/g, "-")}` : void 0);
|
|
16
|
+
return /* @__PURE__ */ jsxs("div", { style: { display: "grid", gap: 8 }, children: [
|
|
17
|
+
label ? /* @__PURE__ */ jsx(
|
|
18
|
+
"label",
|
|
19
|
+
{
|
|
20
|
+
htmlFor: inputId,
|
|
21
|
+
style: { fontSize: 13, fontWeight: 600, color: "var(--dt-muted-strong)" },
|
|
22
|
+
children: label
|
|
23
|
+
}
|
|
24
|
+
) : null,
|
|
25
|
+
/* @__PURE__ */ jsxs(
|
|
26
|
+
"div",
|
|
27
|
+
{
|
|
28
|
+
className: invalid ? "dt-field dt-field-invalid" : "dt-field",
|
|
29
|
+
style: {
|
|
30
|
+
display: "flex",
|
|
31
|
+
alignItems: "center",
|
|
32
|
+
gap: 8,
|
|
33
|
+
padding: "0 12px"
|
|
34
|
+
},
|
|
35
|
+
children: [
|
|
36
|
+
prefix ? /* @__PURE__ */ jsx("span", { style: { color: "var(--dt-muted)", display: "inline-flex" }, children: prefix }) : null,
|
|
37
|
+
/* @__PURE__ */ jsx(
|
|
38
|
+
"input",
|
|
39
|
+
{
|
|
40
|
+
id: inputId,
|
|
41
|
+
type,
|
|
42
|
+
style: {
|
|
43
|
+
flex: 1,
|
|
44
|
+
border: "none",
|
|
45
|
+
outline: "none",
|
|
46
|
+
background: "transparent",
|
|
47
|
+
color: "var(--dt-ink-strong)",
|
|
48
|
+
padding: "11px 0",
|
|
49
|
+
fontFamily: mono ? "var(--dt-font-mono)" : "var(--dt-font-sans)",
|
|
50
|
+
fontSize: mono ? 13 : 14,
|
|
51
|
+
...style
|
|
52
|
+
},
|
|
53
|
+
...rest
|
|
54
|
+
}
|
|
55
|
+
)
|
|
56
|
+
]
|
|
57
|
+
}
|
|
58
|
+
),
|
|
59
|
+
hint ? /* @__PURE__ */ jsx("span", { style: { fontSize: 12, color: "var(--dt-muted)" }, children: hint }) : null
|
|
60
|
+
] });
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export { Input };
|
|
64
|
+
//# sourceMappingURL=Input.mjs.map
|
|
65
|
+
//# sourceMappingURL=Input.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/core/Input.tsx"],"names":[],"mappings":";;;AAiBO,SAAS,KAAA,CAAM;AAAA,EACpB,KAAA;AAAA,EACA,IAAA;AAAA,EACA,IAAA,GAAO,KAAA;AAA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AAQ,MAAA;AAAA,gBACR,OAAA,EAAS,MAAA;AAAA,gBACT,UAAA,EAAY,aAAA;AAAA,gBACZ,KAAA,EAAO,sBAAA;AAAA,gBACP,OAAA,EAAS,QAAA;AAAA,gBACT,UAAA,EAAY,OAAO,qBAAA,GAAwB,qBAAA;AAAA,gBAC3C,QAAA,EAAU,OAAO,EAAA,GAAK,EAAA;AAAA,gBACtB,GAAG;AAAA,eACL;AAAA,cACC,GAAG;AAAA;AAAA;AACN;AAAA;AAAA,KACF;AAAA,IACC,IAAA,mBAAO,GAAA,CAAC,MAAA,EAAA,EAAK,KAAA,EAAO,EAAE,QAAA,EAAU,EAAA,EAAI,KAAA,EAAO,iBAAA,EAAkB,EAAI,QAAA,EAAA,IAAA,EAAK,CAAA,GAAU;AAAA,GAAA,EACnF,CAAA;AAEJ","file":"Input.mjs","sourcesContent":["import type { CSSProperties, InputHTMLAttributes, ReactNode } from 'react';\n\nexport interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'prefix' | 'style'> {\n label?: string;\n hint?: string;\n /** Render the value in JetBrains Mono — for API paths, keys, IDs. */\n mono?: boolean;\n /** Leading adornment (icon or short text). */\n prefix?: ReactNode;\n invalid?: boolean;\n style?: CSSProperties;\n}\n\n/**\n * Compact labeled input, paired with a label or table context. Supports a\n * mono variant for API paths / keys / IDs.\n */\nexport function Input({\n label,\n hint,\n mono = false,\n id,\n type = 'text',\n prefix = null,\n invalid = false,\n style,\n ...rest\n}: InputProps) {\n const inputId = id || (label ? `in-${label.replace(/\\s+/g, '-')}` : undefined);\n return (\n <div style={{ display: 'grid', gap: 8 }}>\n {label ? (\n <label\n htmlFor={inputId}\n style={{ fontSize: 13, fontWeight: 600, color: 'var(--dt-muted-strong)' }}\n >\n {label}\n </label>\n ) : null}\n <div\n className={invalid ? 'dt-field dt-field-invalid' : 'dt-field'}\n style={{\n display: 'flex',\n alignItems: 'center',\n gap: 8,\n padding: '0 12px',\n }}\n >\n {prefix ? <span style={{ color: 'var(--dt-muted)', display: 'inline-flex' }}>{prefix}</span> : null}\n <input\n id={inputId}\n type={type}\n style={{\n flex: 1,\n border: 'none',\n outline: 'none',\n background: 'transparent',\n color: 'var(--dt-ink-strong)',\n padding: '11px 0',\n fontFamily: mono ? 'var(--dt-font-mono)' : 'var(--dt-font-sans)',\n fontSize: mono ? 13 : 14,\n ...style,\n }}\n {...rest}\n />\n </div>\n {hint ? <span style={{ fontSize: 12, color: 'var(--dt-muted)' }}>{hint}</span> : null}\n </div>\n );\n}\n"]}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
+
|
|
5
|
+
// src/components/core/StatusPill.tsx
|
|
6
|
+
var STATUS = {
|
|
7
|
+
connected: { bg: "var(--dt-tint-success)", fg: "var(--dt-success)" },
|
|
8
|
+
success: { bg: "var(--dt-tint-success)", fg: "var(--dt-success)" },
|
|
9
|
+
reconnecting: { bg: "var(--dt-tint-warning)", fg: "var(--dt-warning)" },
|
|
10
|
+
warning: { bg: "var(--dt-tint-warning)", fg: "var(--dt-warning)" },
|
|
11
|
+
disconnected: { bg: "var(--dt-tint-danger)", fg: "var(--dt-danger)" },
|
|
12
|
+
danger: { bg: "var(--dt-tint-danger)", fg: "var(--dt-danger)" },
|
|
13
|
+
info: { bg: "var(--dt-tint-cobalt)", fg: "var(--dt-info)" },
|
|
14
|
+
idle: { bg: "var(--dt-tint-muted)", fg: "var(--dt-muted-strong)" }
|
|
15
|
+
};
|
|
16
|
+
function StatusPill({ status = "idle", children, pulse = false, style, ...rest }) {
|
|
17
|
+
const tone = STATUS[status] ?? STATUS.idle;
|
|
18
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
19
|
+
"span",
|
|
20
|
+
{
|
|
21
|
+
style: {
|
|
22
|
+
display: "inline-flex",
|
|
23
|
+
alignItems: "center",
|
|
24
|
+
gap: 6,
|
|
25
|
+
borderRadius: "var(--dt-radius-full)",
|
|
26
|
+
background: tone.bg,
|
|
27
|
+
padding: "4px 10px",
|
|
28
|
+
fontSize: 12,
|
|
29
|
+
fontWeight: 600,
|
|
30
|
+
color: tone.fg,
|
|
31
|
+
...style
|
|
32
|
+
},
|
|
33
|
+
...rest,
|
|
34
|
+
children: [
|
|
35
|
+
pulse ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
36
|
+
"span",
|
|
37
|
+
{
|
|
38
|
+
"aria-hidden": "true",
|
|
39
|
+
style: {
|
|
40
|
+
width: 7,
|
|
41
|
+
height: 7,
|
|
42
|
+
borderRadius: "9999px",
|
|
43
|
+
background: tone.fg,
|
|
44
|
+
animation: "dt-status-pulse 1.6s var(--dt-ease) infinite"
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
) : null,
|
|
48
|
+
children,
|
|
49
|
+
/* @__PURE__ */ jsxRuntime.jsx("style", { children: "@keyframes dt-status-pulse{0%,100%{opacity:1}50%{opacity:.35}}" })
|
|
50
|
+
]
|
|
51
|
+
}
|
|
52
|
+
);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
exports.StatusPill = StatusPill;
|
|
56
|
+
//# sourceMappingURL=StatusPill.cjs.map
|
|
57
|
+
//# sourceMappingURL=StatusPill.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/core/StatusPill.tsx"],"names":["jsxs","jsx"],"mappings":";;;;;AAEA,IAAM,MAAA,GAAS;AAAA,EACb,SAAA,EAAW,EAAE,EAAA,EAAI,wBAAA,EAA0B,IAAI,mBAAA,EAAoB;AAAA,EACnE,OAAA,EAAS,EAAE,EAAA,EAAI,wBAAA,EAA0B,IAAI,mBAAA,EAAoB;AAAA,EACjE,YAAA,EAAc,EAAE,EAAA,EAAI,wBAAA,EAA0B,IAAI,mBAAA,EAAoB;AAAA,EACtE,OAAA,EAAS,EAAE,EAAA,EAAI,wBAAA,EAA0B,IAAI,mBAAA,EAAoB;AAAA,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,IAAA;AAAA,QACH,QAAA;AAAA,wBACDA,cAAA,CAAC,WAAO,QAAA,EAAA,gEAAA,EAAiE;AAAA;AAAA;AAAA,GAC3E;AAEJ","file":"StatusPill.cjs","sourcesContent":["import type { CSSProperties, HTMLAttributes, ReactNode } from 'react';\n\nconst STATUS = {\n connected: { bg: 'var(--dt-tint-success)', fg: 'var(--dt-success)' },\n success: { bg: 'var(--dt-tint-success)', fg: 'var(--dt-success)' },\n reconnecting: { bg: 'var(--dt-tint-warning)', fg: 'var(--dt-warning)' },\n warning: { bg: 'var(--dt-tint-warning)', fg: 'var(--dt-warning)' },\n disconnected: { bg: 'var(--dt-tint-danger)', fg: 'var(--dt-danger)' },\n danger: { bg: 'var(--dt-tint-danger)', fg: 'var(--dt-danger)' },\n info: { bg: 'var(--dt-tint-cobalt)', fg: 'var(--dt-info)' },\n idle: { bg: 'var(--dt-tint-muted)', fg: 'var(--dt-muted-strong)' },\n};\n\nexport interface StatusPillProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'style'> {\n /** Semantic state — drives the dot color. */\n status?: 'connected' | 'success' | 'reconnecting' | 'warning' | 'disconnected' | 'danger' | 'info' | 'idle';\n children?: ReactNode;\n /** Pulse the dot (use for transient states like reconnecting). */\n pulse?: boolean;\n style?: CSSProperties;\n}\n\n/**\n * Compact status pill: a tinted fill carrying a colored label — the console's\n * most-used status affordance (gateway / stream state). No outline, no dot;\n * an optional pulse marker appears only for live (`pulse`) states.\n */\nexport function StatusPill({ status = 'idle', children, pulse = false, style, ...rest }: StatusPillProps) {\n const tone = STATUS[status] ?? STATUS.idle;\n return (\n <span\n style={{\n display: 'inline-flex',\n alignItems: 'center',\n gap: 6,\n borderRadius: 'var(--dt-radius-full)',\n background: tone.bg,\n padding: '4px 10px',\n fontSize: 12,\n fontWeight: 600,\n color: tone.fg,\n ...style,\n }}\n {...rest}\n >\n {pulse ? (\n <span\n aria-hidden=\"true\"\n style={{\n width: 7,\n height: 7,\n borderRadius: '9999px',\n background: tone.fg,\n animation: 'dt-status-pulse 1.6s var(--dt-ease) infinite',\n }}\n />\n ) : null}\n {children}\n <style>{'@keyframes dt-status-pulse{0%,100%{opacity:1}50%{opacity:.35}}'}</style>\n </span>\n );\n}\n"]}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { HTMLAttributes, ReactNode, CSSProperties } from 'react';
|
|
3
|
+
|
|
4
|
+
interface StatusPillProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'style'> {
|
|
5
|
+
/** Semantic state — drives the dot color. */
|
|
6
|
+
status?: 'connected' | 'success' | 'reconnecting' | 'warning' | 'disconnected' | 'danger' | 'info' | 'idle';
|
|
7
|
+
children?: ReactNode;
|
|
8
|
+
/** Pulse the dot (use for transient states like reconnecting). */
|
|
9
|
+
pulse?: boolean;
|
|
10
|
+
style?: CSSProperties;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Compact status pill: a tinted fill carrying a colored label — the console's
|
|
14
|
+
* most-used status affordance (gateway / stream state). No outline, no dot;
|
|
15
|
+
* an optional pulse marker appears only for live (`pulse`) states.
|
|
16
|
+
*/
|
|
17
|
+
declare function StatusPill({ status, children, pulse, style, ...rest }: StatusPillProps): react.JSX.Element;
|
|
18
|
+
|
|
19
|
+
export { StatusPill, type StatusPillProps };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { HTMLAttributes, ReactNode, CSSProperties } from 'react';
|
|
3
|
+
|
|
4
|
+
interface StatusPillProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'style'> {
|
|
5
|
+
/** Semantic state — drives the dot color. */
|
|
6
|
+
status?: 'connected' | 'success' | 'reconnecting' | 'warning' | 'disconnected' | 'danger' | 'info' | 'idle';
|
|
7
|
+
children?: ReactNode;
|
|
8
|
+
/** Pulse the dot (use for transient states like reconnecting). */
|
|
9
|
+
pulse?: boolean;
|
|
10
|
+
style?: CSSProperties;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Compact status pill: a tinted fill carrying a colored label — the console's
|
|
14
|
+
* most-used status affordance (gateway / stream state). No outline, no dot;
|
|
15
|
+
* an optional pulse marker appears only for live (`pulse`) states.
|
|
16
|
+
*/
|
|
17
|
+
declare function StatusPill({ status, children, pulse, style, ...rest }: StatusPillProps): react.JSX.Element;
|
|
18
|
+
|
|
19
|
+
export { StatusPill, type StatusPillProps };
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
// src/components/core/StatusPill.tsx
|
|
4
|
+
var STATUS = {
|
|
5
|
+
connected: { bg: "var(--dt-tint-success)", fg: "var(--dt-success)" },
|
|
6
|
+
success: { bg: "var(--dt-tint-success)", fg: "var(--dt-success)" },
|
|
7
|
+
reconnecting: { bg: "var(--dt-tint-warning)", fg: "var(--dt-warning)" },
|
|
8
|
+
warning: { bg: "var(--dt-tint-warning)", fg: "var(--dt-warning)" },
|
|
9
|
+
disconnected: { bg: "var(--dt-tint-danger)", fg: "var(--dt-danger)" },
|
|
10
|
+
danger: { bg: "var(--dt-tint-danger)", fg: "var(--dt-danger)" },
|
|
11
|
+
info: { bg: "var(--dt-tint-cobalt)", fg: "var(--dt-info)" },
|
|
12
|
+
idle: { bg: "var(--dt-tint-muted)", fg: "var(--dt-muted-strong)" }
|
|
13
|
+
};
|
|
14
|
+
function StatusPill({ status = "idle", children, pulse = false, style, ...rest }) {
|
|
15
|
+
const tone = STATUS[status] ?? STATUS.idle;
|
|
16
|
+
return /* @__PURE__ */ jsxs(
|
|
17
|
+
"span",
|
|
18
|
+
{
|
|
19
|
+
style: {
|
|
20
|
+
display: "inline-flex",
|
|
21
|
+
alignItems: "center",
|
|
22
|
+
gap: 6,
|
|
23
|
+
borderRadius: "var(--dt-radius-full)",
|
|
24
|
+
background: tone.bg,
|
|
25
|
+
padding: "4px 10px",
|
|
26
|
+
fontSize: 12,
|
|
27
|
+
fontWeight: 600,
|
|
28
|
+
color: tone.fg,
|
|
29
|
+
...style
|
|
30
|
+
},
|
|
31
|
+
...rest,
|
|
32
|
+
children: [
|
|
33
|
+
pulse ? /* @__PURE__ */ jsx(
|
|
34
|
+
"span",
|
|
35
|
+
{
|
|
36
|
+
"aria-hidden": "true",
|
|
37
|
+
style: {
|
|
38
|
+
width: 7,
|
|
39
|
+
height: 7,
|
|
40
|
+
borderRadius: "9999px",
|
|
41
|
+
background: tone.fg,
|
|
42
|
+
animation: "dt-status-pulse 1.6s var(--dt-ease) infinite"
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
) : null,
|
|
46
|
+
children,
|
|
47
|
+
/* @__PURE__ */ jsx("style", { children: "@keyframes dt-status-pulse{0%,100%{opacity:1}50%{opacity:.35}}" })
|
|
48
|
+
]
|
|
49
|
+
}
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export { StatusPill };
|
|
54
|
+
//# sourceMappingURL=StatusPill.mjs.map
|
|
55
|
+
//# sourceMappingURL=StatusPill.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/core/StatusPill.tsx"],"names":[],"mappings":";;;AAEA,IAAM,MAAA,GAAS;AAAA,EACb,SAAA,EAAW,EAAE,EAAA,EAAI,wBAAA,EAA0B,IAAI,mBAAA,EAAoB;AAAA,EACnE,OAAA,EAAS,EAAE,EAAA,EAAI,wBAAA,EAA0B,IAAI,mBAAA,EAAoB;AAAA,EACjE,YAAA,EAAc,EAAE,EAAA,EAAI,wBAAA,EAA0B,IAAI,mBAAA,EAAoB;AAAA,EACtE,OAAA,EAAS,EAAE,EAAA,EAAI,wBAAA,EAA0B,IAAI,mBAAA,EAAoB;AAAA,EACjE,YAAA,EAAc,EAAE,EAAA,EAAI,uBAAA,EAAyB,IAAI,kBAAA,EAAmB;AAAA,EACpE,MAAA,EAAQ,EAAE,EAAA,EAAI,uBAAA,EAAy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sourcesContent":["import type { CSSProperties, HTMLAttributes, ReactNode } from 'react';\n\nconst STATUS = {\n connected: { bg: 'var(--dt-tint-success)', fg: 'var(--dt-success)' },\n success: { bg: 'var(--dt-tint-success)', fg: 'var(--dt-success)' },\n reconnecting: { bg: 'var(--dt-tint-warning)', fg: 'var(--dt-warning)' },\n warning: { bg: 'var(--dt-tint-warning)', fg: 'var(--dt-warning)' },\n disconnected: { bg: 'var(--dt-tint-danger)', fg: 'var(--dt-danger)' },\n danger: { bg: 'var(--dt-tint-danger)', fg: 'var(--dt-danger)' },\n info: { bg: 'var(--dt-tint-cobalt)', fg: 'var(--dt-info)' },\n idle: { bg: 'var(--dt-tint-muted)', fg: 'var(--dt-muted-strong)' },\n};\n\nexport interface StatusPillProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'style'> {\n /** Semantic state — drives the dot color. */\n status?: 'connected' | 'success' | 'reconnecting' | 'warning' | 'disconnected' | 'danger' | 'info' | 'idle';\n children?: ReactNode;\n /** Pulse the dot (use for transient states like reconnecting). */\n pulse?: boolean;\n style?: CSSProperties;\n}\n\n/**\n * Compact status pill: a tinted fill carrying a colored label — the console's\n * most-used status affordance (gateway / stream state). No outline, no dot;\n * an optional pulse marker appears only for live (`pulse`) states.\n */\nexport function StatusPill({ status = 'idle', children, pulse = false, style, ...rest }: StatusPillProps) {\n const tone = STATUS[status] ?? STATUS.idle;\n return (\n <span\n style={{\n display: 'inline-flex',\n alignItems: 'center',\n gap: 6,\n borderRadius: 'var(--dt-radius-full)',\n background: tone.bg,\n padding: '4px 10px',\n fontSize: 12,\n fontWeight: 600,\n color: tone.fg,\n ...style,\n }}\n {...rest}\n >\n {pulse ? (\n <span\n aria-hidden=\"true\"\n style={{\n width: 7,\n height: 7,\n borderRadius: '9999px',\n background: tone.fg,\n animation: 'dt-status-pulse 1.6s var(--dt-ease) infinite',\n }}\n />\n ) : null}\n {children}\n <style>{'@keyframes dt-status-pulse{0%,100%{opacity:1}50%{opacity:.35}}'}</style>\n </span>\n );\n}\n"]}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
+
|
|
5
|
+
// src/lib/cx.ts
|
|
6
|
+
function cx(...classes) {
|
|
7
|
+
return classes.filter(Boolean).join(" ");
|
|
8
|
+
}
|
|
9
|
+
var SurfaceTone = {
|
|
10
|
+
Default: "default",
|
|
11
|
+
Raised: "raised",
|
|
12
|
+
Sunken: "sunken"
|
|
13
|
+
};
|
|
14
|
+
var MetricAccent = {
|
|
15
|
+
Accent: "accent",
|
|
16
|
+
Success: "success",
|
|
17
|
+
Info: "info"
|
|
18
|
+
};
|
|
19
|
+
var surfaceToneClass = {
|
|
20
|
+
[SurfaceTone.Default]: "bg-[var(--dt-surface)]",
|
|
21
|
+
[SurfaceTone.Raised]: "bg-[var(--dt-surface-raised)]",
|
|
22
|
+
[SurfaceTone.Sunken]: "bg-[var(--dt-surface-sunken)]"
|
|
23
|
+
};
|
|
24
|
+
var metricAccentClass = {
|
|
25
|
+
[MetricAccent.Accent]: "text-[var(--dt-accent)]",
|
|
26
|
+
[MetricAccent.Success]: "text-[var(--dt-success)]",
|
|
27
|
+
[MetricAccent.Info]: "text-[var(--dt-info)]"
|
|
28
|
+
};
|
|
29
|
+
function Panel({ tone = SurfaceTone.Default, className, children, ...props }) {
|
|
30
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
31
|
+
"section",
|
|
32
|
+
{
|
|
33
|
+
className: cx(
|
|
34
|
+
"rounded-dtLg border border-[var(--dt-border)] px-5 py-5 md:px-6 md:py-6",
|
|
35
|
+
surfaceToneClass[tone],
|
|
36
|
+
className
|
|
37
|
+
),
|
|
38
|
+
...props,
|
|
39
|
+
children
|
|
40
|
+
}
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
function metricAccentColor(accent) {
|
|
44
|
+
return metricAccentClass[accent];
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
exports.MetricAccent = MetricAccent;
|
|
48
|
+
exports.Panel = Panel;
|
|
49
|
+
exports.SurfaceTone = SurfaceTone;
|
|
50
|
+
exports.metricAccentColor = metricAccentColor;
|
|
51
|
+
//# sourceMappingURL=Surface.cjs.map
|
|
52
|
+
//# sourceMappingURL=Surface.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/lib/cx.ts","../../../src/components/core/Surface.tsx"],"names":["jsx"],"mappings":";;;;;AAAO,SAAS,MAAM,OAAA,EAA2D;AAC/E,EAAA,OAAO,OAAA,CAAQ,MAAA,CAAO,OAAO,CAAA,CAAE,KAAK,GAAG,CAAA;AACzC;ACCO,IAAM,WAAA,GAAc;AAAA,EACzB,OAAA,EAAS,SAAA;AAAA,EACT,MAAA,EAAQ,QAAA;AAAA,EACR,MAAA,EAAQ;AACV;AAIO,IAAM,YAAA,GAAe;AAAA,EAC1B,MAAA,EAAQ,QAAA;AAAA,EACR,OAAA,EAAS,SAAA;AAAA,EACT,IAAA,EAAM;AACR;AAKA,IAAM,gBAAA,GAAgD;AAAA,EACpD,CAAC,WAAA,CAAY,OAAO,GAAG,wBAAA;AAAA,EACvB,CAAC,WAAA,CAAY,MAAM,GAAG,+BAAA;AAAA,EACtB,CAAC,WAAA,CAAY,MAAM,GAAG;AACxB,CAAA;AAEA,IAAM,iBAAA,GAAsD;AAAA,EAC1D,CAAC,YAAA,CAAa,MAAM,GAAG,yBAAA;AAAA,EACvB,CAAC,YAAA,CAAa,OAAO,GAAG,0BAAA;AAAA,EACxB,CAAC,YAAA,CAAa,IAAI,GAAG;AACvB,CAAA;AAOO,SAAS,KAAA,CAAM,EAAE,IAAA,GAAO,WAAA,CAAY,SAAS,SAAA,EAAW,QAAA,EAAU,GAAG,KAAA,EAAM,EAAe;AAC/F,EAAA,uBACEA,cAAA;AAAA,IAAC,SAAA;AAAA,IAAA;AAAA,MACC,SAAA,EAAW,EAAA;AAAA,QACT,yEAAA;AAAA,QACA,iBAAiB,IAAI,CAAA;AAAA,QACrB;AAAA,OACF;AAAA,MACC,GAAG,KAAA;AAAA,MAEH;AAAA;AAAA,GACH;AAEJ;AAEO,SAAS,kBAAkB,MAAA,EAAkC;AAClE,EAAA,OAAO,kBAAkB,MAAM,CAAA;AACjC","file":"Surface.cjs","sourcesContent":["export function cx(...classes: Array<string | false | null | undefined>): string {\n return classes.filter(Boolean).join(' ');\n}\n","import type { ComponentPropsWithoutRef, ReactNode } from 'react';\nimport { cx } from '../../lib/cx';\n\nexport const SurfaceTone = {\n Default: 'default',\n Raised: 'raised',\n Sunken: 'sunken',\n} as const;\n\nexport type SurfaceTone = (typeof SurfaceTone)[keyof typeof SurfaceTone];\n\nexport const MetricAccent = {\n Accent: 'accent',\n Success: 'success',\n Info: 'info',\n} as const;\n\nexport type MetricAccent = (typeof MetricAccent)[keyof typeof MetricAccent];\nexport type MetricAccentName = MetricAccent;\n\nconst surfaceToneClass: Record<SurfaceTone, string> = {\n [SurfaceTone.Default]: 'bg-[var(--dt-surface)]',\n [SurfaceTone.Raised]: 'bg-[var(--dt-surface-raised)]',\n [SurfaceTone.Sunken]: 'bg-[var(--dt-surface-sunken)]',\n};\n\nconst metricAccentClass: Record<MetricAccentName, string> = {\n [MetricAccent.Accent]: 'text-[var(--dt-accent)]',\n [MetricAccent.Success]: 'text-[var(--dt-success)]',\n [MetricAccent.Info]: 'text-[var(--dt-info)]',\n};\n\nexport type PanelProps = ComponentPropsWithoutRef<'section'> & {\n readonly tone?: SurfaceTone;\n readonly children: ReactNode;\n};\n\nexport function Panel({ tone = SurfaceTone.Default, className, children, ...props }: PanelProps) {\n return (\n <section\n className={cx(\n 'rounded-dtLg border border-[var(--dt-border)] px-5 py-5 md:px-6 md:py-6',\n surfaceToneClass[tone],\n className,\n )}\n {...props}\n >\n {children}\n </section>\n );\n}\n\nexport function metricAccentColor(accent: MetricAccentName): string {\n return metricAccentClass[accent];\n}\n"]}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
3
|
+
|
|
4
|
+
declare const SurfaceTone: {
|
|
5
|
+
readonly Default: "default";
|
|
6
|
+
readonly Raised: "raised";
|
|
7
|
+
readonly Sunken: "sunken";
|
|
8
|
+
};
|
|
9
|
+
type SurfaceTone = (typeof SurfaceTone)[keyof typeof SurfaceTone];
|
|
10
|
+
declare const MetricAccent: {
|
|
11
|
+
readonly Accent: "accent";
|
|
12
|
+
readonly Success: "success";
|
|
13
|
+
readonly Info: "info";
|
|
14
|
+
};
|
|
15
|
+
type MetricAccent = (typeof MetricAccent)[keyof typeof MetricAccent];
|
|
16
|
+
type MetricAccentName = MetricAccent;
|
|
17
|
+
type PanelProps = ComponentPropsWithoutRef<'section'> & {
|
|
18
|
+
readonly tone?: SurfaceTone;
|
|
19
|
+
readonly children: ReactNode;
|
|
20
|
+
};
|
|
21
|
+
declare function Panel({ tone, className, children, ...props }: PanelProps): react.JSX.Element;
|
|
22
|
+
declare function metricAccentColor(accent: MetricAccentName): string;
|
|
23
|
+
|
|
24
|
+
export { MetricAccent, type MetricAccentName, Panel, type PanelProps, SurfaceTone, metricAccentColor };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
3
|
+
|
|
4
|
+
declare const SurfaceTone: {
|
|
5
|
+
readonly Default: "default";
|
|
6
|
+
readonly Raised: "raised";
|
|
7
|
+
readonly Sunken: "sunken";
|
|
8
|
+
};
|
|
9
|
+
type SurfaceTone = (typeof SurfaceTone)[keyof typeof SurfaceTone];
|
|
10
|
+
declare const MetricAccent: {
|
|
11
|
+
readonly Accent: "accent";
|
|
12
|
+
readonly Success: "success";
|
|
13
|
+
readonly Info: "info";
|
|
14
|
+
};
|
|
15
|
+
type MetricAccent = (typeof MetricAccent)[keyof typeof MetricAccent];
|
|
16
|
+
type MetricAccentName = MetricAccent;
|
|
17
|
+
type PanelProps = ComponentPropsWithoutRef<'section'> & {
|
|
18
|
+
readonly tone?: SurfaceTone;
|
|
19
|
+
readonly children: ReactNode;
|
|
20
|
+
};
|
|
21
|
+
declare function Panel({ tone, className, children, ...props }: PanelProps): react.JSX.Element;
|
|
22
|
+
declare function metricAccentColor(accent: MetricAccentName): string;
|
|
23
|
+
|
|
24
|
+
export { MetricAccent, type MetricAccentName, Panel, type PanelProps, SurfaceTone, metricAccentColor };
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
// src/lib/cx.ts
|
|
4
|
+
function cx(...classes) {
|
|
5
|
+
return classes.filter(Boolean).join(" ");
|
|
6
|
+
}
|
|
7
|
+
var SurfaceTone = {
|
|
8
|
+
Default: "default",
|
|
9
|
+
Raised: "raised",
|
|
10
|
+
Sunken: "sunken"
|
|
11
|
+
};
|
|
12
|
+
var MetricAccent = {
|
|
13
|
+
Accent: "accent",
|
|
14
|
+
Success: "success",
|
|
15
|
+
Info: "info"
|
|
16
|
+
};
|
|
17
|
+
var surfaceToneClass = {
|
|
18
|
+
[SurfaceTone.Default]: "bg-[var(--dt-surface)]",
|
|
19
|
+
[SurfaceTone.Raised]: "bg-[var(--dt-surface-raised)]",
|
|
20
|
+
[SurfaceTone.Sunken]: "bg-[var(--dt-surface-sunken)]"
|
|
21
|
+
};
|
|
22
|
+
var metricAccentClass = {
|
|
23
|
+
[MetricAccent.Accent]: "text-[var(--dt-accent)]",
|
|
24
|
+
[MetricAccent.Success]: "text-[var(--dt-success)]",
|
|
25
|
+
[MetricAccent.Info]: "text-[var(--dt-info)]"
|
|
26
|
+
};
|
|
27
|
+
function Panel({ tone = SurfaceTone.Default, className, children, ...props }) {
|
|
28
|
+
return /* @__PURE__ */ jsx(
|
|
29
|
+
"section",
|
|
30
|
+
{
|
|
31
|
+
className: cx(
|
|
32
|
+
"rounded-dtLg border border-[var(--dt-border)] px-5 py-5 md:px-6 md:py-6",
|
|
33
|
+
surfaceToneClass[tone],
|
|
34
|
+
className
|
|
35
|
+
),
|
|
36
|
+
...props,
|
|
37
|
+
children
|
|
38
|
+
}
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
function metricAccentColor(accent) {
|
|
42
|
+
return metricAccentClass[accent];
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export { MetricAccent, Panel, SurfaceTone, metricAccentColor };
|
|
46
|
+
//# sourceMappingURL=Surface.mjs.map
|
|
47
|
+
//# sourceMappingURL=Surface.mjs.map
|