@nocoo/basalt 3.2.1 → 3.2.4
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 +25 -19
- package/ai/COMPATIBILITY.md +41 -36
- package/ai/DESIGN.md +53 -47
- package/ai/INTEGRATION.md +814 -820
- package/ai/RECIPES.md +334 -135
- package/ai/USAGE.md +2 -2
- package/ai/registry.json +384 -27
- package/ai/sources.json +2 -2
- package/dist/assets/brand-mark.js +1 -2
- package/dist/charts/area.js +1 -2
- package/dist/charts/bar.js +1 -2
- package/dist/charts/bullet.js +1 -2
- package/dist/charts/chart-colors.js +1 -2
- package/dist/charts/charts.js +1 -2
- package/dist/charts/config.js +1 -2
- package/dist/charts/custom-chart.js +1 -2
- package/dist/charts/date-navigation.js +1 -2
- package/dist/charts/donut.js +1 -2
- package/dist/charts/frame.js +1 -2
- package/dist/charts/frame.js.map +1 -1
- package/dist/charts/funnel.js +1 -2
- package/dist/charts/gauge.js +1 -2
- package/dist/charts/grouped-bar.js +1 -2
- package/dist/charts/heatmap-calendar.js +3 -7
- package/dist/charts/heatmap-calendar.js.map +1 -1
- package/dist/charts/heatmap-matrix.js +1 -2
- package/dist/charts/item-list.js +1 -2
- package/dist/charts/legend.js +1 -2
- package/dist/charts/line.js +1 -2
- package/dist/charts/palette.js +1 -2
- package/dist/charts/radar.js +1 -2
- package/dist/charts/sample.js +1 -2
- package/dist/charts/sankey.js +1 -2
- package/dist/charts/series.js +1 -2
- package/dist/charts/slot-bar.js +1 -2
- package/dist/charts/sparkline.js +1 -2
- package/dist/charts/stacked-bar.js +1 -2
- package/dist/charts/stat-card.js +1 -2
- package/dist/charts/timeline.js +1 -2
- package/dist/charts/timeseries.js +1 -2
- package/dist/charts/tooltip.js +31 -27
- package/dist/charts/tooltip.js.map +1 -1
- package/dist/components/accordion.js +1 -2
- package/dist/components/alert-dialog.js +1 -2
- package/dist/components/app-header.js +1 -2
- package/dist/components/app-shell.js +1 -2
- package/dist/components/approval-card.js +1 -2
- package/dist/components/autocomplete.js +1 -2
- package/dist/components/avatar.js +1 -2
- package/dist/components/badge.js +1 -2
- package/dist/components/banner.js +1 -2
- package/dist/components/basalt-mark.js +1 -2
- package/dist/components/battery-meter.js +1 -2
- package/dist/components/breadcrumbs.js +1 -2
- package/dist/components/button.d.ts +1 -1
- package/dist/components/button.js +3 -3
- package/dist/components/button.js.map +1 -1
- package/dist/components/chat-bubble.js +1 -2
- package/dist/components/chat-composer.js +1 -2
- package/dist/components/chat-header.js +1 -2
- package/dist/components/chat-inbox.js +1 -2
- package/dist/components/chat-markdown.js +1 -2
- package/dist/components/chat-message.js +1 -2
- package/dist/components/checkbox.js +1 -2
- package/dist/components/clipboard-text.js +1 -2
- package/dist/components/code.js +1 -2
- package/dist/components/collapsible.js +1 -2
- package/dist/components/collapsible.js.map +1 -1
- package/dist/components/combobox.js +1 -2
- package/dist/components/command-palette.js +1 -2
- package/dist/components/confirm-dialog.js +3 -12
- package/dist/components/confirm-dialog.js.map +1 -1
- package/dist/components/context-cards.js +1 -2
- package/dist/components/context-menu.js +1 -2
- package/dist/components/data-table.js +2 -7
- package/dist/components/data-table.js.map +1 -1
- package/dist/components/date-picker.js +7 -18
- package/dist/components/date-picker.js.map +1 -1
- package/dist/components/delete-resource.js +1 -2
- package/dist/components/description-list.js +1 -2
- package/dist/components/dialog.js +1 -2
- package/dist/components/diff-table.js +1 -2
- package/dist/components/dock.js +1 -2
- package/dist/components/dock.js.map +1 -1
- package/dist/components/dropdown-menu.js +1 -2
- package/dist/components/editable-nav-item.js +1 -2
- package/dist/components/empty.js +1 -2
- package/dist/components/fab.js +1 -2
- package/dist/components/field.js +1 -2
- package/dist/components/file-dropzone.js +1 -2
- package/dist/components/filter-bar.js +1 -2
- package/dist/components/flow.js +1 -2
- package/dist/components/grid.js +1 -2
- package/dist/components/hover-card.js +1 -2
- package/dist/components/icon-picker.js +1 -2
- package/dist/components/inline-editable.js +1 -2
- package/dist/components/input-area.js +1 -2
- package/dist/components/input-group.js +2 -3
- package/dist/components/input-group.js.map +1 -1
- package/dist/components/input.js +1 -2
- package/dist/components/label.js +1 -2
- package/dist/components/layer-card.js +1 -2
- package/dist/components/link.js +1 -2
- package/dist/components/loader.js +1 -2
- package/dist/components/loading-screen.js +1 -2
- package/dist/components/menu-bar.js +1 -2
- package/dist/components/meter.js +1 -2
- package/dist/components/multi-select.js +1 -2
- package/dist/components/navigation-menu.js +1 -2
- package/dist/components/overlay.js +1 -2
- package/dist/components/page-header.js +1 -2
- package/dist/components/pagination.js +1 -2
- package/dist/components/popover.js +1 -2
- package/dist/components/prompt-bar.js +1 -2
- package/dist/components/radio.js +2 -7
- package/dist/components/radio.js.map +1 -1
- package/dist/components/recommendation-card.js +1 -2
- package/dist/components/resource-list.js +1 -2
- package/dist/components/responsive-master-detail.js +1 -2
- package/dist/components/scroll-area.js +1 -2
- package/dist/components/section-rule.js +1 -2
- package/dist/components/segment-control.js +1 -2
- package/dist/components/select.js +1 -2
- package/dist/components/sensitive-input.js +1 -2
- package/dist/components/separator.js +1 -2
- package/dist/components/sheet.js +1 -2
- package/dist/components/sidebar.d.ts +53 -19
- package/dist/components/sidebar.js +201 -100
- package/dist/components/sidebar.js.map +1 -1
- package/dist/components/skeleton-line.js +1 -2
- package/dist/components/slider.js +1 -2
- package/dist/components/stat-strip.js +1 -2
- package/dist/components/switch.js +1 -2
- package/dist/components/table-of-contents.js +1 -2
- package/dist/components/table-pager.js +1 -2
- package/dist/components/table.js +1 -2
- package/dist/components/tabs.js +1 -2
- package/dist/components/tag-badge.js +1 -2
- package/dist/components/tag-color-picker.js +1 -2
- package/dist/components/text.js +1 -2
- package/dist/components/theme-toggle.js +1 -2
- package/dist/components/thinking.js +1 -2
- package/dist/components/toast.js +1 -2
- package/dist/components/toggle-group.js +1 -2
- package/dist/components/toggle.js +1 -2
- package/dist/components/tool-chips.js +1 -2
- package/dist/components/toolbar.js +1 -2
- package/dist/components/tooltip.js +1 -2
- package/dist/components/typeahead-field.js +6 -21
- package/dist/components/typeahead-field.js.map +1 -1
- package/dist/components/upload-queue.js +1 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +11 -11
- package/dist/models/agent-feedback.js +1 -2
- package/dist/models/avatar.js +1 -2
- package/dist/models/code.js +1 -2
- package/dist/models/context-cards.js +1 -2
- package/dist/models/diff-table.js +1 -2
- package/dist/models/recommendation.js +1 -2
- package/dist/providers/accent.js +2 -7
- package/dist/providers/accent.js.map +1 -1
- package/dist/providers/link.js +1 -2
- package/dist/providers/theme.js +2 -7
- package/dist/providers/theme.js.map +1 -1
- package/dist/styles/standalone.css +55 -11
- package/dist/styles/tailwind.css +2 -0
- package/dist/styles/tokens.css +51 -6
- package/dist/utils/cn.js +1 -2
- package/dist/utils/control-surface.js +1 -2
- package/dist/utils/navigation.d.ts +1 -1
- package/dist/utils/navigation.js +2 -3
- package/dist/utils/navigation.js.map +1 -1
- package/dist/utils/preference-store.js +1 -2
- package/dist/utils/selection-indicator.js +1 -2
- package/dist/utils/use-checkable-group.js +1 -2
- package/dist/utils/use-hover-highlight.js +2 -3
- package/dist/utils/use-hover-highlight.js.map +1 -1
- package/dist/viewmodels/use-approval-card.js +11 -13
- package/dist/viewmodels/use-approval-card.js.map +1 -1
- package/dist/viewmodels/use-chat-composer.js +1 -2
- package/dist/viewmodels/use-chat-message.js +1 -2
- package/dist/viewmodels/use-code-block.js +1 -2
- package/dist/viewmodels/use-code-block.js.map +1 -1
- package/dist/viewmodels/use-context-cards.js +1 -2
- package/dist/viewmodels/use-diff-table.js +1 -2
- package/dist/viewmodels/use-diff-table.js.map +1 -1
- package/dist/viewmodels/use-loader.js +1 -2
- package/dist/viewmodels/use-recommendation-card.js +1 -2
- package/dist/viewmodels/use-recommendation-card.js.map +1 -1
- package/dist/viewmodels/use-thinking.js +1 -2
- package/dist/viewmodels/use-tool-chips.js +1 -2
- package/package.json +1 -1
|
@@ -4,7 +4,7 @@ import { BASALT_UI_CLASS as t } from "../utils/control-surface.js";
|
|
|
4
4
|
import { useId as n, useRef as r, useState as i } from "react";
|
|
5
5
|
import { Upload as a } from "lucide-react";
|
|
6
6
|
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
7
|
-
|
|
7
|
+
// src/components/file-dropzone.tsx
|
|
8
8
|
function c(e, t) {
|
|
9
9
|
let n = t.split(",").map((e) => e.trim().toLowerCase()).filter(Boolean);
|
|
10
10
|
return n.length === 0 || n.some((t) => t.startsWith(".") ? e.name.toLowerCase().endsWith(t) : t.endsWith("/*") ? e.type.toLowerCase().startsWith(t.slice(0, -1)) : e.type.toLowerCase() === t);
|
|
@@ -97,7 +97,6 @@ function u({ label: u, description: d, accept: f = "", multiple: p = !0, maxFile
|
|
|
97
97
|
]
|
|
98
98
|
});
|
|
99
99
|
}
|
|
100
|
-
//#endregion
|
|
101
100
|
export { u as FileDropzone };
|
|
102
101
|
|
|
103
102
|
//# sourceMappingURL=file-dropzone.js.map
|
|
@@ -4,7 +4,7 @@ import { BASALT_UI_CLASS as t } from "../utils/control-surface.js";
|
|
|
4
4
|
import { Button as n } from "./button.js";
|
|
5
5
|
import { X as r } from "lucide-react";
|
|
6
6
|
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
7
|
-
|
|
7
|
+
// src/components/filter-bar.tsx
|
|
8
8
|
function o({ label: r, children: o, chips: s, active: c = !1, onClear: l, clearLabel: u = "Clear filters", className: d }) {
|
|
9
9
|
return /* @__PURE__ */ a("div", {
|
|
10
10
|
role: "group",
|
|
@@ -46,7 +46,6 @@ function s({ label: n, value: o, onRemove: s, removeLabel: c, disabled: l = !1,
|
|
|
46
46
|
})]
|
|
47
47
|
});
|
|
48
48
|
}
|
|
49
|
-
//#endregion
|
|
50
49
|
export { o as FilterBar, s as FilterChip };
|
|
51
50
|
|
|
52
51
|
//# sourceMappingURL=filter-bar.js.map
|
package/dist/components/flow.js
CHANGED
|
@@ -3,7 +3,7 @@ import { cn as e } from "../utils/cn.js";
|
|
|
3
3
|
import { BASALT_UI_CLASS as t } from "../utils/control-surface.js";
|
|
4
4
|
import { Children as n, Fragment as r, useId as i } from "react";
|
|
5
5
|
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
6
|
-
|
|
6
|
+
// src/components/flow.tsx
|
|
7
7
|
function s() {
|
|
8
8
|
let e = `flow-arrow-${i().replace(/:/g, "")}`;
|
|
9
9
|
return /* @__PURE__ */ a("li", {
|
|
@@ -52,7 +52,6 @@ function l({ children: e }) {
|
|
|
52
52
|
children: e
|
|
53
53
|
});
|
|
54
54
|
}
|
|
55
|
-
//#endregion
|
|
56
55
|
export { c as Flow, l as FlowNode };
|
|
57
56
|
|
|
58
57
|
//# sourceMappingURL=flow.js.map
|
package/dist/components/grid.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn as e } from "../utils/cn.js";
|
|
3
3
|
import { jsx as t } from "react/jsx-runtime";
|
|
4
|
-
|
|
4
|
+
// src/components/grid.tsx
|
|
5
5
|
var n = {
|
|
6
6
|
sm: "gap-basalt-layout-sm",
|
|
7
7
|
md: "gap-basalt-layout",
|
|
@@ -25,7 +25,6 @@ function i({ className: n, ...r }) {
|
|
|
25
25
|
...r
|
|
26
26
|
});
|
|
27
27
|
}
|
|
28
|
-
//#endregion
|
|
29
28
|
export { r as Grid, i as GridItem };
|
|
30
29
|
|
|
31
30
|
//# sourceMappingURL=grid.js.map
|
|
@@ -4,7 +4,7 @@ import { OVERLAY_LAYER as t, OVERLAY_MOTION as n } from "./overlay.js";
|
|
|
4
4
|
import * as r from "react";
|
|
5
5
|
import { jsx as i } from "react/jsx-runtime";
|
|
6
6
|
import * as a from "@radix-ui/react-hover-card";
|
|
7
|
-
|
|
7
|
+
// src/components/hover-card.tsx
|
|
8
8
|
var o = a.Root, s = a.Trigger, c = r.forwardRef(({ className: r, sideOffset: o = 8, ...s }, c) => /* @__PURE__ */ i(a.Portal, {
|
|
9
9
|
forceMount: s.forceMount,
|
|
10
10
|
children: /* @__PURE__ */ i(a.Content, {
|
|
@@ -15,7 +15,6 @@ var o = a.Root, s = a.Trigger, c = r.forwardRef(({ className: r, sideOffset: o =
|
|
|
15
15
|
})
|
|
16
16
|
}));
|
|
17
17
|
c.displayName = a.Content.displayName;
|
|
18
|
-
//#endregion
|
|
19
18
|
export { o as HoverCard, c as HoverCardContent, s as HoverCardTrigger };
|
|
20
19
|
|
|
21
20
|
//# sourceMappingURL=hover-card.js.map
|
|
@@ -9,7 +9,7 @@ import { useState as c } from "react";
|
|
|
9
9
|
import { Check as l, ChevronDown as u, Search as d } from "lucide-react";
|
|
10
10
|
import { jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
11
11
|
import * as m from "@radix-ui/react-toggle-group";
|
|
12
|
-
|
|
12
|
+
// src/components/icon-picker.tsx
|
|
13
13
|
function h({ label: h, options: g, value: _, defaultValue: v = "", onValueChange: y, disabled: b = !1, placeholder: x = "Choose icon", searchPlaceholder: S = "Search icons…", emptyLabel: C = "No icons found.", id: w, "aria-invalid": T, "aria-describedby": E, className: D }) {
|
|
14
14
|
let [O, k] = c(v), [A, j] = c(!1), [M, N] = c(""), P = _ ?? O, F = g.find((e) => e.value === P), I = g.filter((e) => e.label.toLocaleLowerCase().includes(M.trim().toLocaleLowerCase()));
|
|
15
15
|
return /* @__PURE__ */ p(a, {
|
|
@@ -99,7 +99,6 @@ function h({ label: h, options: g, value: _, defaultValue: v = "", onValueChange
|
|
|
99
99
|
})]
|
|
100
100
|
});
|
|
101
101
|
}
|
|
102
|
-
//#endregion
|
|
103
102
|
export { h as IconPicker };
|
|
104
103
|
|
|
105
104
|
//# sourceMappingURL=icon-picker.js.map
|
|
@@ -6,7 +6,7 @@ import { Input as r } from "./input.js";
|
|
|
6
6
|
import { useEffect as i, useId as a, useLayoutEffect as o, useRef as s, useState as c } from "react";
|
|
7
7
|
import { Pencil as l } from "lucide-react";
|
|
8
8
|
import { jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
9
|
-
|
|
9
|
+
// src/components/inline-editable.tsx
|
|
10
10
|
function f({ label: f, value: p, onSave: m, editing: h, defaultEditing: g = !1, onEditingChange: _, pending: v = !1, error: y, disabled: b = !1, required: x = !0, trim: S = !0, saveOnBlur: C = !0, validate: w, placeholder: T = "Untitled", editLabel: E = "Edit", saveLabel: D = "Save", cancelLabel: O = "Cancel", pendingLabel: k = "Saving…", requiredLabel: A = "Enter a value.", errorLabel: j = "Could not save changes.", className: M }) {
|
|
11
11
|
let [N, P] = c(g), [F, I] = c(p), [L, R] = c(!1), [z, B] = c(), V = s(null), H = s(null), U = s(!0), W = s(0), G = s(!1), K = s(!1), q = a(), J = h ?? N, Y = v || L, X = y ?? z;
|
|
12
12
|
i(() => (U.current = !0, () => {
|
|
@@ -118,7 +118,6 @@ function f({ label: f, value: p, onSave: m, editing: h, defaultEditing: g = !1,
|
|
|
118
118
|
]
|
|
119
119
|
});
|
|
120
120
|
}
|
|
121
|
-
//#endregion
|
|
122
121
|
export { f as InlineEditable };
|
|
123
122
|
|
|
124
123
|
//# sourceMappingURL=inline-editable.js.map
|
|
@@ -4,7 +4,7 @@ import { controlSurfaceClass as t } from "../utils/control-surface.js";
|
|
|
4
4
|
import { FOCUS_BORDER as n } from "./overlay.js";
|
|
5
5
|
import * as r from "react";
|
|
6
6
|
import { jsx as i } from "react/jsx-runtime";
|
|
7
|
-
|
|
7
|
+
// src/components/input-area.tsx
|
|
8
8
|
var a = {
|
|
9
9
|
sm: "min-h-basalt-textarea-sm px-basalt-space-lg py-basalt-space-md text-basalt-sm",
|
|
10
10
|
default: "min-h-basalt-textarea px-basalt-control-x py-basalt-space-lg text-basalt-base",
|
|
@@ -21,7 +21,6 @@ var a = {
|
|
|
21
21
|
...c ? o : {}
|
|
22
22
|
}));
|
|
23
23
|
s.displayName = "InputArea";
|
|
24
|
-
//#endregion
|
|
25
24
|
export { s as InputArea };
|
|
26
25
|
|
|
27
26
|
//# sourceMappingURL=input-area.js.map
|
|
@@ -5,7 +5,7 @@ import { Button as n } from "./button.js";
|
|
|
5
5
|
import { Input as r } from "./input.js";
|
|
6
6
|
import * as i from "react";
|
|
7
7
|
import { jsx as a } from "react/jsx-runtime";
|
|
8
|
-
|
|
8
|
+
// src/components/input-group.tsx
|
|
9
9
|
var o = i.createContext(!1), s = i.forwardRef(({ className: n, disabled: r, onClick: i, children: s, ...c }, l) => /* @__PURE__ */ a(o.Provider, {
|
|
10
10
|
value: !!r,
|
|
11
11
|
children: /* @__PURE__ */ a("div", {
|
|
@@ -16,7 +16,7 @@ var o = i.createContext(!1), s = i.forwardRef(({ className: n, disabled: r, onCl
|
|
|
16
16
|
inert: r || void 0,
|
|
17
17
|
className: t(e("flex w-full items-center text-basalt-base shadow-xs", "[&>:first-child]:rounded-l-basalt-md [&>:last-child]:rounded-r-basalt-md", "basalt-focus-group has-[input[aria-invalid=true]]:border-basalt-destructive", "has-[[data-slot=input-group-addon-start]]:[&_input]:pl-basalt-space-lg", "has-[[data-slot=input-group-addon-end]]:[&_input]:pr-basalt-space-lg", "has-[[data-slot=input-group-suffix]]:[&_input]:flex-none", "has-[[data-slot=input-group-suffix]]:[&_input]:[field-sizing:content]", "has-[[data-slot=input-group-suffix]]:[&_input]:pr-0", "data-[disabled]:pointer-events-none data-[disabled]:opacity-50", n)),
|
|
18
18
|
onClick: (e) => {
|
|
19
|
-
i?.(e),
|
|
19
|
+
i?.(e), e.defaultPrevented || r || e.target.closest("input, textarea, button, a") || e.currentTarget.querySelector("input")?.focus();
|
|
20
20
|
},
|
|
21
21
|
...c,
|
|
22
22
|
children: s
|
|
@@ -72,7 +72,6 @@ var f = Object.assign(s, {
|
|
|
72
72
|
Suffix: u,
|
|
73
73
|
Button: d
|
|
74
74
|
});
|
|
75
|
-
//#endregion
|
|
76
75
|
export { f as InputGroup };
|
|
77
76
|
|
|
78
77
|
//# sourceMappingURL=input-group.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input-group.js","names":["React","InputGroupDisabled","InputGroupRoot","props","disabled","controlSurfaceClass","cn","className","onClick","event","InputGroupInput","groupDisabled","Input","InputGroupAddon","align","InputGroupSuffix","InputGroupButton","Button","InputGroup"],"sources":["../../src/components/input-group.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { cn } from \"../utils/cn\";\nimport { controlSurfaceClass } from \"../utils/control-surface\";\nimport { Button, type ButtonProps } from \"./button\";\nimport { Input } from \"./input\";\n\nexport type InputGroupProps = React.HTMLAttributes<HTMLDivElement> & {\n\t/**\n\t * Disable the input and nested actions.\n\t * @default false\n\t */\n\tdisabled?: boolean;\n};\n\nconst InputGroupDisabled = React.createContext(false);\n\nconst InputGroupRoot = React.forwardRef<HTMLDivElement, InputGroupProps>(\n\t({ className, disabled, onClick, children, ...props }, ref) => (\n\t\t<InputGroupDisabled.Provider value={Boolean(disabled)}>\n\t\t\t<div\n\t\t\t\tref={ref}\n\t\t\t\tdata-slot=\"input-group\"\n\t\t\t\tdata-disabled={disabled ? \"\" : undefined}\n\t\t\t\taria-disabled={disabled || undefined}\n\t\t\t\tinert={disabled || undefined}\n\t\t\t\tclassName={controlSurfaceClass(\n\t\t\t\t\tcn(\n\t\t\t\t\t\t\"flex w-full items-center text-basalt-base shadow-xs\",\n\t\t\t\t\t\t\"[&>:first-child]:rounded-l-basalt-md [&>:last-child]:rounded-r-basalt-md\",\n\t\t\t\t\t\t\"basalt-focus-group has-[input[aria-invalid=true]]:border-basalt-destructive\",\n\t\t\t\t\t\t\"has-[[data-slot=input-group-addon-start]]:[&_input]:pl-basalt-space-lg\",\n\t\t\t\t\t\t\"has-[[data-slot=input-group-addon-end]]:[&_input]:pr-basalt-space-lg\",\n\t\t\t\t\t\t\"has-[[data-slot=input-group-suffix]]:[&_input]:flex-none\",\n\t\t\t\t\t\t\"has-[[data-slot=input-group-suffix]]:[&_input]:[field-sizing:content]\",\n\t\t\t\t\t\t\"has-[[data-slot=input-group-suffix]]:[&_input]:pr-0\",\n\t\t\t\t\t\t\"data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n\t\t\t\t\t\tclassName,\n\t\t\t\t\t),\n\t\t\t\t)}\n\t\t\t\tonClick={(event) => {\n\t\t\t\t\tonClick?.(event);\n\t\t\t\t\tif (event.defaultPrevented || disabled) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tconst target = event.target as HTMLElement;\n\t\t\t\t\tif (target.closest(\"input, textarea, button, a\")) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tevent.currentTarget.querySelector(\"input\")?.focus();\n\t\t\t\t}}\n\t\t\t\t{...props}\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t</div>\n\t\t</InputGroupDisabled.Provider>\n\t),\n);\nInputGroupRoot.displayName = \"InputGroup\";\n\nexport type InputGroupInputProps = Omit<\n\tReact.ComponentPropsWithoutRef<typeof Input>,\n\t\"type\" | \"size\" | \"passwordManagerIgnore\"\n> & {\n\t/**\n\t * The type of input control to render.\n\t */\n\ttype?: React.HTMLInputTypeAttribute;\n};\n\nconst InputGroupInput = React.forwardRef<HTMLInputElement, InputGroupInputProps>(\n\t({ className, disabled, ...props }, ref) => {\n\t\tconst groupDisabled = React.useContext(InputGroupDisabled);\n\t\treturn (\n\t\t\t<Input\n\t\t\t\tref={ref}\n\t\t\t\tdisabled={disabled || groupDisabled}\n\t\t\t\tclassName={cn(\n\t\t\t\t\t\"min-w-0 w-auto! flex-1 rounded-none border-0 bg-transparent px-basalt-space-lg shadow-none\",\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t);\n\t},\n);\nInputGroupInput.displayName = \"InputGroup.Input\";\n\nexport type InputGroupAddonProps = React.HTMLAttributes<HTMLDivElement> & {\n\t/**\n\t * Place the addon at the start or end of the group.\n\t * @default start\n\t */\n\talign?: \"start\" | \"end\";\n};\n\nfunction InputGroupAddon({ align = \"start\", className, children, ...props }: InputGroupAddonProps) {\n\treturn (\n\t\t<div\n\t\t\tdata-slot={align === \"end\" ? \"input-group-addon-end\" : \"input-group-addon-start\"}\n\t\t\tclassName={cn(\n\t\t\t\t\"pointer-events-none flex shrink-0 items-center text-basalt-muted-foreground *:pointer-events-auto [&_svg]:size-basalt-icon-lg\",\n\t\t\t\talign === \"start\" ? \"-order-1 pl-basalt-space-lg\" : \"order-1 pr-basalt-space-lg\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{children}\n\t\t</div>\n\t);\n}\nInputGroupAddon.displayName = \"InputGroup.Addon\";\n\nexport type InputGroupSuffixProps = React.HTMLAttributes<HTMLDivElement>;\n\nfunction InputGroupSuffix({ className, children, ...props }: InputGroupSuffixProps) {\n\treturn (\n\t\t<div\n\t\t\tdata-slot=\"input-group-suffix\"\n\t\t\tclassName={cn(\n\t\t\t\t\"pointer-events-none flex min-w-0 flex-1 items-center pr-basalt-space-lg text-basalt-muted-foreground select-none\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t<span className=\"truncate\">{children}</span>\n\t\t</div>\n\t);\n}\nInputGroupSuffix.displayName = \"InputGroup.Suffix\";\n\nexport interface InputGroupButtonProps\n\textends Omit<ButtonProps, \"variant\" | \"size\" | \"asChild\" | \"loading\" | \"icon\"> {\n\t/**\n\t * Visual style for the nested action.\n\t * @default ghost\n\t */\n\tvariant?: ButtonProps[\"variant\"];\n\t/**\n\t * Size for the nested action.\n\t * @default icon\n\t */\n\tsize?: ButtonProps[\"size\"];\n\t/**\n\t * Render the nested action through its child element.\n\t * @default false\n\t */\n\tasChild?: boolean;\n\t/**\n\t * Show a spinner and disable the nested action.\n\t * @default false\n\t */\n\tloading?: boolean;\n\t/**\n\t * Icon rendered before the nested action label.\n\t */\n\ticon?: React.ReactNode;\n}\n\nconst InputGroupButton = React.forwardRef<HTMLButtonElement, InputGroupButtonProps>(\n\t({ className, variant = \"ghost\", size = \"icon\", disabled, ...props }, ref) => {\n\t\tconst groupDisabled = React.useContext(InputGroupDisabled);\n\t\treturn (\n\t\t\t<Button\n\t\t\t\tref={ref}\n\t\t\t\tvariant={variant}\n\t\t\t\tsize={size}\n\t\t\t\tdisabled={disabled || groupDisabled}\n\t\t\t\tclassName={cn(\"basalt-action-inset shrink-0 rounded-basalt-sm\", className)}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t);\n\t},\n);\nInputGroupButton.displayName = \"InputGroup.Button\";\n\nexport const InputGroup = Object.assign(InputGroupRoot, {\n\tInput: InputGroupInput,\n\tAddon: InputGroupAddon,\n\tSuffix: InputGroupSuffix,\n\tButton: InputGroupButton,\n});\n"],"mappings":";;;;;;;;AAcA,IAAMC,IAAqBD,EAAM,cAAc,EAAK,GAE9CE,IAAiBF,EAAM,YAC3B,EAAE,cAAW,aAAU,YAAS,aAAU,GAAGG,KAAS,MACtD,kBAACF,EAAmB,UAApB;CAA6B,OAAO,EAAQG;CAC3C,UAAA,kBAAC,OAAD;EACM;EACL,aAAU;EACV,iBAAeA,IAAW,KAAK,KAAA;EAC/B,iBAAeA,KAAY,KAAA;EAC3B,OAAOA,KAAY,KAAA;EACnB,WAAWC,EACVC,EACC,uDACA,4EACA,+EACA,0EACA,wEACA,4DACA,yEACA,uDACA,kEACAC,CACD,CACD;EACA,UAAU,MAAU;GAEnB,AADAC,IAAUC,CAAK,
|
|
1
|
+
{"version":3,"file":"input-group.js","names":["React","InputGroupDisabled","InputGroupRoot","props","disabled","controlSurfaceClass","cn","className","onClick","event","InputGroupInput","groupDisabled","Input","InputGroupAddon","align","InputGroupSuffix","InputGroupButton","Button","InputGroup"],"sources":["../../src/components/input-group.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { cn } from \"../utils/cn\";\nimport { controlSurfaceClass } from \"../utils/control-surface\";\nimport { Button, type ButtonProps } from \"./button\";\nimport { Input } from \"./input\";\n\nexport type InputGroupProps = React.HTMLAttributes<HTMLDivElement> & {\n\t/**\n\t * Disable the input and nested actions.\n\t * @default false\n\t */\n\tdisabled?: boolean;\n};\n\nconst InputGroupDisabled = React.createContext(false);\n\nconst InputGroupRoot = React.forwardRef<HTMLDivElement, InputGroupProps>(\n\t({ className, disabled, onClick, children, ...props }, ref) => (\n\t\t<InputGroupDisabled.Provider value={Boolean(disabled)}>\n\t\t\t<div\n\t\t\t\tref={ref}\n\t\t\t\tdata-slot=\"input-group\"\n\t\t\t\tdata-disabled={disabled ? \"\" : undefined}\n\t\t\t\taria-disabled={disabled || undefined}\n\t\t\t\tinert={disabled || undefined}\n\t\t\t\tclassName={controlSurfaceClass(\n\t\t\t\t\tcn(\n\t\t\t\t\t\t\"flex w-full items-center text-basalt-base shadow-xs\",\n\t\t\t\t\t\t\"[&>:first-child]:rounded-l-basalt-md [&>:last-child]:rounded-r-basalt-md\",\n\t\t\t\t\t\t\"basalt-focus-group has-[input[aria-invalid=true]]:border-basalt-destructive\",\n\t\t\t\t\t\t\"has-[[data-slot=input-group-addon-start]]:[&_input]:pl-basalt-space-lg\",\n\t\t\t\t\t\t\"has-[[data-slot=input-group-addon-end]]:[&_input]:pr-basalt-space-lg\",\n\t\t\t\t\t\t\"has-[[data-slot=input-group-suffix]]:[&_input]:flex-none\",\n\t\t\t\t\t\t\"has-[[data-slot=input-group-suffix]]:[&_input]:[field-sizing:content]\",\n\t\t\t\t\t\t\"has-[[data-slot=input-group-suffix]]:[&_input]:pr-0\",\n\t\t\t\t\t\t\"data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n\t\t\t\t\t\tclassName,\n\t\t\t\t\t),\n\t\t\t\t)}\n\t\t\t\tonClick={(event) => {\n\t\t\t\t\tonClick?.(event);\n\t\t\t\t\tif (event.defaultPrevented || disabled) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tconst target = event.target as HTMLElement;\n\t\t\t\t\tif (target.closest(\"input, textarea, button, a\")) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tevent.currentTarget.querySelector(\"input\")?.focus();\n\t\t\t\t}}\n\t\t\t\t{...props}\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t</div>\n\t\t</InputGroupDisabled.Provider>\n\t),\n);\nInputGroupRoot.displayName = \"InputGroup\";\n\nexport type InputGroupInputProps = Omit<\n\tReact.ComponentPropsWithoutRef<typeof Input>,\n\t\"type\" | \"size\" | \"passwordManagerIgnore\"\n> & {\n\t/**\n\t * The type of input control to render.\n\t */\n\ttype?: React.HTMLInputTypeAttribute;\n};\n\nconst InputGroupInput = React.forwardRef<HTMLInputElement, InputGroupInputProps>(\n\t({ className, disabled, ...props }, ref) => {\n\t\tconst groupDisabled = React.useContext(InputGroupDisabled);\n\t\treturn (\n\t\t\t<Input\n\t\t\t\tref={ref}\n\t\t\t\tdisabled={disabled || groupDisabled}\n\t\t\t\tclassName={cn(\n\t\t\t\t\t\"min-w-0 w-auto! flex-1 rounded-none border-0 bg-transparent px-basalt-space-lg shadow-none\",\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t);\n\t},\n);\nInputGroupInput.displayName = \"InputGroup.Input\";\n\nexport type InputGroupAddonProps = React.HTMLAttributes<HTMLDivElement> & {\n\t/**\n\t * Place the addon at the start or end of the group.\n\t * @default start\n\t */\n\talign?: \"start\" | \"end\";\n};\n\nfunction InputGroupAddon({ align = \"start\", className, children, ...props }: InputGroupAddonProps) {\n\treturn (\n\t\t<div\n\t\t\tdata-slot={align === \"end\" ? \"input-group-addon-end\" : \"input-group-addon-start\"}\n\t\t\tclassName={cn(\n\t\t\t\t\"pointer-events-none flex shrink-0 items-center text-basalt-muted-foreground *:pointer-events-auto [&_svg]:size-basalt-icon-lg\",\n\t\t\t\talign === \"start\" ? \"-order-1 pl-basalt-space-lg\" : \"order-1 pr-basalt-space-lg\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{children}\n\t\t</div>\n\t);\n}\nInputGroupAddon.displayName = \"InputGroup.Addon\";\n\nexport type InputGroupSuffixProps = React.HTMLAttributes<HTMLDivElement>;\n\nfunction InputGroupSuffix({ className, children, ...props }: InputGroupSuffixProps) {\n\treturn (\n\t\t<div\n\t\t\tdata-slot=\"input-group-suffix\"\n\t\t\tclassName={cn(\n\t\t\t\t\"pointer-events-none flex min-w-0 flex-1 items-center pr-basalt-space-lg text-basalt-muted-foreground select-none\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t<span className=\"truncate\">{children}</span>\n\t\t</div>\n\t);\n}\nInputGroupSuffix.displayName = \"InputGroup.Suffix\";\n\nexport interface InputGroupButtonProps\n\textends Omit<ButtonProps, \"variant\" | \"size\" | \"asChild\" | \"loading\" | \"icon\"> {\n\t/**\n\t * Visual style for the nested action.\n\t * @default ghost\n\t */\n\tvariant?: ButtonProps[\"variant\"];\n\t/**\n\t * Size for the nested action.\n\t * @default icon\n\t */\n\tsize?: ButtonProps[\"size\"];\n\t/**\n\t * Render the nested action through its child element.\n\t * @default false\n\t */\n\tasChild?: boolean;\n\t/**\n\t * Show a spinner and disable the nested action.\n\t * @default false\n\t */\n\tloading?: boolean;\n\t/**\n\t * Icon rendered before the nested action label.\n\t */\n\ticon?: React.ReactNode;\n}\n\nconst InputGroupButton = React.forwardRef<HTMLButtonElement, InputGroupButtonProps>(\n\t({ className, variant = \"ghost\", size = \"icon\", disabled, ...props }, ref) => {\n\t\tconst groupDisabled = React.useContext(InputGroupDisabled);\n\t\treturn (\n\t\t\t<Button\n\t\t\t\tref={ref}\n\t\t\t\tvariant={variant}\n\t\t\t\tsize={size}\n\t\t\t\tdisabled={disabled || groupDisabled}\n\t\t\t\tclassName={cn(\"basalt-action-inset shrink-0 rounded-basalt-sm\", className)}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t);\n\t},\n);\nInputGroupButton.displayName = \"InputGroup.Button\";\n\nexport const InputGroup = Object.assign(InputGroupRoot, {\n\tInput: InputGroupInput,\n\tAddon: InputGroupAddon,\n\tSuffix: InputGroupSuffix,\n\tButton: InputGroupButton,\n});\n"],"mappings":";;;;;;;;AAcA,IAAMC,IAAqBD,EAAM,cAAc,EAAK,GAE9CE,IAAiBF,EAAM,YAC3B,EAAE,cAAW,aAAU,YAAS,aAAU,GAAGG,KAAS,MACtD,kBAACF,EAAmB,UAApB;CAA6B,OAAO,EAAQG;CAC3C,UAAA,kBAAC,OAAD;EACM;EACL,aAAU;EACV,iBAAeA,IAAW,KAAK,KAAA;EAC/B,iBAAeA,KAAY,KAAA;EAC3B,OAAOA,KAAY,KAAA;EACnB,WAAWC,EACVC,EACC,uDACA,4EACA,+EACA,0EACA,wEACA,4DACA,yEACA,uDACA,kEACAC,CACD,CACD;EACA,UAAU,MAAU;GAEnB,AADAC,IAAUC,CAAK,GACXA,EAAM,oBAAoBL,KAGfK,EAAM,OACV,QAAQ,4BAA4B,KAG/CA,EAAM,cAAc,cAAc,OAAO,CAAC,EAAE,MAAM;EACnD;EACA,GAAIN;EAEH;CACG,CAAA;AACuB,CAAA,CAE/B;AACA,EAAe,cAAc;AAY7B,IAAMO,IAAkBV,EAAM,YAC5B,EAAE,cAAW,aAAU,GAAGG,KAAS,MAAQ;CAC3C,IAAMQ,IAAgBX,EAAM,WAAWC,CAAkB;CACzD,OACC,kBAACW,GAAD;EACM;EACL,UAAUR,KAAYO;EACtB,WAAWL,EACV,8FACAC,CACD;EACA,GAAIJ;CACJ,CAAA;AAEH,CACD;AACA,EAAgB,cAAc;AAU9B,SAASU,EAAgB,EAAE,WAAQ,SAAS,cAAW,aAAU,GAAGV,KAA+B;CAClG,OACC,kBAAC,OAAD;EACC,aAAWW,MAAU,QAAQ,0BAA0B;EACvD,WAAWR,EACV,iIACAQ,MAAU,UAAU,gCAAgC,8BACpDP,CACD;EACA,GAAIJ;EAEH;CACG,CAAA;AAEP;AACA,EAAgB,cAAc;AAI9B,SAASY,EAAiB,EAAE,cAAW,aAAU,GAAGZ,KAAgC;CACnF,OACC,kBAAC,OAAD;EACC,aAAU;EACV,WAAWG,EACV,oHACAC,CACD;EACA,GAAIJ;EAEJ,UAAA,kBAAC,QAAD;GAAM,WAAU;GAAY;EAAe,CAAA;CACvC,CAAA;AAEP;AACA,EAAiB,cAAc;AA8B/B,IAAMa,IAAmBhB,EAAM,YAC7B,EAAE,cAAW,aAAU,SAAS,UAAO,QAAQ,aAAU,GAAGG,KAAS,MAAQ;CAC7E,IAAMQ,IAAgBX,EAAM,WAAWC,CAAkB;CACzD,OACC,kBAACgB,GAAD;EACM;EACI;EACH;EACN,UAAUb,KAAYO;EACtB,WAAWL,EAAG,kDAAkDC,CAAS;EACzE,GAAIJ;CACJ,CAAA;AAEH,CACD;AACA,EAAiB,cAAc;AAE/B,IAAae,IAAa,OAAO,OAAOhB,GAAgB;CACvD,OAAOQ;CACP,OAAOG;CACP,QAAQE;CACR,QAAQC;AACT,CAAC"}
|
package/dist/components/input.js
CHANGED
|
@@ -4,7 +4,7 @@ import { controlSurfaceClass as t } from "../utils/control-surface.js";
|
|
|
4
4
|
import { FOCUS_BORDER as n } from "./overlay.js";
|
|
5
5
|
import * as r from "react";
|
|
6
6
|
import { jsx as i } from "react/jsx-runtime";
|
|
7
|
-
|
|
7
|
+
// src/components/input.tsx
|
|
8
8
|
var a = {
|
|
9
9
|
sm: "basalt-action basalt-action-sm",
|
|
10
10
|
default: "basalt-action",
|
|
@@ -22,7 +22,6 @@ var a = {
|
|
|
22
22
|
...l ? o : {}
|
|
23
23
|
}));
|
|
24
24
|
s.displayName = "Input";
|
|
25
|
-
//#endregion
|
|
26
25
|
export { s as Input };
|
|
27
26
|
|
|
28
27
|
//# sourceMappingURL=input.js.map
|
package/dist/components/label.js
CHANGED
|
@@ -6,7 +6,7 @@ import * as o from "react";
|
|
|
6
6
|
import { Info as s } from "lucide-react";
|
|
7
7
|
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
8
8
|
import * as u from "@radix-ui/react-label";
|
|
9
|
-
|
|
9
|
+
// src/components/label.tsx
|
|
10
10
|
var d = o.forwardRef(({ className: o, children: d, showOptional: f = !1, tooltip: p, ...m }, h) => /* @__PURE__ */ l(u.Root, {
|
|
11
11
|
ref: h,
|
|
12
12
|
className: e(t, "inline-flex items-center gap-basalt-space-sm text-basalt-base font-medium leading-basalt-tight text-basalt-foreground peer-disabled:cursor-not-allowed peer-disabled:opacity-70", o),
|
|
@@ -29,7 +29,6 @@ var d = o.forwardRef(({ className: o, children: d, showOptional: f = !1, tooltip
|
|
|
29
29
|
]
|
|
30
30
|
}));
|
|
31
31
|
d.displayName = u.Root.displayName;
|
|
32
|
-
//#endregion
|
|
33
32
|
export { d as Label };
|
|
34
33
|
|
|
35
34
|
//# sourceMappingURL=label.js.map
|
|
@@ -7,7 +7,7 @@ import { SkeletonLine as r } from "./skeleton-line.js";
|
|
|
7
7
|
import { Children as i, Fragment as a, forwardRef as o, isValidElement as s } from "react";
|
|
8
8
|
import { Slot as c } from "@radix-ui/react-slot";
|
|
9
9
|
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
10
|
-
|
|
10
|
+
// src/components/layer-card.tsx
|
|
11
11
|
var d = `${t} overflow-hidden rounded-basalt-lg ring-1 ring-basalt-border/50 text-basalt-foreground`, f = {
|
|
12
12
|
none: "",
|
|
13
13
|
sm: "p-basalt-card-sm",
|
|
@@ -122,7 +122,6 @@ var w = /* @__PURE__ */ new Set([
|
|
|
122
122
|
Loading: S,
|
|
123
123
|
Empty: C
|
|
124
124
|
});
|
|
125
|
-
//#endregion
|
|
126
125
|
export { T as LayerCard };
|
|
127
126
|
|
|
128
127
|
//# sourceMappingURL=layer-card.js.map
|
package/dist/components/link.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { cn as e } from "../utils/cn.js";
|
|
3
3
|
import { useLinkComponent as t } from "../providers/link.js";
|
|
4
4
|
import { jsx as n } from "react/jsx-runtime";
|
|
5
|
-
|
|
5
|
+
// src/components/link.tsx
|
|
6
6
|
function r({ className: r, href: i, children: a, ...o }) {
|
|
7
7
|
let s = t();
|
|
8
8
|
return /* @__PURE__ */ n(s, {
|
|
@@ -12,7 +12,6 @@ function r({ className: r, href: i, children: a, ...o }) {
|
|
|
12
12
|
children: a
|
|
13
13
|
});
|
|
14
14
|
}
|
|
15
|
-
//#endregion
|
|
16
15
|
export { r as Link };
|
|
17
16
|
|
|
18
17
|
//# sourceMappingURL=link.js.map
|
|
@@ -3,7 +3,7 @@ import { cn as e } from "../utils/cn.js";
|
|
|
3
3
|
import { BASALT_UI_CLASS as t } from "../utils/control-surface.js";
|
|
4
4
|
import { useLoaderViewModel as n } from "../viewmodels/use-loader.js";
|
|
5
5
|
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
6
|
-
|
|
6
|
+
// src/components/loader.tsx
|
|
7
7
|
var a = [
|
|
8
8
|
0,
|
|
9
9
|
1,
|
|
@@ -53,7 +53,6 @@ function o({ className: o, size: s = 16, label: c = "Loading", showLabel: l = !0
|
|
|
53
53
|
]
|
|
54
54
|
});
|
|
55
55
|
}
|
|
56
|
-
//#endregion
|
|
57
56
|
export { o as Loader };
|
|
58
57
|
|
|
59
58
|
//# sourceMappingURL=loader.js.map
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { cn as e } from "../utils/cn.js";
|
|
3
3
|
import { BasaltMark as t } from "./basalt-mark.js";
|
|
4
4
|
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
5
|
-
|
|
5
|
+
// src/components/loading-screen.tsx
|
|
6
6
|
function i({ label: i = "Loading", mark: a, className: o, ...s }) {
|
|
7
7
|
return /* @__PURE__ */ n("div", {
|
|
8
8
|
role: "status",
|
|
@@ -22,7 +22,6 @@ function i({ label: i = "Loading", mark: a, className: o, ...s }) {
|
|
|
22
22
|
})
|
|
23
23
|
});
|
|
24
24
|
}
|
|
25
|
-
//#endregion
|
|
26
25
|
export { i as LoadingScreen };
|
|
27
26
|
|
|
28
27
|
//# sourceMappingURL=loading-screen.js.map
|
|
@@ -6,7 +6,7 @@ import { useHoverHighlight as i } from "../utils/use-hover-highlight.js";
|
|
|
6
6
|
import * as a from "react";
|
|
7
7
|
import { jsx as o } from "react/jsx-runtime";
|
|
8
8
|
import * as s from "@radix-ui/react-menubar";
|
|
9
|
-
|
|
9
|
+
// src/components/menu-bar.tsx
|
|
10
10
|
function c(e) {
|
|
11
11
|
return /* @__PURE__ */ o(p, { ...e });
|
|
12
12
|
}
|
|
@@ -45,7 +45,6 @@ function p({ className: n, ...r }) {
|
|
|
45
45
|
...r
|
|
46
46
|
});
|
|
47
47
|
}
|
|
48
|
-
//#endregion
|
|
49
48
|
export { c as MenuBar, d as MenuBarContent, f as MenuBarItem, l as MenuBarMenu, p as MenuBarRoot, u as MenuBarTrigger };
|
|
50
49
|
|
|
51
50
|
//# sourceMappingURL=menu-bar.js.map
|
package/dist/components/meter.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { cn as e } from "../utils/cn.js";
|
|
3
3
|
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
4
4
|
import * as r from "@radix-ui/react-progress";
|
|
5
|
-
|
|
5
|
+
// src/components/meter.tsx
|
|
6
6
|
function i({ value: i = 0, label: a, customValue: o, hideValue: s = !1, className: c, "aria-label": l }) {
|
|
7
7
|
let u = Number.isFinite(i) ? Math.min(100, Math.max(0, i)) : null, d = Math.round((u ?? 0) / 100 * 17), f = Math.floor(d / 3), p = f + Math.ceil(d / 3);
|
|
8
8
|
return /* @__PURE__ */ n("div", {
|
|
@@ -33,7 +33,6 @@ function i({ value: i = 0, label: a, customValue: o, hideValue: s = !1, classNam
|
|
|
33
33
|
})]
|
|
34
34
|
});
|
|
35
35
|
}
|
|
36
|
-
//#endregion
|
|
37
36
|
export { i as Meter };
|
|
38
37
|
|
|
39
38
|
//# sourceMappingURL=meter.js.map
|
|
@@ -8,7 +8,7 @@ import { Popover as a, PopoverContent as ee, PopoverTrigger as o } from "./popov
|
|
|
8
8
|
import { useEffect as s, useId as c, useRef as l, useState as u } from "react";
|
|
9
9
|
import { Check as te, ChevronDown as ne, X as re } from "lucide-react";
|
|
10
10
|
import { jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
11
|
-
|
|
11
|
+
// src/components/multi-select.tsx
|
|
12
12
|
function p({ label: p, options: m, value: h, defaultValue: g = [], onValueChange: ie, query: _, defaultQuery: v = "", onQueryChange: ae, open: y, defaultOpen: oe = !1, onOpenChange: se, filterOptions: ce = !0, loading: b = !1, disabled: x = !1, name: S, form: C, placeholder: le = "Select options", searchPlaceholder: ue = "Search options…", emptyLabel: w = "No options found.", loadingLabel: T = "Loading options…", removeLabel: E = "Remove", showChips: D = !0, formatSelectionCount: O, className: de }) {
|
|
13
13
|
let [fe, k] = u(g), [pe, A] = u(v), [j, M] = u(oe), [N, P] = u(null), F = l(null), I = l(null), L = l(null), R = r(L), z = l(null), B = l({
|
|
14
14
|
value: h,
|
|
@@ -216,7 +216,6 @@ function p({ label: p, options: m, value: h, defaultValue: g = [], onValueChange
|
|
|
216
216
|
]
|
|
217
217
|
});
|
|
218
218
|
}
|
|
219
|
-
//#endregion
|
|
220
219
|
export { p as MultiSelect };
|
|
221
220
|
|
|
222
221
|
//# sourceMappingURL=multi-select.js.map
|
|
@@ -4,7 +4,7 @@ import { useHoverHighlight as t } from "../utils/use-hover-highlight.js";
|
|
|
4
4
|
import { NAV_ITEM_CLASS as n, NAV_LIST_CLASS as r } from "../utils/navigation.js";
|
|
5
5
|
import { jsx as i } from "react/jsx-runtime";
|
|
6
6
|
import * as a from "@radix-ui/react-navigation-menu";
|
|
7
|
-
|
|
7
|
+
// src/components/navigation-menu.tsx
|
|
8
8
|
var o = a.Root;
|
|
9
9
|
function s({ className: n, ref: o, ...s }) {
|
|
10
10
|
let c = t(o);
|
|
@@ -24,7 +24,6 @@ function l({ className: t, active: r, ...o }) {
|
|
|
24
24
|
...o
|
|
25
25
|
});
|
|
26
26
|
}
|
|
27
|
-
//#endregion
|
|
28
27
|
export { o as NavigationMenu, c as NavigationMenuItem, l as NavigationMenuLink, s as NavigationMenuList };
|
|
29
28
|
|
|
30
29
|
//# sourceMappingURL=navigation-menu.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn as e } from "../utils/cn.js";
|
|
3
3
|
import { BASALT_UI_CLASS as t } from "../utils/control-surface.js";
|
|
4
|
-
|
|
4
|
+
// src/components/overlay.ts
|
|
5
5
|
var n = 4, r = 8, i = "z-50", a = "motion-reduce:animate-none motion-reduce:transition-none", o = "basalt-focus", s = o, c = "basalt-focus basalt-focus-inset";
|
|
6
6
|
function l(n) {
|
|
7
7
|
return e(t, i, "basalt-floating overflow-hidden rounded-basalt-md border border-basalt-border bg-basalt-popover py-basalt-menu-inset text-basalt-base text-basalt-popover-foreground shadow-md", a, n);
|
|
@@ -9,7 +9,6 @@ function l(n) {
|
|
|
9
9
|
function u(t) {
|
|
10
10
|
return e("mx-basalt-menu-inset flex min-h-basalt-menu-row w-[calc(100%-var(--basalt-space-menu-inset)*2)] cursor-default items-center gap-basalt-row-gap rounded-basalt-sm px-basalt-menu-x py-basalt-menu-y text-left text-basalt-base leading-basalt-row select-none", c, t);
|
|
11
11
|
}
|
|
12
|
-
//#endregion
|
|
13
12
|
export { s as FOCUS_BORDER, c as FOCUS_INSET, o as FOCUS_RING, r as MENU_GAP, n as OVERLAY_GAP, i as OVERLAY_LAYER, a as OVERLAY_MOTION, u as overlayItemClass, l as overlayPanelClass };
|
|
14
13
|
|
|
15
14
|
//# sourceMappingURL=overlay.js.map
|
|
@@ -4,7 +4,7 @@ import { BASALT_UI_CLASS as t } from "../utils/control-surface.js";
|
|
|
4
4
|
import { Breadcrumbs as n } from "./breadcrumbs.js";
|
|
5
5
|
import * as r from "react";
|
|
6
6
|
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
7
|
-
|
|
7
|
+
// src/components/page-header.tsx
|
|
8
8
|
function o({ actions: o, breadcrumbs: s, description: c, filters: l, title: u }) {
|
|
9
9
|
let d = r.useId();
|
|
10
10
|
return /* @__PURE__ */ a("header", {
|
|
@@ -36,7 +36,6 @@ function o({ actions: o, breadcrumbs: s, description: c, filters: l, title: u })
|
|
|
36
36
|
]
|
|
37
37
|
});
|
|
38
38
|
}
|
|
39
|
-
//#endregion
|
|
40
39
|
export { o as PageHeader };
|
|
41
40
|
|
|
42
41
|
//# sourceMappingURL=page-header.js.map
|
|
@@ -5,7 +5,7 @@ import { Button as n } from "./button.js";
|
|
|
5
5
|
import { useState as r } from "react";
|
|
6
6
|
import { ChevronLeft as i, ChevronRight as a, ChevronsLeft as o, ChevronsRight as s } from "lucide-react";
|
|
7
7
|
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
8
|
-
|
|
8
|
+
// src/components/pagination.tsx
|
|
9
9
|
var u = e("relative basalt-action-inset w-basalt-control shrink-0 rounded-none border-0 bg-transparent shadow-none first:rounded-l-basalt-md last:rounded-r-basalt-md", "hover:bg-basalt-hover focus-visible:bg-basalt-hover active:bg-basalt-hover", "disabled:pointer-events-none disabled:opacity-100 disabled:text-basalt-muted-foreground");
|
|
10
10
|
function d({ page: d, defaultPage: f = 1, pageCount: p = 10, onPageChange: m, simple: h = !1, disabled: g = !1, className: _ }) {
|
|
11
11
|
let [v, y] = r(f), b = Math.max(1, p), x = Math.min(b, Math.max(1, d ?? v)), S = (e) => {
|
|
@@ -62,7 +62,6 @@ function d({ page: d, defaultPage: f = 1, pageCount: p = 10, onPageChange: m, si
|
|
|
62
62
|
})
|
|
63
63
|
});
|
|
64
64
|
}
|
|
65
|
-
//#endregion
|
|
66
65
|
export { d as Pagination };
|
|
67
66
|
|
|
68
67
|
//# sourceMappingURL=pagination.js.map
|
|
@@ -5,7 +5,7 @@ import * as r from "react";
|
|
|
5
5
|
import { Slottable as i } from "@radix-ui/react-slot";
|
|
6
6
|
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
7
7
|
import * as s from "@radix-ui/react-popover";
|
|
8
|
-
|
|
8
|
+
// src/components/popover.tsx
|
|
9
9
|
var c = [
|
|
10
10
|
"top",
|
|
11
11
|
"bottom",
|
|
@@ -58,7 +58,6 @@ function h(e) {
|
|
|
58
58
|
})]
|
|
59
59
|
});
|
|
60
60
|
}
|
|
61
|
-
//#endregion
|
|
62
61
|
export { c as POPOVER_SIDES, l as Popover, d as PopoverClose, f as PopoverContent, m as PopoverDescription, p as PopoverTitle, u as PopoverTrigger };
|
|
63
62
|
|
|
64
63
|
//# sourceMappingURL=popover.js.map
|
|
@@ -3,7 +3,7 @@ import { ChatComposer as e } from "./chat-composer.js";
|
|
|
3
3
|
import { Select as t, SelectContent as n, SelectItem as r, SelectTrigger as i, SelectValue as a } from "./select.js";
|
|
4
4
|
import { Toggle as o } from "./toggle.js";
|
|
5
5
|
import { Fragment as s, jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
6
|
-
|
|
6
|
+
// src/components/prompt-bar.tsx
|
|
7
7
|
function u({ models: u, model: d, onModelChange: f, reasoning: p, onReasoningChange: m, webSearch: h, onWebSearchChange: g, ..._ }) {
|
|
8
8
|
let v = _.disabled || _.streaming;
|
|
9
9
|
return /* @__PURE__ */ c(e, {
|
|
@@ -43,7 +43,6 @@ function u({ models: u, model: d, onModelChange: f, reasoning: p, onReasoningCha
|
|
|
43
43
|
] })
|
|
44
44
|
});
|
|
45
45
|
}
|
|
46
|
-
//#endregion
|
|
47
46
|
export { u as PromptBar };
|
|
48
47
|
|
|
49
48
|
//# sourceMappingURL=prompt-bar.js.map
|
package/dist/components/radio.js
CHANGED
|
@@ -6,7 +6,7 @@ import * as r from "react";
|
|
|
6
6
|
import { Circle as i } from "lucide-react";
|
|
7
7
|
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
8
8
|
import * as s from "@radix-ui/react-radio-group";
|
|
9
|
-
|
|
9
|
+
// src/components/radio.tsx
|
|
10
10
|
var c = {
|
|
11
11
|
sm: "h-basalt-check-sm w-basalt-check-sm",
|
|
12
12
|
default: "h-basalt-check w-basalt-check"
|
|
@@ -22,11 +22,7 @@ u.displayName = "Radio.Legend";
|
|
|
22
22
|
var d = r.forwardRef(({ className: t, error: n, disabled: i = !1, children: c, "aria-describedby": l, "aria-invalid": d, "aria-labelledby": f, ...p }, m) => {
|
|
23
23
|
let h = r.useId(), g = !!n, _ = `${h}-error`, v = `${h}-legend`, y = [], b = [];
|
|
24
24
|
r.Children.forEach(c, (e) => {
|
|
25
|
-
|
|
26
|
-
y.push(e);
|
|
27
|
-
return;
|
|
28
|
-
}
|
|
29
|
-
b.push(e);
|
|
25
|
+
r.isValidElement(e) && e.type === u ? y.push(e) : b.push(e);
|
|
30
26
|
});
|
|
31
27
|
let x = y.map((e, t) => {
|
|
32
28
|
let n = e.props.id ?? (t === 0 ? v : `${v}-${t}`);
|
|
@@ -75,7 +71,6 @@ var p = Object.assign(f, {
|
|
|
75
71
|
Legend: u,
|
|
76
72
|
Item: f
|
|
77
73
|
});
|
|
78
|
-
//#endregion
|
|
79
74
|
export { p as Radio, d as RadioGroup };
|
|
80
75
|
|
|
81
76
|
//# sourceMappingURL=radio.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio.js","names":["React","RadioGroupPrimitive","RADIO_SIZE_CLASS","RADIO_INDICATOR_CLASS","RadioLegend","props","cn","className","RadioGroup","describedBy","ariaInvalid","labelledBy","generatedId","invalid","error","errorId","defaultLegendId","legends","items","children","child","labeledLegends","legendId","legend","index","mergedLabelledBy","mergedDescribedBy","RadioRoot","BASALT_UI_CLASS","size","FOCUS_RING","Circle","Radio"],"sources":["../../src/components/radio.tsx"],"sourcesContent":["import * as RadioGroupPrimitive from \"@radix-ui/react-radio-group\";\nimport { Circle } from \"lucide-react\";\nimport * as React from \"react\";\nimport { cn } from \"../utils/cn\";\nimport { BASALT_UI_CLASS } from \"../utils/control-surface\";\nimport { FOCUS_RING } from \"./overlay\";\n\nexport type RadioSize = \"sm\" | \"default\";\n\nconst RADIO_SIZE_CLASS: Record<RadioSize, string> = {\n\tsm: \"h-basalt-check-sm w-basalt-check-sm\",\n\tdefault: \"h-basalt-check w-basalt-check\",\n};\n\nconst RADIO_INDICATOR_CLASS: Record<RadioSize, string> = {\n\tsm: \"h-basalt-1_5 w-basalt-1_5 fill-current text-current\",\n\tdefault: \"h-basalt-2_5 w-basalt-2_5 fill-current text-current\",\n};\n\nexport type RadioGroupProps = Omit<\n\tReact.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root>,\n\t\"disabled\" | \"value\" | \"defaultValue\" | \"onValueChange\"\n> & {\n\t/**\n\t * The controlled selected value.\n\t */\n\tvalue?: string;\n\t/**\n\t * The initially selected value.\n\t */\n\tdefaultValue?: string;\n\t/**\n\t * Called when the selected value changes.\n\t */\n\tonValueChange?: (value: string) => void;\n\t/**\n\t * Marks the group invalid and shows alert copy.\n\t */\n\terror?: React.ReactNode;\n\t/**\n\t * Disable every item in the group.\n\t * @default false\n\t */\n\tdisabled?: boolean;\n};\n\nexport type RadioLegendProps = React.ComponentPropsWithoutRef<\"legend\">;\n\nexport type RadioProps = Omit<\n\tReact.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item>,\n\t\"value\"\n> & {\n\t/**\n\t * The value associated with the radio item.\n\t */\n\tvalue: string;\n\t/**\n\t * The visual size of the radio.\n\t * @default default\n\t */\n\tsize?: RadioSize;\n};\n\nconst RadioLegend = React.forwardRef<HTMLLegendElement, RadioLegendProps>(\n\t({ className, ...props }, ref) => (\n\t\t<legend\n\t\t\tref={ref}\n\t\t\tclassName={cn(\n\t\t\t\t\"mb-basalt-field-gap text-basalt-base font-medium leading-[var(--basalt-line-body)] text-basalt-foreground\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t),\n);\nRadioLegend.displayName = \"Radio.Legend\";\n\nexport const RadioGroup = React.forwardRef<\n\tReact.ElementRef<typeof RadioGroupPrimitive.Root>,\n\tRadioGroupProps\n>(\n\t(\n\t\t{\n\t\t\tclassName,\n\t\t\terror,\n\t\t\tdisabled = false,\n\t\t\tchildren,\n\t\t\t\"aria-describedby\": describedBy,\n\t\t\t\"aria-invalid\": ariaInvalid,\n\t\t\t\"aria-labelledby\": labelledBy,\n\t\t\t...props\n\t\t},\n\t\tref,\n\t) => {\n\t\tconst generatedId = React.useId();\n\t\tconst invalid = Boolean(error);\n\t\tconst errorId = `${generatedId}-error`;\n\t\tconst defaultLegendId = `${generatedId}-legend`;\n\t\tconst legends: React.ReactElement<RadioLegendProps>[] = [];\n\t\tconst items: React.ReactNode[] = [];\n\t\tReact.Children.forEach(children, (child) => {\n\t\t\tif (React.isValidElement(child) && child.type === RadioLegend) {\n\t\t\t\tlegends.push(child as React.ReactElement<RadioLegendProps>);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\titems.push(child);\n\t\t});\n\t\tconst labeledLegends = legends.map((legend, index) => {\n\t\t\tconst legendId =\n\t\t\t\tlegend.props.id ?? (index === 0 ? defaultLegendId : `${defaultLegendId}-${index}`);\n\t\t\treturn React.cloneElement(legend, { key: legendId, id: legendId });\n\t\t});\n\t\tconst legendIds = labeledLegends\n\t\t\t.map((legend) => legend.props.id)\n\t\t\t.filter(Boolean)\n\t\t\t.join(\" \");\n\t\tconst mergedLabelledBy = [legendIds, labelledBy].filter(Boolean).join(\" \") || undefined;\n\t\tconst mergedDescribedBy =\n\t\t\t[invalid ? errorId : null, describedBy].filter(Boolean).join(\" \") || undefined;\n\t\treturn (\n\t\t\t<fieldset disabled={disabled} className=\"basalt-ui flex flex-col gap-basalt-field-gap\">\n\t\t\t\t{labeledLegends}\n\t\t\t\t<RadioGroupPrimitive.Root\n\t\t\t\t\tref={ref}\n\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\tclassName={cn(\"grid gap-basalt-space-lg\", className)}\n\t\t\t\t\t{...props}\n\t\t\t\t\taria-labelledby={mergedLabelledBy}\n\t\t\t\t\taria-describedby={mergedDescribedBy}\n\t\t\t\t\taria-invalid={invalid ? true : ariaInvalid}\n\t\t\t\t>\n\t\t\t\t\t{items}\n\t\t\t\t</RadioGroupPrimitive.Root>\n\t\t\t\t{invalid ? (\n\t\t\t\t\t<p id={errorId} className=\"text-basalt-sm text-basalt-destructive\" role=\"alert\">\n\t\t\t\t\t\t{error}\n\t\t\t\t\t</p>\n\t\t\t\t) : null}\n\t\t\t</fieldset>\n\t\t);\n\t},\n);\nRadioGroup.displayName = \"Radio.Group\";\n\nconst RadioRoot = React.forwardRef<React.ElementRef<typeof RadioGroupPrimitive.Item>, RadioProps>(\n\t({ className, size = \"default\", ...props }, ref) => (\n\t\t<RadioGroupPrimitive.Item\n\t\t\tref={ref}\n\t\t\tclassName={cn(\n\t\t\t\tBASALT_UI_CLASS,\n\t\t\t\t\"aspect-square shrink-0 rounded-basalt-full border border-basalt-primary text-basalt-primary disabled:cursor-not-allowed disabled:opacity-50\",\n\t\t\t\tRADIO_SIZE_CLASS[size],\n\t\t\t\tFOCUS_RING,\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t<RadioGroupPrimitive.Indicator className=\"flex items-center justify-center\">\n\t\t\t\t<Circle className={RADIO_INDICATOR_CLASS[size]} />\n\t\t\t</RadioGroupPrimitive.Indicator>\n\t\t</RadioGroupPrimitive.Item>\n\t),\n);\nRadioRoot.displayName = RadioGroupPrimitive.Item.displayName;\n\nexport const Radio = Object.assign(RadioRoot, {\n\tGroup: RadioGroup,\n\tLegend: RadioLegend,\n\tItem: RadioRoot,\n});\n"],"mappings":";;;;;;;;;AASA,IAAME,IAA8C;CACnD,IAAI;CACJ,SAAS;AACV,GAEMC,IAAmD;CACxD,IAAI;CACJ,SAAS;AACV,GA8CMC,IAAcJ,EAAM,YACxB,EAAE,cAAW,GAAGK,KAAS,MACzB,kBAAC,UAAD;CACM;CACL,WAAWC,EACV,6GACAC,CACD;CACA,GAAIF;AACJ,CAAA,CAEH;AACA,EAAY,cAAc;AAE1B,IAAaG,IAAaR,EAAM,YAK9B,EACC,cACA,UACA,cAAW,IACX,aACA,oBAAoBS,GACpB,gBAAgBC,GAChB,mBAAmBC,GACnB,GAAGN,KAEJ,MACI;CACJ,IAAMO,IAAcZ,EAAM,MAAM,GAC1Ba,IAAU,EAAQC,GAClBC,IAAU,GAAGH,EAAY,SACzBI,IAAkB,GAAGJ,EAAY,UACjCK,IAAkD,CAAC,GACnDC,IAA2B,CAAC;CAClC,EAAM,SAAS,QAAQC,IAAW,MAAU;EAC3C,
|
|
1
|
+
{"version":3,"file":"radio.js","names":["React","RadioGroupPrimitive","RADIO_SIZE_CLASS","RADIO_INDICATOR_CLASS","RadioLegend","props","cn","className","RadioGroup","describedBy","ariaInvalid","labelledBy","generatedId","invalid","error","errorId","defaultLegendId","legends","items","children","child","labeledLegends","legendId","legend","index","mergedLabelledBy","mergedDescribedBy","RadioRoot","BASALT_UI_CLASS","size","FOCUS_RING","Circle","Radio"],"sources":["../../src/components/radio.tsx"],"sourcesContent":["import * as RadioGroupPrimitive from \"@radix-ui/react-radio-group\";\nimport { Circle } from \"lucide-react\";\nimport * as React from \"react\";\nimport { cn } from \"../utils/cn\";\nimport { BASALT_UI_CLASS } from \"../utils/control-surface\";\nimport { FOCUS_RING } from \"./overlay\";\n\nexport type RadioSize = \"sm\" | \"default\";\n\nconst RADIO_SIZE_CLASS: Record<RadioSize, string> = {\n\tsm: \"h-basalt-check-sm w-basalt-check-sm\",\n\tdefault: \"h-basalt-check w-basalt-check\",\n};\n\nconst RADIO_INDICATOR_CLASS: Record<RadioSize, string> = {\n\tsm: \"h-basalt-1_5 w-basalt-1_5 fill-current text-current\",\n\tdefault: \"h-basalt-2_5 w-basalt-2_5 fill-current text-current\",\n};\n\nexport type RadioGroupProps = Omit<\n\tReact.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root>,\n\t\"disabled\" | \"value\" | \"defaultValue\" | \"onValueChange\"\n> & {\n\t/**\n\t * The controlled selected value.\n\t */\n\tvalue?: string;\n\t/**\n\t * The initially selected value.\n\t */\n\tdefaultValue?: string;\n\t/**\n\t * Called when the selected value changes.\n\t */\n\tonValueChange?: (value: string) => void;\n\t/**\n\t * Marks the group invalid and shows alert copy.\n\t */\n\terror?: React.ReactNode;\n\t/**\n\t * Disable every item in the group.\n\t * @default false\n\t */\n\tdisabled?: boolean;\n};\n\nexport type RadioLegendProps = React.ComponentPropsWithoutRef<\"legend\">;\n\nexport type RadioProps = Omit<\n\tReact.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item>,\n\t\"value\"\n> & {\n\t/**\n\t * The value associated with the radio item.\n\t */\n\tvalue: string;\n\t/**\n\t * The visual size of the radio.\n\t * @default default\n\t */\n\tsize?: RadioSize;\n};\n\nconst RadioLegend = React.forwardRef<HTMLLegendElement, RadioLegendProps>(\n\t({ className, ...props }, ref) => (\n\t\t<legend\n\t\t\tref={ref}\n\t\t\tclassName={cn(\n\t\t\t\t\"mb-basalt-field-gap text-basalt-base font-medium leading-[var(--basalt-line-body)] text-basalt-foreground\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t),\n);\nRadioLegend.displayName = \"Radio.Legend\";\n\nexport const RadioGroup = React.forwardRef<\n\tReact.ElementRef<typeof RadioGroupPrimitive.Root>,\n\tRadioGroupProps\n>(\n\t(\n\t\t{\n\t\t\tclassName,\n\t\t\terror,\n\t\t\tdisabled = false,\n\t\t\tchildren,\n\t\t\t\"aria-describedby\": describedBy,\n\t\t\t\"aria-invalid\": ariaInvalid,\n\t\t\t\"aria-labelledby\": labelledBy,\n\t\t\t...props\n\t\t},\n\t\tref,\n\t) => {\n\t\tconst generatedId = React.useId();\n\t\tconst invalid = Boolean(error);\n\t\tconst errorId = `${generatedId}-error`;\n\t\tconst defaultLegendId = `${generatedId}-legend`;\n\t\tconst legends: React.ReactElement<RadioLegendProps>[] = [];\n\t\tconst items: React.ReactNode[] = [];\n\t\tReact.Children.forEach(children, (child) => {\n\t\t\tif (React.isValidElement(child) && child.type === RadioLegend) {\n\t\t\t\tlegends.push(child as React.ReactElement<RadioLegendProps>);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\titems.push(child);\n\t\t});\n\t\tconst labeledLegends = legends.map((legend, index) => {\n\t\t\tconst legendId =\n\t\t\t\tlegend.props.id ?? (index === 0 ? defaultLegendId : `${defaultLegendId}-${index}`);\n\t\t\treturn React.cloneElement(legend, { key: legendId, id: legendId });\n\t\t});\n\t\tconst legendIds = labeledLegends\n\t\t\t.map((legend) => legend.props.id)\n\t\t\t.filter(Boolean)\n\t\t\t.join(\" \");\n\t\tconst mergedLabelledBy = [legendIds, labelledBy].filter(Boolean).join(\" \") || undefined;\n\t\tconst mergedDescribedBy =\n\t\t\t[invalid ? errorId : null, describedBy].filter(Boolean).join(\" \") || undefined;\n\t\treturn (\n\t\t\t<fieldset disabled={disabled} className=\"basalt-ui flex flex-col gap-basalt-field-gap\">\n\t\t\t\t{labeledLegends}\n\t\t\t\t<RadioGroupPrimitive.Root\n\t\t\t\t\tref={ref}\n\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\tclassName={cn(\"grid gap-basalt-space-lg\", className)}\n\t\t\t\t\t{...props}\n\t\t\t\t\taria-labelledby={mergedLabelledBy}\n\t\t\t\t\taria-describedby={mergedDescribedBy}\n\t\t\t\t\taria-invalid={invalid ? true : ariaInvalid}\n\t\t\t\t>\n\t\t\t\t\t{items}\n\t\t\t\t</RadioGroupPrimitive.Root>\n\t\t\t\t{invalid ? (\n\t\t\t\t\t<p id={errorId} className=\"text-basalt-sm text-basalt-destructive\" role=\"alert\">\n\t\t\t\t\t\t{error}\n\t\t\t\t\t</p>\n\t\t\t\t) : null}\n\t\t\t</fieldset>\n\t\t);\n\t},\n);\nRadioGroup.displayName = \"Radio.Group\";\n\nconst RadioRoot = React.forwardRef<React.ElementRef<typeof RadioGroupPrimitive.Item>, RadioProps>(\n\t({ className, size = \"default\", ...props }, ref) => (\n\t\t<RadioGroupPrimitive.Item\n\t\t\tref={ref}\n\t\t\tclassName={cn(\n\t\t\t\tBASALT_UI_CLASS,\n\t\t\t\t\"aspect-square shrink-0 rounded-basalt-full border border-basalt-primary text-basalt-primary disabled:cursor-not-allowed disabled:opacity-50\",\n\t\t\t\tRADIO_SIZE_CLASS[size],\n\t\t\t\tFOCUS_RING,\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t<RadioGroupPrimitive.Indicator className=\"flex items-center justify-center\">\n\t\t\t\t<Circle className={RADIO_INDICATOR_CLASS[size]} />\n\t\t\t</RadioGroupPrimitive.Indicator>\n\t\t</RadioGroupPrimitive.Item>\n\t),\n);\nRadioRoot.displayName = RadioGroupPrimitive.Item.displayName;\n\nexport const Radio = Object.assign(RadioRoot, {\n\tGroup: RadioGroup,\n\tLegend: RadioLegend,\n\tItem: RadioRoot,\n});\n"],"mappings":";;;;;;;;;AASA,IAAME,IAA8C;CACnD,IAAI;CACJ,SAAS;AACV,GAEMC,IAAmD;CACxD,IAAI;CACJ,SAAS;AACV,GA8CMC,IAAcJ,EAAM,YACxB,EAAE,cAAW,GAAGK,KAAS,MACzB,kBAAC,UAAD;CACM;CACL,WAAWC,EACV,6GACAC,CACD;CACA,GAAIF;AACJ,CAAA,CAEH;AACA,EAAY,cAAc;AAE1B,IAAaG,IAAaR,EAAM,YAK9B,EACC,cACA,UACA,cAAW,IACX,aACA,oBAAoBS,GACpB,gBAAgBC,GAChB,mBAAmBC,GACnB,GAAGN,KAEJ,MACI;CACJ,IAAMO,IAAcZ,EAAM,MAAM,GAC1Ba,IAAU,EAAQC,GAClBC,IAAU,GAAGH,EAAY,SACzBI,IAAkB,GAAGJ,EAAY,UACjCK,IAAkD,CAAC,GACnDC,IAA2B,CAAC;CAClC,EAAM,SAAS,QAAQC,IAAW,MAAU;EAC3C,AAAInB,EAAM,eAAeoB,CAAK,KAAKA,EAAM,SAAShB,IACjDa,EAAQ,KAAKG,CAA6C,IAG3DF,EAAM,KAAKE,CAAK;CACjB,CAAC;CACD,IAAMC,IAAiBJ,EAAQ,KAAK,GAAQ,MAAU;EACrD,IAAMK,IACLC,EAAO,MAAM,OAAOC,MAAU,IAAIR,IAAkB,GAAGA,EAAgB,GAAGQ;EAC3E,OAAOxB,EAAM,aAAauB,GAAQ;GAAE,KAAKD;GAAU,IAAIA;EAAS,CAAC;CAClE,CAAC,GAKKG,IAAmB,CAJPJ,EAChB,KAAK,MAAWE,EAAO,MAAM,EAAE,CAAC,CAChC,OAAO,OAAO,CAAC,CACf,KAAK,GACmB,GAAWZ,CAAU,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,KAAK,GAAG,KAAK,KAAA,GACxEe,IACL,CAACb,IAAUE,IAAU,MAAMN,CAAW,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,KAAK,GAAG,KAAK,KAAA;CACtE,OACC,kBAAC,YAAD;EAAoB;EAAU,WAAU;EAAxC,UAAA;GACEY;GACD,kBAACpB,EAAoB,MAArB;IACM;IACK;IACV,WAAWK,EAAG,4BAA4BC,CAAS;IACnD,GAAIF;IACJ,mBAAiBoB;IACjB,oBAAkBC;IAClB,gBAAcb,IAAU,KAAOH;IAE9B,UAAAQ;GACwB,CAAA;GACzBL,IACA,kBAAC,KAAD;IAAG,IAAIE;IAAS,WAAU;IAAyC,MAAK;IACtE,UAAAD;GACC,CAAA,IACA;EACK;;AAEZ,CACD;AACA,EAAW,cAAc;AAEzB,IAAMa,IAAY3B,EAAM,YACtB,EAAE,cAAW,UAAO,WAAW,GAAGK,KAAS,MAC3C,kBAACJ,EAAoB,MAArB;CACM;CACL,WAAWK,EACVsB,GACA,+IACA1B,EAAiB2B,IACjBC,GACAvB,CACD;CACA,GAAIF;CAEJ,UAAA,kBAACJ,EAAoB,WAArB;EAA+B,WAAU;EACxC,UAAA,kBAAC8B,GAAD,EAAQ,WAAW5B,EAAsB0B,GAAQ,CAAA;CACnB,CAAA;AACN,CAAA,CAE5B;AACA,EAAU,cAAc5B,EAAoB,KAAK;AAEjD,IAAa+B,IAAQ,OAAO,OAAOL,GAAW;CAC7C,OAAOnB;CACP,QAAQJ;CACR,MAAMuB;AACP,CAAC"}
|
|
@@ -9,7 +9,7 @@ import { RECOMMENDATION_CONFIDENCE as c } from "../models/recommendation.js";
|
|
|
9
9
|
import { useId as l, useRef as u } from "react";
|
|
10
10
|
import { Check as d, ChevronDown as f } from "lucide-react";
|
|
11
11
|
import { Fragment as p, jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
12
|
-
|
|
12
|
+
// src/components/recommendation-card.tsx
|
|
13
13
|
function g({ value: t }) {
|
|
14
14
|
let n = c[t];
|
|
15
15
|
return /* @__PURE__ */ h("span", {
|
|
@@ -117,7 +117,6 @@ function _({ title: c = "Recommended action", className: _, ...v }) {
|
|
|
117
117
|
})]
|
|
118
118
|
});
|
|
119
119
|
}
|
|
120
|
-
//#endregion
|
|
121
120
|
export { _ as RecommendationCard };
|
|
122
121
|
|
|
123
122
|
//# sourceMappingURL=recommendation-card.js.map
|
|
@@ -3,7 +3,7 @@ import { cn as e } from "../utils/cn.js";
|
|
|
3
3
|
import { DataTable as t } from "./data-table.js";
|
|
4
4
|
import { PageHeader as n } from "./page-header.js";
|
|
5
5
|
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
6
|
-
|
|
6
|
+
// src/components/resource-list.tsx
|
|
7
7
|
var a = [{
|
|
8
8
|
id: "name",
|
|
9
9
|
header: "Name",
|
|
@@ -37,7 +37,6 @@ function o({ title: o, description: s, data: c, header: l, toolbar: u, filters:
|
|
|
37
37
|
]
|
|
38
38
|
});
|
|
39
39
|
}
|
|
40
|
-
//#endregion
|
|
41
40
|
export { o as ResourceList };
|
|
42
41
|
|
|
43
42
|
//# sourceMappingURL=resource-list.js.map
|
|
@@ -5,7 +5,7 @@ import { Button as n } from "./button.js";
|
|
|
5
5
|
import { useEffect as r, useLayoutEffect as i, useRef as a, useState as o } from "react";
|
|
6
6
|
import { ArrowLeft as s } from "lucide-react";
|
|
7
7
|
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
8
|
-
|
|
8
|
+
// src/components/responsive-master-detail.tsx
|
|
9
9
|
function u({ label: u, list: d, children: f, detailOpen: p, onDetailOpenChange: m, selectedId: h, listLabel: g = "Items", detailLabel: _ = "Details", backLabel: v = "Back to items", empty: y = /* @__PURE__ */ c("p", {
|
|
10
10
|
className: "p-basalt-layout text-basalt-base text-basalt-muted-foreground",
|
|
11
11
|
children: "Choose an item to see its details."
|
|
@@ -79,7 +79,6 @@ function u({ label: u, list: d, children: f, detailOpen: p, onDetailOpenChange:
|
|
|
79
79
|
})]
|
|
80
80
|
});
|
|
81
81
|
}
|
|
82
|
-
//#endregion
|
|
83
82
|
export { u as ResponsiveMasterDetail };
|
|
84
83
|
|
|
85
84
|
//# sourceMappingURL=responsive-master-detail.js.map
|
|
@@ -3,7 +3,7 @@ import { cn as e } from "../utils/cn.js";
|
|
|
3
3
|
import * as t from "react";
|
|
4
4
|
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
5
5
|
import * as i from "@radix-ui/react-scroll-area";
|
|
6
|
-
|
|
6
|
+
// src/components/scroll-area.tsx
|
|
7
7
|
var a = "flex touch-none select-none p-px transition-colors basalt-motion motion-reduce:transition-none";
|
|
8
8
|
function o({ orientation: t }) {
|
|
9
9
|
return /* @__PURE__ */ n(i.Scrollbar, {
|
|
@@ -43,7 +43,6 @@ var s = t.forwardRef(({ "aria-describedby": t, "aria-label": a, "aria-labelledby
|
|
|
43
43
|
});
|
|
44
44
|
});
|
|
45
45
|
s.displayName = "ScrollArea";
|
|
46
|
-
//#endregion
|
|
47
46
|
export { s as ScrollArea };
|
|
48
47
|
|
|
49
48
|
//# sourceMappingURL=scroll-area.js.map
|