@epilot/spark-ui 0.25.1 → 0.26.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/dist/components/alert-dialog.cjs +4 -2
- package/dist/components/alert-dialog.cjs.map +1 -1
- package/dist/components/alert-dialog.d.cts +4 -1
- package/dist/components/alert-dialog.d.ts +4 -1
- package/dist/components/alert-dialog.js +4 -2
- package/dist/components/alert-dialog.js.map +1 -1
- package/dist/components/attachment.d.cts +1 -1
- package/dist/components/attachment.d.ts +1 -1
- package/dist/components/autocomplete.cjs +3 -2
- package/dist/components/autocomplete.cjs.map +1 -1
- package/dist/components/autocomplete.js +3 -2
- package/dist/components/autocomplete.js.map +1 -1
- package/dist/components/avatar.js +1 -1
- package/dist/components/badge.js +1 -1
- package/dist/components/banner.cjs +74 -0
- package/dist/components/banner.cjs.map +1 -0
- package/dist/components/banner.d.cts +27 -0
- package/dist/components/banner.d.ts +27 -0
- package/dist/components/banner.js +72 -0
- package/dist/components/banner.js.map +1 -0
- package/dist/components/box.js +1 -1
- package/dist/components/bubble.d.cts +1 -1
- package/dist/components/bubble.d.ts +1 -1
- package/dist/components/button-group.js +1 -1
- package/dist/components/button.d.cts +3 -3
- package/dist/components/button.d.ts +3 -3
- package/dist/components/button.js +1 -1
- package/dist/components/callout.d.cts +1 -1
- package/dist/components/callout.d.ts +1 -1
- package/dist/components/card.js +1 -1
- package/dist/components/checkbox.js +1 -1
- package/dist/components/data-list.cjs +39 -0
- package/dist/components/data-list.cjs.map +1 -0
- package/dist/components/data-list.d.cts +33 -0
- package/dist/components/data-list.d.ts +33 -0
- package/dist/components/data-list.js +35 -0
- package/dist/components/data-list.js.map +1 -0
- package/dist/components/dialog.cjs +4 -2
- package/dist/components/dialog.cjs.map +1 -1
- package/dist/components/dialog.d.cts +4 -1
- package/dist/components/dialog.d.ts +4 -1
- package/dist/components/dialog.js +4 -2
- package/dist/components/dialog.js.map +1 -1
- package/dist/components/drawer.cjs +12 -2
- package/dist/components/drawer.cjs.map +1 -1
- package/dist/components/drawer.d.cts +4 -1
- package/dist/components/drawer.d.ts +4 -1
- package/dist/components/drawer.js +13 -3
- package/dist/components/drawer.js.map +1 -1
- package/dist/components/dropdown-menu.cjs +5 -3
- package/dist/components/dropdown-menu.cjs.map +1 -1
- package/dist/components/dropdown-menu.d.cts +1 -0
- package/dist/components/dropdown-menu.d.ts +1 -0
- package/dist/components/dropdown-menu.js +5 -3
- package/dist/components/dropdown-menu.js.map +1 -1
- package/dist/components/empty-state.cjs +107 -25
- package/dist/components/empty-state.cjs.map +1 -1
- package/dist/components/empty-state.d.cts +27 -10
- package/dist/components/empty-state.d.ts +27 -10
- package/dist/components/empty-state.js +104 -26
- package/dist/components/empty-state.js.map +1 -1
- package/dist/components/field.cjs +1 -1
- package/dist/components/field.js +1 -1
- package/dist/components/icon.js +1 -1
- package/dist/components/info-block.d.cts +1 -1
- package/dist/components/info-block.d.ts +1 -1
- package/dist/components/input-otp.cjs +1 -1
- package/dist/components/input-otp.js +1 -1
- package/dist/components/input.cjs +1 -1
- package/dist/components/input.js +1 -1
- package/dist/components/kbd.cjs +14 -0
- package/dist/components/kbd.cjs.map +1 -0
- package/dist/components/kbd.d.cts +13 -0
- package/dist/components/kbd.d.ts +13 -0
- package/dist/components/kbd.js +13 -0
- package/dist/components/kbd.js.map +1 -0
- package/dist/components/marker.d.cts +1 -1
- package/dist/components/marker.d.ts +1 -1
- package/dist/components/message-scroller.cjs +1 -1
- package/dist/components/message-scroller.js +1 -1
- package/dist/components/pill.js +1 -1
- package/dist/components/popover.cjs +3 -2
- package/dist/components/popover.cjs.map +1 -1
- package/dist/components/popover.js +3 -2
- package/dist/components/popover.js.map +1 -1
- package/dist/components/radio.js +1 -1
- package/dist/components/select.cjs +4 -3
- package/dist/components/select.cjs.map +1 -1
- package/dist/components/select.js +4 -3
- package/dist/components/select.js.map +1 -1
- package/dist/components/separator.cjs +35 -17
- package/dist/components/separator.cjs.map +1 -1
- package/dist/components/separator.d.cts +1 -0
- package/dist/components/separator.d.ts +1 -0
- package/dist/components/separator.js +35 -17
- package/dist/components/separator.js.map +1 -1
- package/dist/components/sheet.cjs +4 -2
- package/dist/components/sheet.cjs.map +1 -1
- package/dist/components/sheet.d.cts +4 -1
- package/dist/components/sheet.d.ts +4 -1
- package/dist/components/sheet.js +4 -2
- package/dist/components/sheet.js.map +1 -1
- package/dist/components/switch.js +1 -1
- package/dist/components/textarea.cjs +1 -1
- package/dist/components/textarea.js +1 -1
- package/dist/components/theme.cjs +118 -24
- package/dist/components/theme.cjs.map +1 -1
- package/dist/components/theme.d.cts +7 -1
- package/dist/components/theme.d.ts +7 -1
- package/dist/components/theme.js +120 -27
- package/dist/components/theme.js.map +1 -1
- package/dist/components/toast.cjs +3 -2
- package/dist/components/toast.cjs.map +1 -1
- package/dist/components/toast.js +3 -2
- package/dist/components/toast.js.map +1 -1
- package/dist/components/toggle-group.js +1 -1
- package/dist/components/toggle.cjs +1 -1
- package/dist/components/toggle.js +2 -2
- package/dist/components/tooltip.cjs +5 -3
- package/dist/components/tooltip.cjs.map +1 -1
- package/dist/components/tooltip.d.cts +1 -0
- package/dist/components/tooltip.d.ts +1 -0
- package/dist/components/tooltip.js +5 -3
- package/dist/components/tooltip.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,38 +1,116 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import { cn } from "../utils/cn.js";
|
|
2
3
|
import { Icon } from "./icon.js";
|
|
4
|
+
import { createContext, useContext } from "react";
|
|
3
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
6
|
import { cva } from "class-variance-authority";
|
|
5
7
|
//#region src/components/empty-state.tsx
|
|
6
|
-
const emptyStateVariants = cva("flex
|
|
7
|
-
variants: {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
const emptyStateVariants = cva("flex", {
|
|
9
|
+
variants: {
|
|
10
|
+
variant: {
|
|
11
|
+
dashed: "rounded-lg border border-dashed border-gray",
|
|
12
|
+
ghost: ""
|
|
13
|
+
},
|
|
14
|
+
size: {
|
|
15
|
+
default: "",
|
|
16
|
+
sm: ""
|
|
17
|
+
},
|
|
18
|
+
layout: {
|
|
19
|
+
stacked: "flex-col items-center text-center",
|
|
20
|
+
inline: "flex-row items-start text-left"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
compoundVariants: [
|
|
24
|
+
{
|
|
25
|
+
layout: "stacked",
|
|
26
|
+
size: "default",
|
|
27
|
+
class: "gap-4 px-6 py-12"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
layout: "stacked",
|
|
31
|
+
size: "sm",
|
|
32
|
+
class: "gap-2 px-4 py-5"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
layout: "inline",
|
|
36
|
+
size: "default",
|
|
37
|
+
class: "gap-4 p-6"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
layout: "inline",
|
|
41
|
+
size: "sm",
|
|
42
|
+
class: "gap-3 px-4 py-3"
|
|
43
|
+
}
|
|
44
|
+
],
|
|
45
|
+
defaultVariants: {
|
|
46
|
+
variant: "dashed",
|
|
47
|
+
size: "default",
|
|
48
|
+
layout: "stacked"
|
|
49
|
+
}
|
|
12
50
|
});
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
51
|
+
const EmptyStateContext = createContext({
|
|
52
|
+
size: "default",
|
|
53
|
+
layout: "stacked"
|
|
54
|
+
});
|
|
55
|
+
function EmptyStateTitle({ className, ...props }) {
|
|
56
|
+
const { size } = useContext(EmptyStateContext);
|
|
57
|
+
return /* @__PURE__ */ jsx("h3", {
|
|
58
|
+
"data-slot": "empty-state-title",
|
|
59
|
+
className: cn("text-gray", size === "sm" ? "text-sm font-semibold" : "text-base font-bold", className),
|
|
60
|
+
...props
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
function EmptyStateDescription({ className, ...props }) {
|
|
64
|
+
const { size, layout } = useContext(EmptyStateContext);
|
|
65
|
+
return /* @__PURE__ */ jsx("p", {
|
|
66
|
+
"data-slot": "empty-state-description",
|
|
67
|
+
className: cn(layout !== "inline" && "mx-auto", "max-w-md text-gray-light", size === "sm" ? "text-xs" : "text-sm", className),
|
|
68
|
+
...props
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
const actionsMargin = {
|
|
72
|
+
stacked: {
|
|
73
|
+
default: "mt-3",
|
|
74
|
+
sm: "mt-1"
|
|
75
|
+
},
|
|
76
|
+
inline: {
|
|
77
|
+
default: "mt-3",
|
|
78
|
+
sm: "mt-2"
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
function EmptyStateActions({ className, ...props }) {
|
|
82
|
+
const { size, layout } = useContext(EmptyStateContext);
|
|
83
|
+
return /* @__PURE__ */ jsx("div", {
|
|
84
|
+
"data-slot": "empty-state-actions",
|
|
85
|
+
className: cn("flex flex-wrap gap-2", layout === "stacked" && "justify-center", actionsMargin[layout][size], className),
|
|
86
|
+
...props
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
function EmptyState({ children, className, icon: Glyph, layout = "stacked", size = "default", variant, ...props }) {
|
|
90
|
+
return /* @__PURE__ */ jsx(EmptyStateContext.Provider, {
|
|
91
|
+
value: {
|
|
92
|
+
size,
|
|
93
|
+
layout
|
|
94
|
+
},
|
|
95
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
96
|
+
"data-slot": "empty-state",
|
|
97
|
+
className: cn(emptyStateVariants({
|
|
98
|
+
variant,
|
|
99
|
+
size,
|
|
100
|
+
layout
|
|
101
|
+
}), className),
|
|
102
|
+
...props,
|
|
103
|
+
children: [Glyph ? /* @__PURE__ */ jsx(Icon, {
|
|
104
|
+
size: size === "sm" ? "small" : "xl",
|
|
19
105
|
children: /* @__PURE__ */ jsx(Glyph, {})
|
|
20
|
-
}) : null,
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
children: title
|
|
26
|
-
}), description && /* @__PURE__ */ jsx("p", {
|
|
27
|
-
className: "mx-auto max-w-md text-sm text-gray-light",
|
|
28
|
-
children: description
|
|
29
|
-
})]
|
|
30
|
-
}),
|
|
31
|
-
action
|
|
32
|
-
]
|
|
106
|
+
}) : null, /* @__PURE__ */ jsx("div", {
|
|
107
|
+
className: cn("flex flex-col gap-1", layout === "inline" && "min-w-0 flex-1"),
|
|
108
|
+
children
|
|
109
|
+
})]
|
|
110
|
+
})
|
|
33
111
|
});
|
|
34
112
|
}
|
|
35
113
|
//#endregion
|
|
36
|
-
export { EmptyState };
|
|
114
|
+
export { EmptyState, EmptyStateActions, EmptyStateDescription, EmptyStateTitle };
|
|
37
115
|
|
|
38
116
|
//# sourceMappingURL=empty-state.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"empty-state.js","names":[],"sources":["../../src/components/empty-state.tsx"],"sourcesContent":["import type { SparkIcon } from '@epilot/spark-icons'\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport type
|
|
1
|
+
{"version":3,"file":"empty-state.js","names":[],"sources":["../../src/components/empty-state.tsx"],"sourcesContent":["import type { SparkIcon } from '@epilot/spark-icons'\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport {\n createContext,\n type HTMLAttributes,\n type ReactNode,\n useContext,\n} from 'react'\nimport { cn } from '../utils/cn'\nimport { Icon } from './icon'\n\nconst emptyStateVariants = cva('flex', {\n variants: {\n variant: {\n dashed: 'rounded-lg border border-dashed border-gray',\n ghost: '',\n },\n size: { default: '', sm: '' },\n layout: {\n stacked: 'flex-col items-center text-center',\n inline: 'flex-row items-start text-left',\n },\n },\n compoundVariants: [\n { layout: 'stacked', size: 'default', class: 'gap-4 px-6 py-12' },\n { layout: 'stacked', size: 'sm', class: 'gap-2 px-4 py-5' },\n { layout: 'inline', size: 'default', class: 'gap-4 p-6' },\n { layout: 'inline', size: 'sm', class: 'gap-3 px-4 py-3' },\n ],\n defaultVariants: {\n variant: 'dashed',\n size: 'default',\n layout: 'stacked',\n },\n})\n\ntype EmptyStateVariants = VariantProps<typeof emptyStateVariants>\n\n// A leftover `title` would otherwise compile and render as a tooltip, not a heading.\ninterface EmptyStateProps\n extends\n Omit<HTMLAttributes<HTMLDivElement>, 'title'>,\n Pick<EmptyStateVariants, 'variant'> {\n // null would switch off the compound cells and drop all padding and gap\n size?: NonNullable<EmptyStateVariants['size']>\n layout?: NonNullable<EmptyStateVariants['layout']>\n icon?: SparkIcon\n children: ReactNode\n}\n\nconst EmptyStateContext = createContext<{\n size: NonNullable<EmptyStateVariants['size']>\n layout: NonNullable<EmptyStateVariants['layout']>\n}>({ size: 'default', layout: 'stacked' })\n\nfunction EmptyStateTitle({\n className,\n ...props\n}: HTMLAttributes<HTMLHeadingElement>) {\n const { size } = useContext(EmptyStateContext)\n return (\n <h3\n data-slot=\"empty-state-title\"\n className={cn(\n 'text-gray',\n size === 'sm' ? 'text-sm font-semibold' : 'text-base font-bold',\n className,\n )}\n {...props}\n />\n )\n}\n\nfunction EmptyStateDescription({\n className,\n ...props\n}: HTMLAttributes<HTMLParagraphElement>) {\n const { size, layout } = useContext(EmptyStateContext)\n return (\n <p\n data-slot=\"empty-state-description\"\n className={cn(\n layout !== 'inline' && 'mx-auto',\n 'max-w-md text-gray-light',\n size === 'sm' ? 'text-xs' : 'text-sm',\n className,\n )}\n {...props}\n />\n )\n}\n\n// Margins plus the column's gap-1 reproduce the old spacing: 16/8 px stacked, 16/12 px inline.\nconst actionsMargin = {\n stacked: { default: 'mt-3', sm: 'mt-1' },\n inline: { default: 'mt-3', sm: 'mt-2' },\n} as const\n\nfunction EmptyStateActions({\n className,\n ...props\n}: HTMLAttributes<HTMLDivElement>) {\n const { size, layout } = useContext(EmptyStateContext)\n return (\n <div\n data-slot=\"empty-state-actions\"\n className={cn(\n 'flex flex-wrap gap-2',\n layout === 'stacked' && 'justify-center',\n actionsMargin[layout][size],\n className,\n )}\n {...props}\n />\n )\n}\n\nfunction EmptyState({\n children,\n className,\n icon: Glyph,\n layout = 'stacked',\n size = 'default',\n variant,\n ...props\n}: EmptyStateProps) {\n return (\n <EmptyStateContext.Provider value={{ size, layout }}>\n <div\n data-slot=\"empty-state\"\n className={cn(emptyStateVariants({ variant, size, layout }), className)}\n {...props}\n >\n {Glyph ? (\n <Icon size={size === 'sm' ? 'small' : 'xl'}>\n <Glyph />\n </Icon>\n ) : null}\n <div\n className={cn(\n 'flex flex-col gap-1',\n layout === 'inline' && 'min-w-0 flex-1',\n )}\n >\n {children}\n </div>\n </div>\n </EmptyStateContext.Provider>\n )\n}\n\nexport { EmptyState, EmptyStateActions, EmptyStateDescription, EmptyStateTitle }\nexport type { EmptyStateProps }\n"],"mappings":";;;;;;;AAWA,MAAM,qBAAqB,IAAI,QAAQ;CACrC,UAAU;EACR,SAAS;GACP,QAAQ;GACR,OAAO;EACT;EACA,MAAM;GAAE,SAAS;GAAI,IAAI;EAAG;EAC5B,QAAQ;GACN,SAAS;GACT,QAAQ;EACV;CACF;CACA,kBAAkB;EAChB;GAAE,QAAQ;GAAW,MAAM;GAAW,OAAO;EAAmB;EAChE;GAAE,QAAQ;GAAW,MAAM;GAAM,OAAO;EAAkB;EAC1D;GAAE,QAAQ;GAAU,MAAM;GAAW,OAAO;EAAY;EACxD;GAAE,QAAQ;GAAU,MAAM;GAAM,OAAO;EAAkB;CAC3D;CACA,iBAAiB;EACf,SAAS;EACT,MAAM;EACN,QAAQ;CACV;AACF,CAAC;AAgBD,MAAM,oBAAoB,cAGvB;CAAE,MAAM;CAAW,QAAQ;AAAU,CAAC;AAEzC,SAAS,gBAAgB,EACvB,WACA,GAAG,SACkC;CACrC,MAAM,EAAE,SAAS,WAAW,iBAAiB;CAC7C,OACE,oBAAC,MAAD;EACE,aAAU;EACV,WAAW,GACT,aACA,SAAS,OAAO,0BAA0B,uBAC1C,SACF;EACA,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,sBAAsB,EAC7B,WACA,GAAG,SACoC;CACvC,MAAM,EAAE,MAAM,WAAW,WAAW,iBAAiB;CACrD,OACE,oBAAC,KAAD;EACE,aAAU;EACV,WAAW,GACT,WAAW,YAAY,WACvB,4BACA,SAAS,OAAO,YAAY,WAC5B,SACF;EACA,GAAI;CACL,CAAA;AAEL;AAGA,MAAM,gBAAgB;CACpB,SAAS;EAAE,SAAS;EAAQ,IAAI;CAAO;CACvC,QAAQ;EAAE,SAAS;EAAQ,IAAI;CAAO;AACxC;AAEA,SAAS,kBAAkB,EACzB,WACA,GAAG,SAC8B;CACjC,MAAM,EAAE,MAAM,WAAW,WAAW,iBAAiB;CACrD,OACE,oBAAC,OAAD;EACE,aAAU;EACV,WAAW,GACT,wBACA,WAAW,aAAa,kBACxB,cAAc,QAAQ,OACtB,SACF;EACA,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,WAAW,EAClB,UACA,WACA,MAAM,OACN,SAAS,WACT,OAAO,WACP,SACA,GAAG,SACe;CAClB,OACE,oBAAC,kBAAkB,UAAnB;EAA4B,OAAO;GAAE;GAAM;EAAO;YAChD,qBAAC,OAAD;GACE,aAAU;GACV,WAAW,GAAG,mBAAmB;IAAE;IAAS;IAAM;GAAO,CAAC,GAAG,SAAS;GACtE,GAAI;aAHN,CAKG,QACC,oBAAC,MAAD;IAAM,MAAM,SAAS,OAAO,UAAU;cACpC,oBAAC,OAAD,CAAQ,CAAA;GACJ,CAAA,IACJ,MACJ,oBAAC,OAAD;IACE,WAAW,GACT,uBACA,WAAW,YAAY,gBACzB;IAEC;GACE,CAAA,CACF;;CACqB,CAAA;AAEhC"}
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
4
|
const require_chunk = require("../chunk-DY84GLCh.cjs");
|
|
5
|
+
const require_components_theme = require("./theme.cjs");
|
|
5
6
|
const require_components_separator = require("./separator.cjs");
|
|
6
7
|
const require_components_skeleton = require("./skeleton.cjs");
|
|
7
|
-
const require_components_theme = require("./theme.cjs");
|
|
8
8
|
let react = require("react");
|
|
9
9
|
react = require_chunk.__toESM(react);
|
|
10
10
|
let react_jsx_runtime = require("react/jsx-runtime");
|
package/dist/components/field.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use client";
|
|
3
3
|
import { cn } from "../utils/cn.js";
|
|
4
|
+
import { useTheme } from "./theme.js";
|
|
4
5
|
import { Separator } from "./separator.js";
|
|
5
6
|
import { Skeleton } from "./skeleton.js";
|
|
6
|
-
import { useTheme } from "./theme.js";
|
|
7
7
|
import * as React$1 from "react";
|
|
8
8
|
import { useId } from "react";
|
|
9
9
|
import { jsx, jsxs } from "react/jsx-runtime";
|
package/dist/components/icon.js
CHANGED
|
@@ -5,7 +5,7 @@ import { VariantProps } from "class-variance-authority";
|
|
|
5
5
|
|
|
6
6
|
//#region src/components/info-block.d.ts
|
|
7
7
|
declare const InfoBlock: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLDivElement> & VariantProps<(props?: ({
|
|
8
|
-
variant?: "
|
|
8
|
+
variant?: "default" | "bare" | null | undefined;
|
|
9
9
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string> & React$1.RefAttributes<HTMLDivElement>>;
|
|
10
10
|
declare const InfoBlockIcon: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLDivElement> & React$1.RefAttributes<HTMLDivElement>>;
|
|
11
11
|
declare const InfoBlockContent: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLDivElement> & React$1.RefAttributes<HTMLDivElement>>;
|
|
@@ -5,7 +5,7 @@ import { VariantProps } from "class-variance-authority";
|
|
|
5
5
|
|
|
6
6
|
//#region src/components/info-block.d.ts
|
|
7
7
|
declare const InfoBlock: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLDivElement> & VariantProps<(props?: ({
|
|
8
|
-
variant?: "
|
|
8
|
+
variant?: "default" | "bare" | null | undefined;
|
|
9
9
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string> & React$1.RefAttributes<HTMLDivElement>>;
|
|
10
10
|
declare const InfoBlockIcon: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLDivElement> & React$1.RefAttributes<HTMLDivElement>>;
|
|
11
11
|
declare const InfoBlockContent: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLDivElement> & React$1.RefAttributes<HTMLDivElement>>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const require_lib_input_box_variants = require("../lib/input-box-variants.cjs");
|
|
4
3
|
const require_components_field = require("./field.cjs");
|
|
4
|
+
const require_lib_input_box_variants = require("../lib/input-box-variants.cjs");
|
|
5
5
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
6
6
|
let class_variance_authority = require("class-variance-authority");
|
|
7
7
|
let _base_ui_react_otp_field = require("@base-ui/react/otp-field");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn } from "../utils/cn.js";
|
|
3
|
-
import { GHOST_UNDERLINE, boxChrome } from "../lib/input-box-variants.js";
|
|
4
3
|
import { useFieldControl } from "./field.js";
|
|
4
|
+
import { GHOST_UNDERLINE, boxChrome } from "../lib/input-box-variants.js";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
6
|
import { cva } from "class-variance-authority";
|
|
7
7
|
import { OTPField } from "@base-ui/react/otp-field";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const require_chunk = require("../chunk-DY84GLCh.cjs");
|
|
4
|
-
const require_lib_input_box_variants = require("../lib/input-box-variants.cjs");
|
|
5
4
|
const require_components_field = require("./field.cjs");
|
|
5
|
+
const require_lib_input_box_variants = require("../lib/input-box-variants.cjs");
|
|
6
6
|
let react = require("react");
|
|
7
7
|
react = require_chunk.__toESM(react);
|
|
8
8
|
let react_jsx_runtime = require("react/jsx-runtime");
|
package/dist/components/input.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn } from "../utils/cn.js";
|
|
3
|
-
import { GHOST_UNDERLINE, boxChrome } from "../lib/input-box-variants.js";
|
|
4
3
|
import { useFieldControl } from "./field.js";
|
|
4
|
+
import { GHOST_UNDERLINE, boxChrome } from "../lib/input-box-variants.js";
|
|
5
5
|
import * as React$1 from "react";
|
|
6
6
|
import { jsx } from "react/jsx-runtime";
|
|
7
7
|
import { cva } from "class-variance-authority";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
4
|
+
let cn = require("cn");
|
|
5
|
+
//#region src/components/kbd.tsx
|
|
6
|
+
const Kbd = ({ className, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("kbd", {
|
|
7
|
+
"data-slot": "kbd",
|
|
8
|
+
className: (0, cn.cn)("inline-flex h-5 min-w-5 items-center justify-center rounded-md border border-gray-a6 bg-gray-a2 px-1.5 font-mono text-xs text-gray-a11", className),
|
|
9
|
+
...props
|
|
10
|
+
});
|
|
11
|
+
//#endregion
|
|
12
|
+
exports.Kbd = Kbd;
|
|
13
|
+
|
|
14
|
+
//# sourceMappingURL=kbd.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kbd.cjs","names":[],"sources":["../../src/components/kbd.tsx"],"sourcesContent":["import type * as React from 'react'\nimport { cn } from '../utils/cn'\n\ntype KbdProps = React.HTMLAttributes<HTMLElement>\n\nconst Kbd = ({ className, ...props }: KbdProps) => (\n <kbd\n data-slot=\"kbd\"\n className={cn(\n 'inline-flex h-5 min-w-5 items-center justify-center rounded-md border border-gray-a6 bg-gray-a2 px-1.5 font-mono text-xs text-gray-a11',\n className,\n )}\n {...props}\n />\n)\n\nexport { Kbd }\nexport type { KbdProps }\n"],"mappings":";;;;;AAKA,MAAM,OAAO,EAAE,WAAW,GAAG,YAC3B,iBAAA,GAAA,kBAAA,KAAC,OAAD;CACE,aAAU;CACV,YAAA,GAAA,GAAA,IACE,0IACA,SACF;CACA,GAAI;AACL,CAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import * as React$1 from "react";
|
|
4
|
+
|
|
5
|
+
//#region src/components/kbd.d.ts
|
|
6
|
+
type KbdProps = React$1.HTMLAttributes<HTMLElement>;
|
|
7
|
+
declare const Kbd: ({
|
|
8
|
+
className,
|
|
9
|
+
...props
|
|
10
|
+
}: KbdProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
//#endregion
|
|
12
|
+
export { Kbd, type KbdProps };
|
|
13
|
+
//# sourceMappingURL=kbd.d.cts.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import * as React$1 from "react";
|
|
4
|
+
|
|
5
|
+
//#region src/components/kbd.d.ts
|
|
6
|
+
type KbdProps = React$1.HTMLAttributes<HTMLElement>;
|
|
7
|
+
declare const Kbd: ({
|
|
8
|
+
className,
|
|
9
|
+
...props
|
|
10
|
+
}: KbdProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
//#endregion
|
|
12
|
+
export { Kbd, type KbdProps };
|
|
13
|
+
//# sourceMappingURL=kbd.d.ts.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../utils/cn.js";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
//#region src/components/kbd.tsx
|
|
5
|
+
const Kbd = ({ className, ...props }) => /* @__PURE__ */ jsx("kbd", {
|
|
6
|
+
"data-slot": "kbd",
|
|
7
|
+
className: cn("inline-flex h-5 min-w-5 items-center justify-center rounded-md border border-gray-a6 bg-gray-a2 px-1.5 font-mono text-xs text-gray-a11", className),
|
|
8
|
+
...props
|
|
9
|
+
});
|
|
10
|
+
//#endregion
|
|
11
|
+
export { Kbd };
|
|
12
|
+
|
|
13
|
+
//# sourceMappingURL=kbd.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kbd.js","names":[],"sources":["../../src/components/kbd.tsx"],"sourcesContent":["import type * as React from 'react'\nimport { cn } from '../utils/cn'\n\ntype KbdProps = React.HTMLAttributes<HTMLElement>\n\nconst Kbd = ({ className, ...props }: KbdProps) => (\n <kbd\n data-slot=\"kbd\"\n className={cn(\n 'inline-flex h-5 min-w-5 items-center justify-center rounded-md border border-gray-a6 bg-gray-a2 px-1.5 font-mono text-xs text-gray-a11',\n className,\n )}\n {...props}\n />\n)\n\nexport { Kbd }\nexport type { KbdProps }\n"],"mappings":";;;;AAKA,MAAM,OAAO,EAAE,WAAW,GAAG,YAC3B,oBAAC,OAAD;CACE,aAAU;CACV,WAAW,GACT,0IACA,SACF;CACA,GAAI;AACL,CAAA"}
|
|
@@ -6,7 +6,7 @@ import { useRender } from "@base-ui/react/use-render";
|
|
|
6
6
|
|
|
7
7
|
//#region src/components/marker.d.ts
|
|
8
8
|
declare const markerVariants: (props?: ({
|
|
9
|
-
variant?: "
|
|
9
|
+
variant?: "separator" | "default" | "border" | null | undefined;
|
|
10
10
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
11
11
|
declare function Marker({
|
|
12
12
|
className,
|
|
@@ -6,7 +6,7 @@ import { useRender } from "@base-ui/react/use-render";
|
|
|
6
6
|
|
|
7
7
|
//#region src/components/marker.d.ts
|
|
8
8
|
declare const markerVariants: (props?: ({
|
|
9
|
-
variant?: "
|
|
9
|
+
variant?: "separator" | "default" | "border" | null | undefined;
|
|
10
10
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
11
11
|
declare function Marker({
|
|
12
12
|
className,
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const require_chunk = require("../chunk-DY84GLCh.cjs");
|
|
4
4
|
const require_hooks_use_reduced_motion = require("../hooks/use-reduced-motion.cjs");
|
|
5
|
-
const require_lib_message_animations = require("../lib/message-animations.cjs");
|
|
6
5
|
const require_components_button = require("./button.cjs");
|
|
6
|
+
const require_lib_message_animations = require("../lib/message-animations.cjs");
|
|
7
7
|
let react = require("react");
|
|
8
8
|
react = require_chunk.__toESM(react);
|
|
9
9
|
let _epilot_spark_icons = require("@epilot/spark-icons");
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { useReducedMotion } from "../hooks/use-reduced-motion.js";
|
|
3
3
|
import { cn } from "../utils/cn.js";
|
|
4
|
-
import { MESSAGE_ANIMATIONS } from "../lib/message-animations.js";
|
|
5
4
|
import { Button } from "./button.js";
|
|
5
|
+
import { MESSAGE_ANIMATIONS } from "../lib/message-animations.js";
|
|
6
6
|
import * as React$1 from "react";
|
|
7
7
|
import { ArrowDownward, ArrowUpward } from "@epilot/spark-icons";
|
|
8
8
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
package/dist/components/pill.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { accentByColor } from "../lib/accent-colors.js";
|
|
3
2
|
import { cn } from "../utils/cn.js";
|
|
3
|
+
import { accentByColor } from "../lib/accent-colors.js";
|
|
4
4
|
import * as React$1 from "react";
|
|
5
5
|
import { Close } from "@epilot/spark-icons";
|
|
6
6
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const require_chunk = require("../chunk-DY84GLCh.cjs");
|
|
4
|
+
const require_components_theme = require("./theme.cjs");
|
|
4
5
|
let react = require("react");
|
|
5
6
|
react = require_chunk.__toESM(react);
|
|
6
7
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
@@ -47,7 +48,7 @@ function PopoverContent({ className, align = "center", sideOffset = 4, side, ali
|
|
|
47
48
|
const context = react.useContext(PopoverAnchorContext);
|
|
48
49
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_popover.Popover.Portal, {
|
|
49
50
|
container,
|
|
50
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_popover.Popover.Positioner, {
|
|
51
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_components_theme.PortalTheme, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_popover.Popover.Positioner, {
|
|
51
52
|
align,
|
|
52
53
|
alignOffset,
|
|
53
54
|
anchor: anchor ?? context?.anchor ?? void 0,
|
|
@@ -60,7 +61,7 @@ function PopoverContent({ className, align = "center", sideOffset = 4, side, ali
|
|
|
60
61
|
className: (0, cn.cn)("z-50 w-72 origin-(--transform-origin) rounded-lg border border-gray-a1 bg-gray-1 p-4 text-gray-a12 shadow-md outline-hidden transition-[opacity,scale,translate] duration-100 motion-reduce:transition-none dark:bg-gray-3", "data-starting-style:scale-95 data-starting-style:opacity-0", "data-[side=bottom]:data-starting-style:-translate-y-2 data-[side=left]:data-starting-style:translate-x-2 data-[side=right]:data-starting-style:-translate-x-2 data-[side=top]:data-starting-style:translate-y-2", "data-ending-style:scale-95 data-ending-style:opacity-0", className),
|
|
61
62
|
...props
|
|
62
63
|
})
|
|
63
|
-
})
|
|
64
|
+
}) })
|
|
64
65
|
});
|
|
65
66
|
}
|
|
66
67
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"popover.cjs","names":["React","PopoverPrimitive"],"sources":["../../src/components/popover.tsx"],"sourcesContent":["import { mergeProps } from '@base-ui/react/merge-props'\nimport { Popover as PopoverPrimitive } from '@base-ui/react/popover'\nimport { useRender } from '@base-ui/react/use-render'\nimport * as React from 'react'\nimport { cn } from '../utils/cn'\n\n// Base UI dropped the Anchor part; the anchor element registers itself here and\n// PopoverContent feeds it to the Positioner.\nconst PopoverAnchorContext = React.createContext<{\n anchor: HTMLElement | null\n setAnchor: (element: HTMLElement | null) => void\n} | null>(null)\n\nfunction Popover(props: React.ComponentProps<typeof PopoverPrimitive.Root>) {\n const [anchor, setAnchor] = React.useState<HTMLElement | null>(null)\n const value = React.useMemo(() => ({ anchor, setAnchor }), [anchor])\n return (\n <PopoverAnchorContext.Provider value={value}>\n <PopoverPrimitive.Root {...props} />\n </PopoverAnchorContext.Provider>\n )\n}\n\nfunction PopoverTrigger(\n props: React.ComponentProps<typeof PopoverPrimitive.Trigger>,\n) {\n return <PopoverPrimitive.Trigger data-slot=\"popover-trigger\" {...props} />\n}\n\n// A Close part inside the popup is also what enables Base UI's focus trap for modal popovers.\nfunction PopoverClose(\n props: React.ComponentProps<typeof PopoverPrimitive.Close>,\n) {\n return <PopoverPrimitive.Close data-slot=\"popover-close\" {...props} />\n}\n\n/** Anchors the popover to this element instead of the trigger. Pass `render` to\n * wrap an existing element (was radix `asChild`). */\nfunction PopoverAnchor({ render, ...props }: useRender.ComponentProps<'div'>) {\n const context = React.useContext(PopoverAnchorContext)\n return useRender({\n defaultTagName: 'div',\n render,\n ref: context?.setAnchor,\n props: mergeProps<'div'>(\n { 'data-slot': 'popover-anchor' } as React.ComponentProps<'div'>,\n props,\n ),\n })\n}\n\ntype PopoverContentProps = React.ComponentProps<typeof PopoverPrimitive.Popup> &\n Pick<\n PopoverPrimitive.Positioner.Props,\n | 'align'\n | 'alignOffset'\n | 'side'\n | 'sideOffset'\n | 'anchor'\n | 'collisionAvoidance'\n > &\n Pick<PopoverPrimitive.Portal.Props, 'container'>\n\nfunction PopoverContent({\n className,\n align = 'center',\n sideOffset = 4,\n side,\n alignOffset,\n anchor,\n collisionAvoidance,\n container,\n ...props\n}: PopoverContentProps) {\n const context = React.useContext(PopoverAnchorContext)\n return (\n <PopoverPrimitive.Portal container={container}>\n <PopoverPrimitive.Positioner\n
|
|
1
|
+
{"version":3,"file":"popover.cjs","names":["React","PopoverPrimitive","PortalTheme"],"sources":["../../src/components/popover.tsx"],"sourcesContent":["import { mergeProps } from '@base-ui/react/merge-props'\nimport { Popover as PopoverPrimitive } from '@base-ui/react/popover'\nimport { useRender } from '@base-ui/react/use-render'\nimport * as React from 'react'\nimport { cn } from '../utils/cn'\nimport { PortalTheme } from './theme'\n\n// Base UI dropped the Anchor part; the anchor element registers itself here and\n// PopoverContent feeds it to the Positioner.\nconst PopoverAnchorContext = React.createContext<{\n anchor: HTMLElement | null\n setAnchor: (element: HTMLElement | null) => void\n} | null>(null)\n\nfunction Popover(props: React.ComponentProps<typeof PopoverPrimitive.Root>) {\n const [anchor, setAnchor] = React.useState<HTMLElement | null>(null)\n const value = React.useMemo(() => ({ anchor, setAnchor }), [anchor])\n return (\n <PopoverAnchorContext.Provider value={value}>\n <PopoverPrimitive.Root {...props} />\n </PopoverAnchorContext.Provider>\n )\n}\n\nfunction PopoverTrigger(\n props: React.ComponentProps<typeof PopoverPrimitive.Trigger>,\n) {\n return <PopoverPrimitive.Trigger data-slot=\"popover-trigger\" {...props} />\n}\n\n// A Close part inside the popup is also what enables Base UI's focus trap for modal popovers.\nfunction PopoverClose(\n props: React.ComponentProps<typeof PopoverPrimitive.Close>,\n) {\n return <PopoverPrimitive.Close data-slot=\"popover-close\" {...props} />\n}\n\n/** Anchors the popover to this element instead of the trigger. Pass `render` to\n * wrap an existing element (was radix `asChild`). */\nfunction PopoverAnchor({ render, ...props }: useRender.ComponentProps<'div'>) {\n const context = React.useContext(PopoverAnchorContext)\n return useRender({\n defaultTagName: 'div',\n render,\n ref: context?.setAnchor,\n props: mergeProps<'div'>(\n { 'data-slot': 'popover-anchor' } as React.ComponentProps<'div'>,\n props,\n ),\n })\n}\n\ntype PopoverContentProps = React.ComponentProps<typeof PopoverPrimitive.Popup> &\n Pick<\n PopoverPrimitive.Positioner.Props,\n | 'align'\n | 'alignOffset'\n | 'side'\n | 'sideOffset'\n | 'anchor'\n | 'collisionAvoidance'\n > &\n Pick<PopoverPrimitive.Portal.Props, 'container'>\n\nfunction PopoverContent({\n className,\n align = 'center',\n sideOffset = 4,\n side,\n alignOffset,\n anchor,\n collisionAvoidance,\n container,\n ...props\n}: PopoverContentProps) {\n const context = React.useContext(PopoverAnchorContext)\n return (\n <PopoverPrimitive.Portal container={container}>\n <PortalTheme>\n <PopoverPrimitive.Positioner\n align={align}\n alignOffset={alignOffset}\n anchor={anchor ?? context?.anchor ?? undefined}\n className=\"isolate z-50\"\n collisionAvoidance={collisionAvoidance}\n side={side}\n sideOffset={sideOffset}\n >\n <PopoverPrimitive.Popup\n data-slot=\"popover-content\"\n className={cn(\n 'z-50 w-72 origin-(--transform-origin) rounded-lg border border-gray-a1 bg-gray-1 p-4 text-gray-a12 shadow-md outline-hidden transition-[opacity,scale,translate] duration-100 motion-reduce:transition-none dark:bg-gray-3',\n // enter: fade + zoom + a slight per-side slide (was animate-in)\n 'data-starting-style:scale-95 data-starting-style:opacity-0',\n 'data-[side=bottom]:data-starting-style:-translate-y-2 data-[side=left]:data-starting-style:translate-x-2 data-[side=right]:data-starting-style:-translate-x-2 data-[side=top]:data-starting-style:translate-y-2',\n // exit: fade + zoom (was animate-out)\n 'data-ending-style:scale-95 data-ending-style:opacity-0',\n className,\n )}\n {...props}\n />\n </PopoverPrimitive.Positioner>\n </PortalTheme>\n </PopoverPrimitive.Portal>\n )\n}\n\nexport { Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverTrigger }\n"],"mappings":";;;;;;;;;;;;AASA,MAAM,uBAAuBA,MAAM,cAGzB,IAAI;AAEd,SAAS,QAAQ,OAA2D;CAC1E,MAAM,CAAC,QAAQ,aAAaA,MAAM,SAA6B,IAAI;CACnE,MAAM,QAAQA,MAAM,eAAe;EAAE;EAAQ;CAAU,IAAI,CAAC,MAAM,CAAC;CACnE,OACE,iBAAA,GAAA,kBAAA,KAAC,qBAAqB,UAAtB;EAAsC;YACpC,iBAAA,GAAA,kBAAA,KAACC,uBAAAA,QAAiB,MAAlB,EAAuB,GAAI,MAAQ,CAAA;CACN,CAAA;AAEnC;AAEA,SAAS,eACP,OACA;CACA,OAAO,iBAAA,GAAA,kBAAA,KAACA,uBAAAA,QAAiB,SAAlB;EAA0B,aAAU;EAAkB,GAAI;CAAQ,CAAA;AAC3E;AAGA,SAAS,aACP,OACA;CACA,OAAO,iBAAA,GAAA,kBAAA,KAACA,uBAAAA,QAAiB,OAAlB;EAAwB,aAAU;EAAgB,GAAI;CAAQ,CAAA;AACvE;;;AAIA,SAAS,cAAc,EAAE,QAAQ,GAAG,SAA0C;CAE5E,QAAA,GAAA,0BAAA,WAAiB;EACf,gBAAgB;EAChB;EACA,KAJcD,MAAM,WAAW,oBAIpB,GAAG;EACd,QAAA,GAAA,2BAAA,YACE,EAAE,aAAa,iBAAiB,GAChC,KACF;CACF,CAAC;AACH;AAcA,SAAS,eAAe,EACtB,WACA,QAAQ,UACR,aAAa,GACb,MACA,aACA,QACA,oBACA,WACA,GAAG,SACmB;CACtB,MAAM,UAAUA,MAAM,WAAW,oBAAoB;CACrD,OACE,iBAAA,GAAA,kBAAA,KAACC,uBAAAA,QAAiB,QAAlB;EAAoC;YAClC,iBAAA,GAAA,kBAAA,KAACC,yBAAAA,aAAD,EAAA,UACE,iBAAA,GAAA,kBAAA,KAACD,uBAAAA,QAAiB,YAAlB;GACS;GACM;GACb,QAAQ,UAAU,SAAS,UAAU,KAAA;GACrC,WAAU;GACU;GACd;GACM;aAEZ,iBAAA,GAAA,kBAAA,KAACA,uBAAAA,QAAiB,OAAlB;IACE,aAAU;IACV,YAAA,GAAA,GAAA,IACE,8NAEA,8DACA,mNAEA,0DACA,SACF;IACA,GAAI;GACL,CAAA;EAC0B,CAAA,EAClB,CAAA;CACU,CAAA;AAE7B"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn } from "../utils/cn.js";
|
|
3
|
+
import { PortalTheme } from "./theme.js";
|
|
3
4
|
import * as React$1 from "react";
|
|
4
5
|
import { jsx } from "react/jsx-runtime";
|
|
5
6
|
import { mergeProps } from "@base-ui/react/merge-props";
|
|
@@ -44,7 +45,7 @@ function PopoverContent({ className, align = "center", sideOffset = 4, side, ali
|
|
|
44
45
|
const context = React$1.useContext(PopoverAnchorContext);
|
|
45
46
|
return /* @__PURE__ */ jsx(Popover$1.Portal, {
|
|
46
47
|
container,
|
|
47
|
-
children: /* @__PURE__ */ jsx(Popover$1.Positioner, {
|
|
48
|
+
children: /* @__PURE__ */ jsx(PortalTheme, { children: /* @__PURE__ */ jsx(Popover$1.Positioner, {
|
|
48
49
|
align,
|
|
49
50
|
alignOffset,
|
|
50
51
|
anchor: anchor ?? context?.anchor ?? void 0,
|
|
@@ -57,7 +58,7 @@ function PopoverContent({ className, align = "center", sideOffset = 4, side, ali
|
|
|
57
58
|
className: cn("z-50 w-72 origin-(--transform-origin) rounded-lg border border-gray-a1 bg-gray-1 p-4 text-gray-a12 shadow-md outline-hidden transition-[opacity,scale,translate] duration-100 motion-reduce:transition-none dark:bg-gray-3", "data-starting-style:scale-95 data-starting-style:opacity-0", "data-[side=bottom]:data-starting-style:-translate-y-2 data-[side=left]:data-starting-style:translate-x-2 data-[side=right]:data-starting-style:-translate-x-2 data-[side=top]:data-starting-style:translate-y-2", "data-ending-style:scale-95 data-ending-style:opacity-0", className),
|
|
58
59
|
...props
|
|
59
60
|
})
|
|
60
|
-
})
|
|
61
|
+
}) })
|
|
61
62
|
});
|
|
62
63
|
}
|
|
63
64
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"popover.js","names":["React","PopoverPrimitive"],"sources":["../../src/components/popover.tsx"],"sourcesContent":["import { mergeProps } from '@base-ui/react/merge-props'\nimport { Popover as PopoverPrimitive } from '@base-ui/react/popover'\nimport { useRender } from '@base-ui/react/use-render'\nimport * as React from 'react'\nimport { cn } from '../utils/cn'\n\n// Base UI dropped the Anchor part; the anchor element registers itself here and\n// PopoverContent feeds it to the Positioner.\nconst PopoverAnchorContext = React.createContext<{\n anchor: HTMLElement | null\n setAnchor: (element: HTMLElement | null) => void\n} | null>(null)\n\nfunction Popover(props: React.ComponentProps<typeof PopoverPrimitive.Root>) {\n const [anchor, setAnchor] = React.useState<HTMLElement | null>(null)\n const value = React.useMemo(() => ({ anchor, setAnchor }), [anchor])\n return (\n <PopoverAnchorContext.Provider value={value}>\n <PopoverPrimitive.Root {...props} />\n </PopoverAnchorContext.Provider>\n )\n}\n\nfunction PopoverTrigger(\n props: React.ComponentProps<typeof PopoverPrimitive.Trigger>,\n) {\n return <PopoverPrimitive.Trigger data-slot=\"popover-trigger\" {...props} />\n}\n\n// A Close part inside the popup is also what enables Base UI's focus trap for modal popovers.\nfunction PopoverClose(\n props: React.ComponentProps<typeof PopoverPrimitive.Close>,\n) {\n return <PopoverPrimitive.Close data-slot=\"popover-close\" {...props} />\n}\n\n/** Anchors the popover to this element instead of the trigger. Pass `render` to\n * wrap an existing element (was radix `asChild`). */\nfunction PopoverAnchor({ render, ...props }: useRender.ComponentProps<'div'>) {\n const context = React.useContext(PopoverAnchorContext)\n return useRender({\n defaultTagName: 'div',\n render,\n ref: context?.setAnchor,\n props: mergeProps<'div'>(\n { 'data-slot': 'popover-anchor' } as React.ComponentProps<'div'>,\n props,\n ),\n })\n}\n\ntype PopoverContentProps = React.ComponentProps<typeof PopoverPrimitive.Popup> &\n Pick<\n PopoverPrimitive.Positioner.Props,\n | 'align'\n | 'alignOffset'\n | 'side'\n | 'sideOffset'\n | 'anchor'\n | 'collisionAvoidance'\n > &\n Pick<PopoverPrimitive.Portal.Props, 'container'>\n\nfunction PopoverContent({\n className,\n align = 'center',\n sideOffset = 4,\n side,\n alignOffset,\n anchor,\n collisionAvoidance,\n container,\n ...props\n}: PopoverContentProps) {\n const context = React.useContext(PopoverAnchorContext)\n return (\n <PopoverPrimitive.Portal container={container}>\n <PopoverPrimitive.Positioner\n
|
|
1
|
+
{"version":3,"file":"popover.js","names":["React","PopoverPrimitive"],"sources":["../../src/components/popover.tsx"],"sourcesContent":["import { mergeProps } from '@base-ui/react/merge-props'\nimport { Popover as PopoverPrimitive } from '@base-ui/react/popover'\nimport { useRender } from '@base-ui/react/use-render'\nimport * as React from 'react'\nimport { cn } from '../utils/cn'\nimport { PortalTheme } from './theme'\n\n// Base UI dropped the Anchor part; the anchor element registers itself here and\n// PopoverContent feeds it to the Positioner.\nconst PopoverAnchorContext = React.createContext<{\n anchor: HTMLElement | null\n setAnchor: (element: HTMLElement | null) => void\n} | null>(null)\n\nfunction Popover(props: React.ComponentProps<typeof PopoverPrimitive.Root>) {\n const [anchor, setAnchor] = React.useState<HTMLElement | null>(null)\n const value = React.useMemo(() => ({ anchor, setAnchor }), [anchor])\n return (\n <PopoverAnchorContext.Provider value={value}>\n <PopoverPrimitive.Root {...props} />\n </PopoverAnchorContext.Provider>\n )\n}\n\nfunction PopoverTrigger(\n props: React.ComponentProps<typeof PopoverPrimitive.Trigger>,\n) {\n return <PopoverPrimitive.Trigger data-slot=\"popover-trigger\" {...props} />\n}\n\n// A Close part inside the popup is also what enables Base UI's focus trap for modal popovers.\nfunction PopoverClose(\n props: React.ComponentProps<typeof PopoverPrimitive.Close>,\n) {\n return <PopoverPrimitive.Close data-slot=\"popover-close\" {...props} />\n}\n\n/** Anchors the popover to this element instead of the trigger. Pass `render` to\n * wrap an existing element (was radix `asChild`). */\nfunction PopoverAnchor({ render, ...props }: useRender.ComponentProps<'div'>) {\n const context = React.useContext(PopoverAnchorContext)\n return useRender({\n defaultTagName: 'div',\n render,\n ref: context?.setAnchor,\n props: mergeProps<'div'>(\n { 'data-slot': 'popover-anchor' } as React.ComponentProps<'div'>,\n props,\n ),\n })\n}\n\ntype PopoverContentProps = React.ComponentProps<typeof PopoverPrimitive.Popup> &\n Pick<\n PopoverPrimitive.Positioner.Props,\n | 'align'\n | 'alignOffset'\n | 'side'\n | 'sideOffset'\n | 'anchor'\n | 'collisionAvoidance'\n > &\n Pick<PopoverPrimitive.Portal.Props, 'container'>\n\nfunction PopoverContent({\n className,\n align = 'center',\n sideOffset = 4,\n side,\n alignOffset,\n anchor,\n collisionAvoidance,\n container,\n ...props\n}: PopoverContentProps) {\n const context = React.useContext(PopoverAnchorContext)\n return (\n <PopoverPrimitive.Portal container={container}>\n <PortalTheme>\n <PopoverPrimitive.Positioner\n align={align}\n alignOffset={alignOffset}\n anchor={anchor ?? context?.anchor ?? undefined}\n className=\"isolate z-50\"\n collisionAvoidance={collisionAvoidance}\n side={side}\n sideOffset={sideOffset}\n >\n <PopoverPrimitive.Popup\n data-slot=\"popover-content\"\n className={cn(\n 'z-50 w-72 origin-(--transform-origin) rounded-lg border border-gray-a1 bg-gray-1 p-4 text-gray-a12 shadow-md outline-hidden transition-[opacity,scale,translate] duration-100 motion-reduce:transition-none dark:bg-gray-3',\n // enter: fade + zoom + a slight per-side slide (was animate-in)\n 'data-starting-style:scale-95 data-starting-style:opacity-0',\n 'data-[side=bottom]:data-starting-style:-translate-y-2 data-[side=left]:data-starting-style:translate-x-2 data-[side=right]:data-starting-style:-translate-x-2 data-[side=top]:data-starting-style:translate-y-2',\n // exit: fade + zoom (was animate-out)\n 'data-ending-style:scale-95 data-ending-style:opacity-0',\n className,\n )}\n {...props}\n />\n </PopoverPrimitive.Positioner>\n </PortalTheme>\n </PopoverPrimitive.Portal>\n )\n}\n\nexport { Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverTrigger }\n"],"mappings":";;;;;;;;;AASA,MAAM,uBAAuBA,QAAM,cAGzB,IAAI;AAEd,SAAS,QAAQ,OAA2D;CAC1E,MAAM,CAAC,QAAQ,aAAaA,QAAM,SAA6B,IAAI;CACnE,MAAM,QAAQA,QAAM,eAAe;EAAE;EAAQ;CAAU,IAAI,CAAC,MAAM,CAAC;CACnE,OACE,oBAAC,qBAAqB,UAAtB;EAAsC;YACpC,oBAACC,UAAiB,MAAlB,EAAuB,GAAI,MAAQ,CAAA;CACN,CAAA;AAEnC;AAEA,SAAS,eACP,OACA;CACA,OAAO,oBAACA,UAAiB,SAAlB;EAA0B,aAAU;EAAkB,GAAI;CAAQ,CAAA;AAC3E;AAGA,SAAS,aACP,OACA;CACA,OAAO,oBAACA,UAAiB,OAAlB;EAAwB,aAAU;EAAgB,GAAI;CAAQ,CAAA;AACvE;;;AAIA,SAAS,cAAc,EAAE,QAAQ,GAAG,SAA0C;CAE5E,OAAO,UAAU;EACf,gBAAgB;EAChB;EACA,KAJcD,QAAM,WAAW,oBAIpB,GAAG;EACd,OAAO,WACL,EAAE,aAAa,iBAAiB,GAChC,KACF;CACF,CAAC;AACH;AAcA,SAAS,eAAe,EACtB,WACA,QAAQ,UACR,aAAa,GACb,MACA,aACA,QACA,oBACA,WACA,GAAG,SACmB;CACtB,MAAM,UAAUA,QAAM,WAAW,oBAAoB;CACrD,OACE,oBAACC,UAAiB,QAAlB;EAAoC;YAClC,oBAAC,aAAD,EAAA,UACE,oBAACA,UAAiB,YAAlB;GACS;GACM;GACb,QAAQ,UAAU,SAAS,UAAU,KAAA;GACrC,WAAU;GACU;GACd;GACM;aAEZ,oBAACA,UAAiB,OAAlB;IACE,aAAU;IACV,WAAW,GACT,8NAEA,8DACA,mNAEA,0DACA,SACF;IACA,GAAI;GACL,CAAA;EAC0B,CAAA,EAClB,CAAA;CACU,CAAA;AAE7B"}
|
package/dist/components/radio.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { accentByColor } from "../lib/accent-colors.js";
|
|
3
2
|
import { cn } from "../utils/cn.js";
|
|
3
|
+
import { accentByColor } from "../lib/accent-colors.js";
|
|
4
4
|
import "react";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
6
|
import { Radio as Radio$1 } from "@base-ui/react/radio";
|
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
4
|
const require_chunk = require("../chunk-DY84GLCh.cjs");
|
|
5
|
-
const
|
|
5
|
+
const require_components_theme = require("./theme.cjs");
|
|
6
6
|
const require_components_field = require("./field.cjs");
|
|
7
|
+
const require_lib_input_box_variants = require("../lib/input-box-variants.cjs");
|
|
7
8
|
let react = require("react");
|
|
8
9
|
react = require_chunk.__toESM(react);
|
|
9
10
|
let _epilot_spark_icons = require("@epilot/spark-icons");
|
|
@@ -79,7 +80,7 @@ function SelectClear({ className, children, onClick, ...props }) {
|
|
|
79
80
|
function SelectContent({ className, children, align = "start", alignOffset, side, sideOffset = 4, alignItemWithTrigger = false, container, ...props }) {
|
|
80
81
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_select.Select.Portal, {
|
|
81
82
|
container,
|
|
82
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_select.Select.Positioner, {
|
|
83
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_components_theme.PortalTheme, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_select.Select.Positioner, {
|
|
83
84
|
align,
|
|
84
85
|
alignItemWithTrigger,
|
|
85
86
|
alignOffset,
|
|
@@ -96,7 +97,7 @@ function SelectContent({ className, children, align = "start", alignOffset, side
|
|
|
96
97
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(SelectScrollDownButton, {})
|
|
97
98
|
]
|
|
98
99
|
})
|
|
99
|
-
})
|
|
100
|
+
}) })
|
|
100
101
|
});
|
|
101
102
|
}
|
|
102
103
|
function SelectLabel({ className, ...props }) {
|