@epilot/spark-ui 0.12.1 → 0.12.3
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/accordion.cjs +1 -1
- package/dist/components/accordion.js +1 -1
- package/dist/components/attachment.d.cts +1 -1
- package/dist/components/attachment.d.ts +1 -1
- package/dist/components/bubble.d.cts +1 -1
- package/dist/components/bubble.d.ts +1 -1
- package/dist/components/button.d.cts +1 -1
- package/dist/components/button.d.ts +1 -1
- package/dist/components/callout.cjs +9 -3
- package/dist/components/callout.cjs.map +1 -1
- package/dist/components/callout.d.cts +2 -2
- package/dist/components/callout.d.ts +2 -2
- package/dist/components/callout.js +9 -3
- package/dist/components/callout.js.map +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/marker.d.cts +1 -1
- package/dist/components/marker.d.ts +1 -1
- package/dist/components/message-scroller.cjs +28 -4
- package/dist/components/message-scroller.cjs.map +1 -1
- package/dist/components/message-scroller.d.cts +2 -1
- package/dist/components/message-scroller.d.ts +2 -1
- package/dist/components/message-scroller.js +29 -5
- package/dist/components/message-scroller.js.map +1 -1
- package/dist/components/page-header.d.cts +1 -1
- package/dist/components/page-header.d.ts +1 -1
- package/dist/components/select.cjs +1 -1
- package/dist/components/select.js +1 -1
- package/dist/components/textarea.cjs +1 -1
- package/dist/components/textarea.js +1 -1
- package/dist/icons/material-symbol.cjs +1 -0
- package/dist/icons/material-symbol.cjs.map +1 -1
- package/dist/icons/material-symbol.d.cts +1 -1
- package/dist/icons/material-symbol.d.ts +1 -1
- package/dist/icons/material-symbol.js +1 -0
- package/dist/icons/material-symbol.js.map +1 -1
- package/dist/lib/message-animations.cjs +35 -0
- package/dist/lib/message-animations.cjs.map +1 -0
- package/dist/lib/message-animations.d.cts +33 -0
- package/dist/lib/message-animations.d.ts +33 -0
- package/dist/lib/message-animations.js +34 -0
- package/dist/lib/message-animations.js.map +1 -0
- package/dist/styles/theme.css +9 -2
- package/package.json +3 -1
|
@@ -4,8 +4,8 @@ const require_chunk = require("../chunk-DY84GLCh.cjs");
|
|
|
4
4
|
const require_icons_material_symbol = require("../icons/material-symbol.cjs");
|
|
5
5
|
let react = require("react");
|
|
6
6
|
react = require_chunk.__toESM(react);
|
|
7
|
-
let react_jsx_runtime = require("react/jsx-runtime");
|
|
8
7
|
let _base_ui_react_accordion = require("@base-ui/react/accordion");
|
|
8
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
9
9
|
let cnfast = require("cnfast");
|
|
10
10
|
//#region src/components/accordion.tsx
|
|
11
11
|
function Accordion({ className, variant = "soft", ...props }) {
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import { cn } from "../utils/cn.js";
|
|
3
3
|
import { MaterialSymbol } from "../icons/material-symbol.js";
|
|
4
4
|
import "react";
|
|
5
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
5
|
import { Accordion as Accordion$1 } from "@base-ui/react/accordion";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
//#region src/components/accordion.tsx
|
|
8
8
|
function Accordion({ className, variant = "soft", ...props }) {
|
|
9
9
|
return /* @__PURE__ */ jsx(Accordion$1.Root, {
|
|
@@ -7,7 +7,7 @@ import { useRender } from "@base-ui/react/use-render";
|
|
|
7
7
|
|
|
8
8
|
//#region src/components/attachment.d.ts
|
|
9
9
|
declare const attachmentVariants: (props?: ({
|
|
10
|
-
size?: "
|
|
10
|
+
size?: "default" | "sm" | "xs" | null | undefined;
|
|
11
11
|
orientation?: "horizontal" | "vertical" | null | undefined;
|
|
12
12
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
13
13
|
declare function Attachment({
|
|
@@ -7,7 +7,7 @@ import { useRender } from "@base-ui/react/use-render";
|
|
|
7
7
|
|
|
8
8
|
//#region src/components/attachment.d.ts
|
|
9
9
|
declare const attachmentVariants: (props?: ({
|
|
10
|
-
size?: "
|
|
10
|
+
size?: "default" | "sm" | "xs" | null | undefined;
|
|
11
11
|
orientation?: "horizontal" | "vertical" | null | undefined;
|
|
12
12
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
13
13
|
declare function Attachment({
|
|
@@ -10,7 +10,7 @@ declare function BubbleGroup({
|
|
|
10
10
|
...props
|
|
11
11
|
}: React$1.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
12
12
|
declare const bubbleVariants: (props?: ({
|
|
13
|
-
variant?: "ghost" | "
|
|
13
|
+
variant?: "ghost" | "default" | "outline" | "secondary" | "muted" | "tinted" | "destructive" | null | undefined;
|
|
14
14
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
15
15
|
declare function Bubble({
|
|
16
16
|
variant,
|
|
@@ -10,7 +10,7 @@ declare function BubbleGroup({
|
|
|
10
10
|
...props
|
|
11
11
|
}: React$1.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
12
12
|
declare const bubbleVariants: (props?: ({
|
|
13
|
-
variant?: "ghost" | "
|
|
13
|
+
variant?: "ghost" | "default" | "outline" | "secondary" | "muted" | "tinted" | "destructive" | null | undefined;
|
|
14
14
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
15
15
|
declare function Bubble({
|
|
16
16
|
variant,
|
|
@@ -7,7 +7,7 @@ import { VariantProps } from "class-variance-authority";
|
|
|
7
7
|
|
|
8
8
|
//#region src/components/button.d.ts
|
|
9
9
|
declare const buttonVariants: (props?: ({
|
|
10
|
-
variant?: "
|
|
10
|
+
variant?: "bare" | "secondary" | "destructive" | "primary" | "tertiary" | null | undefined;
|
|
11
11
|
color?: "accent" | "neutral" | "danger" | null | undefined;
|
|
12
12
|
size?: "small" | "default" | "icon" | "medium" | "icon-small" | "icon-medium" | null | undefined;
|
|
13
13
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
@@ -7,7 +7,7 @@ import { VariantProps } from "class-variance-authority";
|
|
|
7
7
|
|
|
8
8
|
//#region src/components/button.d.ts
|
|
9
9
|
declare const buttonVariants: (props?: ({
|
|
10
|
-
variant?: "
|
|
10
|
+
variant?: "bare" | "secondary" | "destructive" | "primary" | "tertiary" | null | undefined;
|
|
11
11
|
color?: "accent" | "neutral" | "danger" | null | undefined;
|
|
12
12
|
size?: "small" | "default" | "icon" | "medium" | "icon-small" | "icon-medium" | null | undefined;
|
|
13
13
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
@@ -9,12 +9,13 @@ let react_jsx_runtime = require("react/jsx-runtime");
|
|
|
9
9
|
let class_variance_authority = require("class-variance-authority");
|
|
10
10
|
let cnfast = require("cnfast");
|
|
11
11
|
//#region src/components/callout.tsx
|
|
12
|
-
const calloutVariants = (0, class_variance_authority.cva)("group/callout flex w-full items-start gap-2 rounded-lg px-4 py-3 text-sm transition-
|
|
12
|
+
const calloutVariants = (0, class_variance_authority.cva)("group/callout flex w-full items-start gap-2 rounded-lg px-4 py-3 text-sm transition-colors duration-150 ease-out motion-reduce:transition-none", {
|
|
13
13
|
variants: { variant: {
|
|
14
14
|
error: "bg-base-error-soft text-error",
|
|
15
15
|
success: "bg-base-success-soft text-success",
|
|
16
16
|
warning: "bg-base-warning-soft text-warning",
|
|
17
|
-
info: "bg-base-info-soft text-info"
|
|
17
|
+
info: "bg-base-info-soft text-info",
|
|
18
|
+
neutral: "bg-base-gray-soft text-gray"
|
|
18
19
|
} },
|
|
19
20
|
defaultVariants: { variant: "info" }
|
|
20
21
|
});
|
|
@@ -34,6 +35,10 @@ const CALLOUT_ICONS = {
|
|
|
34
35
|
info: {
|
|
35
36
|
name: "info",
|
|
36
37
|
className: "text-info-light"
|
|
38
|
+
},
|
|
39
|
+
neutral: {
|
|
40
|
+
name: "info",
|
|
41
|
+
className: "text-gray-light"
|
|
37
42
|
}
|
|
38
43
|
};
|
|
39
44
|
const CalloutTitle = ({ className, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
@@ -51,7 +56,8 @@ const CALLOUT_ACTION_COLORS = {
|
|
|
51
56
|
error: "bg-base-error-soft text-error hover:bg-red-a4 focus-visible:bg-red-a4",
|
|
52
57
|
success: "bg-base-success-soft text-success hover:bg-green-a4 focus-visible:bg-green-a4",
|
|
53
58
|
warning: "bg-base-warning-soft text-warning hover:bg-orange-a4 focus-visible:bg-orange-a4",
|
|
54
|
-
info: "bg-base-info-soft text-info hover:bg-blue-a4 focus-visible:bg-blue-a4"
|
|
59
|
+
info: "bg-base-info-soft text-info hover:bg-blue-a4 focus-visible:bg-blue-a4",
|
|
60
|
+
neutral: "bg-base-gray-soft text-gray hover:bg-gray-a4 focus-visible:bg-gray-a4"
|
|
55
61
|
};
|
|
56
62
|
const CalloutAction = ({ className, align = "start", ...props }) => {
|
|
57
63
|
const calloutVariant = react.useContext(CalloutVariantContext);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"callout.cjs","names":["React","Button","MaterialSymbol"],"sources":["../../src/components/callout.tsx"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority'\nimport * as React from 'react'\nimport {\n MaterialSymbol,\n type MaterialSymbolIconName,\n} from '../icons/material-symbol'\nimport { cn } from '../utils/cn'\nimport { Button, type ButtonProps } from './button'\n\ntype CalloutVariant = 'error' | 'info' | 'success' | 'warning'\n\nconst calloutVariants = cva(\n 'group/callout flex w-full items-start gap-2 rounded-lg px-4 py-3 text-sm transition-
|
|
1
|
+
{"version":3,"file":"callout.cjs","names":["React","Button","MaterialSymbol"],"sources":["../../src/components/callout.tsx"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority'\nimport * as React from 'react'\nimport {\n MaterialSymbol,\n type MaterialSymbolIconName,\n} from '../icons/material-symbol'\nimport { cn } from '../utils/cn'\nimport { Button, type ButtonProps } from './button'\n\ntype CalloutVariant = 'error' | 'info' | 'neutral' | 'success' | 'warning'\n\nconst calloutVariants = cva(\n 'group/callout flex w-full items-start gap-2 rounded-lg px-4 py-3 text-sm transition-colors duration-150 ease-out motion-reduce:transition-none',\n {\n variants: {\n variant: {\n error: 'bg-base-error-soft text-error',\n success: 'bg-base-success-soft text-success',\n warning: 'bg-base-warning-soft text-warning',\n info: 'bg-base-info-soft text-info',\n neutral: 'bg-base-gray-soft text-gray',\n },\n },\n defaultVariants: {\n variant: 'info',\n },\n },\n)\n\nconst CALLOUT_ICONS: Record<\n CalloutVariant,\n { name: MaterialSymbolIconName; className: string }\n> = {\n error: { name: 'cancel', className: 'text-error-light' },\n success: { name: 'check_circle', className: 'text-success-light' },\n warning: { name: 'warning', className: 'text-warning-light' },\n info: { name: 'info', className: 'text-info-light' },\n // no severity to signal, so it borrows info's glyph — pass `icon` to change it\n // or `icon={false}` for a bare panel.\n neutral: { name: 'info', className: 'text-gray-light' },\n}\n\ninterface CalloutProps\n extends\n React.HTMLAttributes<HTMLDivElement>,\n VariantProps<typeof calloutVariants> {\n /** Overrides the variant's default icon; the variant's color is kept. `false` renders no icon. */\n icon?: MaterialSymbolIconName | false\n}\n\nconst CalloutTitle = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLSpanElement>) => (\n <span\n data-slot=\"callout-title\"\n className={cn('text-base leading-5 font-semibold', className)}\n {...props}\n />\n)\n\nconst CalloutDescription = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLParagraphElement>) => (\n <p\n data-slot=\"callout-description\"\n className={cn('text-sm', className)}\n {...props}\n />\n)\n\nconst CalloutVariantContext = React.createContext<CalloutVariant>('info')\n\nconst CALLOUT_ACTION_COLORS: Record<CalloutVariant, string> = {\n error:\n 'bg-base-error-soft text-error hover:bg-red-a4 focus-visible:bg-red-a4',\n success:\n 'bg-base-success-soft text-success hover:bg-green-a4 focus-visible:bg-green-a4',\n warning:\n 'bg-base-warning-soft text-warning hover:bg-orange-a4 focus-visible:bg-orange-a4',\n info: 'bg-base-info-soft text-info hover:bg-blue-a4 focus-visible:bg-blue-a4',\n neutral:\n 'bg-base-gray-soft text-gray hover:bg-gray-a4 focus-visible:bg-gray-a4',\n}\n\ntype CalloutActionType = Omit<ButtonProps, 'styleVariant' | 'color'> & {\n align?: 'start' | 'end'\n}\n\nconst CalloutAction = ({\n className,\n align = 'start',\n ...props\n}: CalloutActionType) => {\n const calloutVariant = React.useContext(CalloutVariantContext)\n\n return (\n <Button\n data-slot=\"callout-action\"\n size=\"small\"\n styleVariant=\"surface\"\n color=\"neutral\"\n className={cn(\n 'mt-2 w-fit',\n { 'self-start': align === 'start', 'self-end': align === 'end' },\n CALLOUT_ACTION_COLORS[calloutVariant],\n className,\n )}\n {...props}\n />\n )\n}\n\nconst Callout = ({\n variant = 'info',\n icon,\n className,\n children,\n ...props\n}: CalloutProps) => {\n const variantIcon = CALLOUT_ICONS[variant ?? 'info']\n\n return (\n <CalloutVariantContext.Provider value={variant ?? 'info'}>\n <div\n data-slot=\"callout\"\n className={cn(calloutVariants({ variant }), className)}\n {...props}\n >\n {icon !== false && (\n <MaterialSymbol\n className={cn(\n 'inline-flex shrink-0 items-center [--spark-icon-size:calc(20px*var(--spark-scaling,1))]',\n variantIcon?.className,\n )}\n name={icon ?? variantIcon.name}\n />\n )}\n <div className=\"flex w-full min-w-0 flex-col gap-1\">{children}</div>\n </div>\n </CalloutVariantContext.Provider>\n )\n}\n\nexport {\n Callout,\n CalloutAction,\n CalloutDescription,\n CalloutTitle,\n calloutVariants,\n}\nexport type { CalloutProps, CalloutVariant }\n"],"mappings":";;;;;;;;;;;AAWA,MAAM,mBAAA,GAAA,yBAAA,KACJ,kJACA;CACE,UAAU,EACR,SAAS;EACP,OAAO;EACP,SAAS;EACT,SAAS;EACT,MAAM;EACN,SAAS;CACX,EACF;CACA,iBAAiB,EACf,SAAS,OACX;AACF,CACF;AAEA,MAAM,gBAGF;CACF,OAAO;EAAE,MAAM;EAAU,WAAW;CAAmB;CACvD,SAAS;EAAE,MAAM;EAAgB,WAAW;CAAqB;CACjE,SAAS;EAAE,MAAM;EAAW,WAAW;CAAqB;CAC5D,MAAM;EAAE,MAAM;EAAQ,WAAW;CAAkB;CAGnD,SAAS;EAAE,MAAM;EAAQ,WAAW;CAAkB;AACxD;AAUA,MAAM,gBAAgB,EACpB,WACA,GAAG,YAEH,iBAAA,GAAA,kBAAA,KAAC,QAAD;CACE,aAAU;CACV,YAAA,GAAA,OAAA,IAAc,qCAAqC,SAAS;CAC5D,GAAI;AACL,CAAA;AAGH,MAAM,sBAAsB,EAC1B,WACA,GAAG,YAEH,iBAAA,GAAA,kBAAA,KAAC,KAAD;CACE,aAAU;CACV,YAAA,GAAA,OAAA,IAAc,WAAW,SAAS;CAClC,GAAI;AACL,CAAA;AAGH,MAAM,wBAAwBA,MAAM,cAA8B,MAAM;AAExE,MAAM,wBAAwD;CAC5D,OACE;CACF,SACE;CACF,SACE;CACF,MAAM;CACN,SACE;AACJ;AAMA,MAAM,iBAAiB,EACrB,WACA,QAAQ,SACR,GAAG,YACoB;CACvB,MAAM,iBAAiBA,MAAM,WAAW,qBAAqB;CAE7D,OACE,iBAAA,GAAA,kBAAA,KAACC,0BAAAA,QAAD;EACE,aAAU;EACV,MAAK;EACL,cAAa;EACb,OAAM;EACN,YAAA,GAAA,OAAA,IACE,cACA;GAAE,cAAc,UAAU;GAAS,YAAY,UAAU;EAAM,GAC/D,sBAAsB,iBACtB,SACF;EACA,GAAI;CACL,CAAA;AAEL;AAEA,MAAM,WAAW,EACf,UAAU,QACV,MACA,WACA,UACA,GAAG,YACe;CAClB,MAAM,cAAc,cAAc,WAAW;CAE7C,OACE,iBAAA,GAAA,kBAAA,KAAC,sBAAsB,UAAvB;EAAgC,OAAO,WAAW;YAChD,iBAAA,GAAA,kBAAA,MAAC,OAAD;GACE,aAAU;GACV,YAAA,GAAA,OAAA,IAAc,gBAAgB,EAAE,QAAQ,CAAC,GAAG,SAAS;GACrD,GAAI;aAHN,CAKG,SAAS,SACR,iBAAA,GAAA,kBAAA,KAACC,8BAAAA,gBAAD;IACE,YAAA,GAAA,OAAA,IACE,2FACA,aAAa,SACf;IACA,MAAM,QAAQ,YAAY;GAC3B,CAAA,GAEH,iBAAA,GAAA,kBAAA,KAAC,OAAD;IAAK,WAAU;IAAsC;GAAc,CAAA,CAChE;;CACyB,CAAA;AAEpC"}
|
|
@@ -6,9 +6,9 @@ import * as React$1 from "react";
|
|
|
6
6
|
import { VariantProps } from "class-variance-authority";
|
|
7
7
|
|
|
8
8
|
//#region src/components/callout.d.ts
|
|
9
|
-
type CalloutVariant = 'error' | 'info' | 'success' | 'warning';
|
|
9
|
+
type CalloutVariant = 'error' | 'info' | 'neutral' | 'success' | 'warning';
|
|
10
10
|
declare const calloutVariants: (props?: ({
|
|
11
|
-
variant?: "success" | "warning" | "
|
|
11
|
+
variant?: "neutral" | "success" | "warning" | "info" | "error" | null | undefined;
|
|
12
12
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
13
13
|
interface CalloutProps extends React$1.HTMLAttributes<HTMLDivElement>, VariantProps<typeof calloutVariants> {
|
|
14
14
|
/** Overrides the variant's default icon; the variant's color is kept. `false` renders no icon. */
|
|
@@ -6,9 +6,9 @@ import * as React$1 from "react";
|
|
|
6
6
|
import { VariantProps } from "class-variance-authority";
|
|
7
7
|
|
|
8
8
|
//#region src/components/callout.d.ts
|
|
9
|
-
type CalloutVariant = 'error' | 'info' | 'success' | 'warning';
|
|
9
|
+
type CalloutVariant = 'error' | 'info' | 'neutral' | 'success' | 'warning';
|
|
10
10
|
declare const calloutVariants: (props?: ({
|
|
11
|
-
variant?: "success" | "warning" | "
|
|
11
|
+
variant?: "neutral" | "success" | "warning" | "info" | "error" | null | undefined;
|
|
12
12
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
13
13
|
interface CalloutProps extends React$1.HTMLAttributes<HTMLDivElement>, VariantProps<typeof calloutVariants> {
|
|
14
14
|
/** Overrides the variant's default icon; the variant's color is kept. `false` renders no icon. */
|
|
@@ -6,12 +6,13 @@ import * as React$1 from "react";
|
|
|
6
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
import { cva } from "class-variance-authority";
|
|
8
8
|
//#region src/components/callout.tsx
|
|
9
|
-
const calloutVariants = cva("group/callout flex w-full items-start gap-2 rounded-lg px-4 py-3 text-sm transition-
|
|
9
|
+
const calloutVariants = cva("group/callout flex w-full items-start gap-2 rounded-lg px-4 py-3 text-sm transition-colors duration-150 ease-out motion-reduce:transition-none", {
|
|
10
10
|
variants: { variant: {
|
|
11
11
|
error: "bg-base-error-soft text-error",
|
|
12
12
|
success: "bg-base-success-soft text-success",
|
|
13
13
|
warning: "bg-base-warning-soft text-warning",
|
|
14
|
-
info: "bg-base-info-soft text-info"
|
|
14
|
+
info: "bg-base-info-soft text-info",
|
|
15
|
+
neutral: "bg-base-gray-soft text-gray"
|
|
15
16
|
} },
|
|
16
17
|
defaultVariants: { variant: "info" }
|
|
17
18
|
});
|
|
@@ -31,6 +32,10 @@ const CALLOUT_ICONS = {
|
|
|
31
32
|
info: {
|
|
32
33
|
name: "info",
|
|
33
34
|
className: "text-info-light"
|
|
35
|
+
},
|
|
36
|
+
neutral: {
|
|
37
|
+
name: "info",
|
|
38
|
+
className: "text-gray-light"
|
|
34
39
|
}
|
|
35
40
|
};
|
|
36
41
|
const CalloutTitle = ({ className, ...props }) => /* @__PURE__ */ jsx("span", {
|
|
@@ -48,7 +53,8 @@ const CALLOUT_ACTION_COLORS = {
|
|
|
48
53
|
error: "bg-base-error-soft text-error hover:bg-red-a4 focus-visible:bg-red-a4",
|
|
49
54
|
success: "bg-base-success-soft text-success hover:bg-green-a4 focus-visible:bg-green-a4",
|
|
50
55
|
warning: "bg-base-warning-soft text-warning hover:bg-orange-a4 focus-visible:bg-orange-a4",
|
|
51
|
-
info: "bg-base-info-soft text-info hover:bg-blue-a4 focus-visible:bg-blue-a4"
|
|
56
|
+
info: "bg-base-info-soft text-info hover:bg-blue-a4 focus-visible:bg-blue-a4",
|
|
57
|
+
neutral: "bg-base-gray-soft text-gray hover:bg-gray-a4 focus-visible:bg-gray-a4"
|
|
52
58
|
};
|
|
53
59
|
const CalloutAction = ({ className, align = "start", ...props }) => {
|
|
54
60
|
const calloutVariant = React$1.useContext(CalloutVariantContext);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"callout.js","names":["React"],"sources":["../../src/components/callout.tsx"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority'\nimport * as React from 'react'\nimport {\n MaterialSymbol,\n type MaterialSymbolIconName,\n} from '../icons/material-symbol'\nimport { cn } from '../utils/cn'\nimport { Button, type ButtonProps } from './button'\n\ntype CalloutVariant = 'error' | 'info' | 'success' | 'warning'\n\nconst calloutVariants = cva(\n 'group/callout flex w-full items-start gap-2 rounded-lg px-4 py-3 text-sm transition-
|
|
1
|
+
{"version":3,"file":"callout.js","names":["React"],"sources":["../../src/components/callout.tsx"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority'\nimport * as React from 'react'\nimport {\n MaterialSymbol,\n type MaterialSymbolIconName,\n} from '../icons/material-symbol'\nimport { cn } from '../utils/cn'\nimport { Button, type ButtonProps } from './button'\n\ntype CalloutVariant = 'error' | 'info' | 'neutral' | 'success' | 'warning'\n\nconst calloutVariants = cva(\n 'group/callout flex w-full items-start gap-2 rounded-lg px-4 py-3 text-sm transition-colors duration-150 ease-out motion-reduce:transition-none',\n {\n variants: {\n variant: {\n error: 'bg-base-error-soft text-error',\n success: 'bg-base-success-soft text-success',\n warning: 'bg-base-warning-soft text-warning',\n info: 'bg-base-info-soft text-info',\n neutral: 'bg-base-gray-soft text-gray',\n },\n },\n defaultVariants: {\n variant: 'info',\n },\n },\n)\n\nconst CALLOUT_ICONS: Record<\n CalloutVariant,\n { name: MaterialSymbolIconName; className: string }\n> = {\n error: { name: 'cancel', className: 'text-error-light' },\n success: { name: 'check_circle', className: 'text-success-light' },\n warning: { name: 'warning', className: 'text-warning-light' },\n info: { name: 'info', className: 'text-info-light' },\n // no severity to signal, so it borrows info's glyph — pass `icon` to change it\n // or `icon={false}` for a bare panel.\n neutral: { name: 'info', className: 'text-gray-light' },\n}\n\ninterface CalloutProps\n extends\n React.HTMLAttributes<HTMLDivElement>,\n VariantProps<typeof calloutVariants> {\n /** Overrides the variant's default icon; the variant's color is kept. `false` renders no icon. */\n icon?: MaterialSymbolIconName | false\n}\n\nconst CalloutTitle = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLSpanElement>) => (\n <span\n data-slot=\"callout-title\"\n className={cn('text-base leading-5 font-semibold', className)}\n {...props}\n />\n)\n\nconst CalloutDescription = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLParagraphElement>) => (\n <p\n data-slot=\"callout-description\"\n className={cn('text-sm', className)}\n {...props}\n />\n)\n\nconst CalloutVariantContext = React.createContext<CalloutVariant>('info')\n\nconst CALLOUT_ACTION_COLORS: Record<CalloutVariant, string> = {\n error:\n 'bg-base-error-soft text-error hover:bg-red-a4 focus-visible:bg-red-a4',\n success:\n 'bg-base-success-soft text-success hover:bg-green-a4 focus-visible:bg-green-a4',\n warning:\n 'bg-base-warning-soft text-warning hover:bg-orange-a4 focus-visible:bg-orange-a4',\n info: 'bg-base-info-soft text-info hover:bg-blue-a4 focus-visible:bg-blue-a4',\n neutral:\n 'bg-base-gray-soft text-gray hover:bg-gray-a4 focus-visible:bg-gray-a4',\n}\n\ntype CalloutActionType = Omit<ButtonProps, 'styleVariant' | 'color'> & {\n align?: 'start' | 'end'\n}\n\nconst CalloutAction = ({\n className,\n align = 'start',\n ...props\n}: CalloutActionType) => {\n const calloutVariant = React.useContext(CalloutVariantContext)\n\n return (\n <Button\n data-slot=\"callout-action\"\n size=\"small\"\n styleVariant=\"surface\"\n color=\"neutral\"\n className={cn(\n 'mt-2 w-fit',\n { 'self-start': align === 'start', 'self-end': align === 'end' },\n CALLOUT_ACTION_COLORS[calloutVariant],\n className,\n )}\n {...props}\n />\n )\n}\n\nconst Callout = ({\n variant = 'info',\n icon,\n className,\n children,\n ...props\n}: CalloutProps) => {\n const variantIcon = CALLOUT_ICONS[variant ?? 'info']\n\n return (\n <CalloutVariantContext.Provider value={variant ?? 'info'}>\n <div\n data-slot=\"callout\"\n className={cn(calloutVariants({ variant }), className)}\n {...props}\n >\n {icon !== false && (\n <MaterialSymbol\n className={cn(\n 'inline-flex shrink-0 items-center [--spark-icon-size:calc(20px*var(--spark-scaling,1))]',\n variantIcon?.className,\n )}\n name={icon ?? variantIcon.name}\n />\n )}\n <div className=\"flex w-full min-w-0 flex-col gap-1\">{children}</div>\n </div>\n </CalloutVariantContext.Provider>\n )\n}\n\nexport {\n Callout,\n CalloutAction,\n CalloutDescription,\n CalloutTitle,\n calloutVariants,\n}\nexport type { CalloutProps, CalloutVariant }\n"],"mappings":";;;;;;;;AAWA,MAAM,kBAAkB,IACtB,kJACA;CACE,UAAU,EACR,SAAS;EACP,OAAO;EACP,SAAS;EACT,SAAS;EACT,MAAM;EACN,SAAS;CACX,EACF;CACA,iBAAiB,EACf,SAAS,OACX;AACF,CACF;AAEA,MAAM,gBAGF;CACF,OAAO;EAAE,MAAM;EAAU,WAAW;CAAmB;CACvD,SAAS;EAAE,MAAM;EAAgB,WAAW;CAAqB;CACjE,SAAS;EAAE,MAAM;EAAW,WAAW;CAAqB;CAC5D,MAAM;EAAE,MAAM;EAAQ,WAAW;CAAkB;CAGnD,SAAS;EAAE,MAAM;EAAQ,WAAW;CAAkB;AACxD;AAUA,MAAM,gBAAgB,EACpB,WACA,GAAG,YAEH,oBAAC,QAAD;CACE,aAAU;CACV,WAAW,GAAG,qCAAqC,SAAS;CAC5D,GAAI;AACL,CAAA;AAGH,MAAM,sBAAsB,EAC1B,WACA,GAAG,YAEH,oBAAC,KAAD;CACE,aAAU;CACV,WAAW,GAAG,WAAW,SAAS;CAClC,GAAI;AACL,CAAA;AAGH,MAAM,wBAAwBA,QAAM,cAA8B,MAAM;AAExE,MAAM,wBAAwD;CAC5D,OACE;CACF,SACE;CACF,SACE;CACF,MAAM;CACN,SACE;AACJ;AAMA,MAAM,iBAAiB,EACrB,WACA,QAAQ,SACR,GAAG,YACoB;CACvB,MAAM,iBAAiBA,QAAM,WAAW,qBAAqB;CAE7D,OACE,oBAAC,QAAD;EACE,aAAU;EACV,MAAK;EACL,cAAa;EACb,OAAM;EACN,WAAW,GACT,cACA;GAAE,cAAc,UAAU;GAAS,YAAY,UAAU;EAAM,GAC/D,sBAAsB,iBACtB,SACF;EACA,GAAI;CACL,CAAA;AAEL;AAEA,MAAM,WAAW,EACf,UAAU,QACV,MACA,WACA,UACA,GAAG,YACe;CAClB,MAAM,cAAc,cAAc,WAAW;CAE7C,OACE,oBAAC,sBAAsB,UAAvB;EAAgC,OAAO,WAAW;YAChD,qBAAC,OAAD;GACE,aAAU;GACV,WAAW,GAAG,gBAAgB,EAAE,QAAQ,CAAC,GAAG,SAAS;GACrD,GAAI;aAHN,CAKG,SAAS,SACR,oBAAC,gBAAD;IACE,WAAW,GACT,2FACA,aAAa,SACf;IACA,MAAM,QAAQ,YAAY;GAC3B,CAAA,GAEH,oBAAC,OAAD;IAAK,WAAU;IAAsC;GAAc,CAAA,CAChE;;CACyB,CAAA;AAEpC"}
|
|
@@ -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";
|
|
@@ -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?: "default" | "separator" | "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?: "default" | "separator" | "border" | null | undefined;
|
|
10
10
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
11
11
|
declare function Marker({
|
|
12
12
|
className,
|
|
@@ -1,16 +1,33 @@
|
|
|
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_hooks_use_reduced_motion = require("../hooks/use-reduced-motion.cjs");
|
|
4
5
|
const require_icons_material_symbol = require("../icons/material-symbol.cjs");
|
|
5
6
|
const require_components_button = require("./button.cjs");
|
|
7
|
+
const require_lib_message_animations = require("../lib/message-animations.cjs");
|
|
6
8
|
let react = require("react");
|
|
7
9
|
react = require_chunk.__toESM(react);
|
|
8
10
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
9
11
|
let _shadcn_react_message_scroller = require("@shadcn/react/message-scroller");
|
|
12
|
+
let motion_react = require("motion/react");
|
|
13
|
+
let motion_react_m = require("motion/react-m");
|
|
10
14
|
let cnfast = require("cnfast");
|
|
11
15
|
//#region src/components/message-scroller.tsx
|
|
16
|
+
const MessageScrollerAnimationReadyContext = react.createContext(false);
|
|
17
|
+
const MotionMessageScrollerPrimitiveItem = (0, motion_react_m.create)(_shadcn_react_message_scroller.MessageScroller.Item);
|
|
12
18
|
function MessageScrollerProvider(props) {
|
|
13
|
-
|
|
19
|
+
const [ready, setReady] = react.useState(false);
|
|
20
|
+
react.useEffect(() => {
|
|
21
|
+
setReady(true);
|
|
22
|
+
}, []);
|
|
23
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(motion_react.LazyMotion, {
|
|
24
|
+
features: motion_react.domAnimation,
|
|
25
|
+
strict: true,
|
|
26
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(MessageScrollerAnimationReadyContext.Provider, {
|
|
27
|
+
value: ready,
|
|
28
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_shadcn_react_message_scroller.MessageScroller.Provider, { ...props })
|
|
29
|
+
})
|
|
30
|
+
});
|
|
14
31
|
}
|
|
15
32
|
function MessageScroller({ className, ...props }) {
|
|
16
33
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_shadcn_react_message_scroller.MessageScroller.Root, {
|
|
@@ -22,7 +39,7 @@ function MessageScroller({ className, ...props }) {
|
|
|
22
39
|
function MessageScrollerViewport({ className, ...props }) {
|
|
23
40
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_shadcn_react_message_scroller.MessageScroller.Viewport, {
|
|
24
41
|
"data-slot": "message-scroller-viewport",
|
|
25
|
-
className: (0, cnfast.cn)("size-full min-h-0 min-w-0 scroll-fade-b overflow-y-auto overscroll-contain contain-content [scrollbar-gutter:stable] [scrollbar-width:thin] data-autoscrolling:no-scrollbar", className),
|
|
42
|
+
className: (0, cnfast.cn)("size-full min-h-0 min-w-0 scroll-fade-b overflow-y-auto overscroll-contain contain-content [scrollbar-gutter:stable] [scrollbar-width:thin] focus-visible:ring-2 focus-visible:ring-spark-11 focus-visible:ring-offset-2 focus-visible:outline-hidden data-autoscrolling:no-scrollbar", className),
|
|
26
43
|
...props
|
|
27
44
|
});
|
|
28
45
|
}
|
|
@@ -34,11 +51,18 @@ function MessageScrollerContent({ className, ...props }) {
|
|
|
34
51
|
});
|
|
35
52
|
}
|
|
36
53
|
function MessageScrollerItem({ className, scrollAnchor = false, ...props }) {
|
|
37
|
-
|
|
54
|
+
const ready = react.useContext(MessageScrollerAnimationReadyContext);
|
|
55
|
+
const shouldReduceMotion = require_hooks_use_reduced_motion.useReducedMotion();
|
|
56
|
+
const skipEntrance = !ready || shouldReduceMotion;
|
|
57
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(MotionMessageScrollerPrimitiveItem, {
|
|
58
|
+
...props,
|
|
38
59
|
"data-slot": "message-scroller-item",
|
|
39
60
|
scrollAnchor,
|
|
40
61
|
className: (0, cnfast.cn)("min-w-0 shrink-0 [contain-intrinsic-size:auto_10rem] [content-visibility:auto]", className),
|
|
41
|
-
|
|
62
|
+
variants: require_lib_message_animations.MESSAGE_ANIMATIONS["slide-up"].variants,
|
|
63
|
+
initial: skipEntrance ? false : "initial",
|
|
64
|
+
animate: "animate",
|
|
65
|
+
exit: skipEntrance ? void 0 : "exit"
|
|
42
66
|
});
|
|
43
67
|
}
|
|
44
68
|
function MessageScrollerButton({ direction = "end", className, children, render, styleVariant = "surface", color = "neutral", size = "icon-small", ...props }) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"message-scroller.cjs","names":["MessageScrollerPrimitive","Button","MaterialSymbol"],"sources":["../../src/components/message-scroller.tsx"],"sourcesContent":["import {\n MessageScroller as MessageScrollerPrimitive,\n useMessageScroller,\n useMessageScrollerScrollable,\n useMessageScrollerVisibility,\n} from '@shadcn/react/message-scroller'\nimport * as React from 'react'\nimport { MaterialSymbol } from '../icons/material-symbol'\nimport { cn } from '../utils/cn'\nimport { Button, type ButtonProps } from './button'\n\nfunction MessageScrollerProvider(\n props: React.ComponentProps<typeof MessageScrollerPrimitive.Provider>,\n) {\n return <MessageScrollerPrimitive.Provider {...props} />\n}\n\nfunction MessageScroller({\n className,\n ...props\n}: React.ComponentProps<typeof MessageScrollerPrimitive.Root>) {\n return (\n <MessageScrollerPrimitive.Root\n data-slot=\"message-scroller\"\n className={cn(\n 'group/message-scroller relative flex size-full min-h-0 flex-col overflow-hidden',\n className,\n )}\n {...props}\n />\n )\n}\n\nfunction MessageScrollerViewport({\n className,\n ...props\n}: React.ComponentProps<typeof MessageScrollerPrimitive.Viewport>) {\n return (\n <MessageScrollerPrimitive.Viewport\n data-slot=\"message-scroller-viewport\"\n // scroll-fade-b is a spark-adopted shadcn utility; scrollbar-width/gutter\n // are arbitrary props (spark ships no scrollbar-* utilities) and the native\n // bar collapses to no-scrollbar (spark util) while autoscrolling.\n className={cn(\n 'size-full min-h-0 min-w-0 scroll-fade-b overflow-y-auto overscroll-contain contain-content [scrollbar-gutter:stable] [scrollbar-width:thin] data-autoscrolling:no-scrollbar',\n className,\n )}\n {...props}\n />\n )\n}\n\nfunction MessageScrollerContent({\n className,\n ...props\n}: React.ComponentProps<typeof MessageScrollerPrimitive.Content>) {\n return (\n <MessageScrollerPrimitive.Content\n data-slot=\"message-scroller-content\"\n className={cn('flex h-max min-h-full flex-col gap-8', className)}\n {...props}\n />\n )\n}\n\nfunction MessageScrollerItem({\n className,\n scrollAnchor = false,\n ...props\n}: React.
|
|
1
|
+
{"version":3,"file":"message-scroller.cjs","names":["React","MessageScrollerPrimitive","LazyMotion","domAnimation","useReducedMotion","MESSAGE_ANIMATIONS","Button","MaterialSymbol"],"sources":["../../src/components/message-scroller.tsx"],"sourcesContent":["import {\n MessageScroller as MessageScrollerPrimitive,\n useMessageScroller,\n useMessageScrollerScrollable,\n useMessageScrollerVisibility,\n} from '@shadcn/react/message-scroller'\nimport { LazyMotion, domAnimation } from 'motion/react'\nimport { create } from 'motion/react-m'\nimport * as React from 'react'\nimport { useReducedMotion } from '../hooks/use-reduced-motion'\nimport { MaterialSymbol } from '../icons/material-symbol'\nimport { MESSAGE_ANIMATIONS } from '../lib/message-animations'\nimport { cn } from '../utils/cn'\nimport { Button, type ButtonProps } from './button'\n\nconst MessageScrollerAnimationReadyContext = React.createContext(false)\n\ntype MessageScrollerItemProps = Omit<\n React.ComponentProps<typeof MessageScrollerPrimitive.Item>,\n | 'animate'\n | 'exit'\n | 'initial'\n | 'variants'\n | 'onAnimationStart'\n | 'onDrag'\n | 'onDragStart'\n | 'onDragEnd'\n | 'onDragTransitionEnd'\n>\n\nconst MotionMessageScrollerPrimitiveItem = create(MessageScrollerPrimitive.Item)\n\nfunction MessageScrollerProvider(\n props: React.ComponentProps<typeof MessageScrollerPrimitive.Provider>,\n) {\n const [ready, setReady] = React.useState(false)\n\n React.useEffect(() => {\n setReady(true)\n }, [])\n\n return (\n <LazyMotion features={domAnimation} strict>\n <MessageScrollerAnimationReadyContext.Provider value={ready}>\n <MessageScrollerPrimitive.Provider {...props} />\n </MessageScrollerAnimationReadyContext.Provider>\n </LazyMotion>\n )\n}\n\nfunction MessageScroller({\n className,\n ...props\n}: React.ComponentProps<typeof MessageScrollerPrimitive.Root>) {\n return (\n <MessageScrollerPrimitive.Root\n data-slot=\"message-scroller\"\n className={cn(\n 'group/message-scroller relative flex size-full min-h-0 flex-col overflow-hidden',\n className,\n )}\n {...props}\n />\n )\n}\n\nfunction MessageScrollerViewport({\n className,\n ...props\n}: React.ComponentProps<typeof MessageScrollerPrimitive.Viewport>) {\n return (\n <MessageScrollerPrimitive.Viewport\n data-slot=\"message-scroller-viewport\"\n // scroll-fade-b is a spark-adopted shadcn utility; scrollbar-width/gutter\n // are arbitrary props (spark ships no scrollbar-* utilities) and the native\n // bar collapses to no-scrollbar (spark util) while autoscrolling.\n className={cn(\n 'size-full min-h-0 min-w-0 scroll-fade-b overflow-y-auto overscroll-contain contain-content [scrollbar-gutter:stable] [scrollbar-width:thin] focus-visible:ring-2 focus-visible:ring-spark-11 focus-visible:ring-offset-2 focus-visible:outline-hidden data-autoscrolling:no-scrollbar',\n className,\n )}\n {...props}\n />\n )\n}\n\nfunction MessageScrollerContent({\n className,\n ...props\n}: React.ComponentProps<typeof MessageScrollerPrimitive.Content>) {\n return (\n <MessageScrollerPrimitive.Content\n data-slot=\"message-scroller-content\"\n className={cn('flex h-max min-h-full flex-col gap-8', className)}\n {...props}\n />\n )\n}\n\nfunction MessageScrollerItem({\n className,\n scrollAnchor = false,\n ...props\n}: MessageScrollerItemProps) {\n const ready = React.useContext(MessageScrollerAnimationReadyContext)\n const shouldReduceMotion = useReducedMotion()\n const skipEntrance = !ready || shouldReduceMotion\n\n return (\n <MotionMessageScrollerPrimitiveItem\n {...props}\n data-slot=\"message-scroller-item\"\n scrollAnchor={scrollAnchor}\n className={cn(\n 'min-w-0 shrink-0 [contain-intrinsic-size:auto_10rem] [content-visibility:auto]',\n className,\n )}\n variants={MESSAGE_ANIMATIONS['slide-up'].variants}\n initial={skipEntrance ? false : 'initial'}\n animate=\"animate\"\n exit={skipEntrance ? undefined : 'exit'}\n />\n )\n}\n\n// Renders a spark <Button> via `render`, so its `styleVariant`/`color`/`size`\n// recipe paints the chrome — we only add positioning + the enter/leave animation\n// keyed off the primitive's data-[active] state. Icon is a MaterialSymbol (spark's\n// icon set), pointing down for `end` and up for `start`.\nfunction MessageScrollerButton({\n direction = 'end',\n className,\n children,\n render,\n styleVariant = 'surface',\n color = 'neutral',\n size = 'icon-small',\n ...props\n}: React.ComponentProps<typeof MessageScrollerPrimitive.Button> &\n Pick<ButtonProps, 'styleVariant' | 'color' | 'size'>) {\n return (\n <MessageScrollerPrimitive.Button\n data-slot=\"message-scroller-button\"\n data-direction={direction}\n direction={direction}\n className={cn(\n 'absolute inset-s-1/2 -translate-x-1/2 rounded-full transition-[translate,scale,opacity] duration-200 data-[active=false]:pointer-events-none data-[active=false]:scale-95 data-[active=false]:opacity-0 data-[active=false]:duration-400 data-[active=false]:ease-[cubic-bezier(0.7,0,0.84,0)] data-[active=true]:translate-y-0 data-[active=true]:scale-100 data-[active=true]:opacity-100 data-[active=true]:ease-[cubic-bezier(0.23,1,0.32,1)] data-[direction=end]:bottom-4 data-[direction=end]:data-[active=false]:translate-y-full data-[direction=start]:top-4 data-[direction=start]:data-[active=false]:-translate-y-full motion-reduce:transition-none rtl:translate-x-1/2',\n className,\n )}\n render={\n render ?? (\n <Button styleVariant={styleVariant} color={color} size={size} />\n )\n }\n {...props}\n >\n {children ?? (\n <>\n <MaterialSymbol\n name={direction === 'end' ? 'arrow_downward' : 'arrow_upward'}\n />\n <span className=\"sr-only\">\n {direction === 'end' ? 'Scroll to end' : 'Scroll to start'}\n </span>\n </>\n )}\n </MessageScrollerPrimitive.Button>\n )\n}\n\nexport {\n MessageScroller,\n MessageScrollerButton,\n MessageScrollerContent,\n MessageScrollerItem,\n MessageScrollerProvider,\n MessageScrollerViewport,\n useMessageScroller,\n useMessageScrollerScrollable,\n useMessageScrollerVisibility,\n}\n"],"mappings":";;;;;;;;;;;;;;;AAeA,MAAM,uCAAuCA,MAAM,cAAc,KAAK;AAetE,MAAM,sCAAA,GAAA,eAAA,QAA4CC,+BAAAA,gBAAyB,IAAI;AAE/E,SAAS,wBACP,OACA;CACA,MAAM,CAAC,OAAO,YAAYD,MAAM,SAAS,KAAK;CAE9C,MAAM,gBAAgB;EACpB,SAAS,IAAI;CACf,GAAG,CAAC,CAAC;CAEL,OACE,iBAAA,GAAA,kBAAA,KAACE,aAAAA,YAAD;EAAY,UAAUC,aAAAA;EAAc,QAAA;YAClC,iBAAA,GAAA,kBAAA,KAAC,qCAAqC,UAAtC;GAA+C,OAAO;aACpD,iBAAA,GAAA,kBAAA,KAACF,+BAAAA,gBAAyB,UAA1B,EAAmC,GAAI,MAAQ,CAAA;EACF,CAAA;CACrC,CAAA;AAEhB;AAEA,SAAS,gBAAgB,EACvB,WACA,GAAG,SAC0D;CAC7D,OACE,iBAAA,GAAA,kBAAA,KAACA,+BAAAA,gBAAyB,MAA1B;EACE,aAAU;EACV,YAAA,GAAA,OAAA,IACE,mFACA,SACF;EACA,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,wBAAwB,EAC/B,WACA,GAAG,SAC8D;CACjE,OACE,iBAAA,GAAA,kBAAA,KAACA,+BAAAA,gBAAyB,UAA1B;EACE,aAAU;EAIV,YAAA,GAAA,OAAA,IACE,yRACA,SACF;EACA,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,uBAAuB,EAC9B,WACA,GAAG,SAC6D;CAChE,OACE,iBAAA,GAAA,kBAAA,KAACA,+BAAAA,gBAAyB,SAA1B;EACE,aAAU;EACV,YAAA,GAAA,OAAA,IAAc,wCAAwC,SAAS;EAC/D,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,oBAAoB,EAC3B,WACA,eAAe,OACf,GAAG,SACwB;CAC3B,MAAM,QAAQD,MAAM,WAAW,oCAAoC;CACnE,MAAM,qBAAqBI,iCAAAA,iBAAiB;CAC5C,MAAM,eAAe,CAAC,SAAS;CAE/B,OACE,iBAAA,GAAA,kBAAA,KAAC,oCAAD;EACE,GAAI;EACJ,aAAU;EACI;EACd,YAAA,GAAA,OAAA,IACE,kFACA,SACF;EACA,UAAUC,+BAAAA,mBAAmB,YAAY;EACzC,SAAS,eAAe,QAAQ;EAChC,SAAQ;EACR,MAAM,eAAe,KAAA,IAAY;CAClC,CAAA;AAEL;AAMA,SAAS,sBAAsB,EAC7B,YAAY,OACZ,WACA,UACA,QACA,eAAe,WACf,QAAQ,WACR,OAAO,cACP,GAAG,SAEmD;CACtD,OACE,iBAAA,GAAA,kBAAA,KAACJ,+BAAAA,gBAAyB,QAA1B;EACE,aAAU;EACV,kBAAgB;EACL;EACX,YAAA,GAAA,OAAA,IACE,ypBACA,SACF;EACA,QACE,UACE,iBAAA,GAAA,kBAAA,KAACK,0BAAAA,QAAD;GAAsB;GAAqB;GAAa;EAAO,CAAA;EAGnE,GAAI;YAEH,YACC,iBAAA,GAAA,kBAAA,MAAA,kBAAA,UAAA,EAAA,UAAA,CACE,iBAAA,GAAA,kBAAA,KAACC,8BAAAA,gBAAD,EACE,MAAM,cAAc,QAAQ,mBAAmB,eAChD,CAAA,GACD,iBAAA,GAAA,kBAAA,KAAC,QAAD;GAAM,WAAU;aACb,cAAc,QAAQ,kBAAkB;EACrC,CAAA,CACN,EAAA,CAAA;CAE2B,CAAA;AAErC"}
|
|
@@ -5,6 +5,7 @@ import * as React$1 from "react";
|
|
|
5
5
|
import { MessageScroller as MessageScroller$1, useMessageScroller, useMessageScrollerScrollable, useMessageScrollerVisibility } from "@shadcn/react/message-scroller";
|
|
6
6
|
|
|
7
7
|
//#region src/components/message-scroller.d.ts
|
|
8
|
+
type MessageScrollerItemProps = Omit<React$1.ComponentProps<typeof MessageScroller$1.Item>, 'animate' | 'exit' | 'initial' | 'variants' | 'onAnimationStart' | 'onDrag' | 'onDragStart' | 'onDragEnd' | 'onDragTransitionEnd'>;
|
|
8
9
|
declare function MessageScrollerProvider(props: React$1.ComponentProps<typeof MessageScroller$1.Provider>): import("react/jsx-runtime").JSX.Element;
|
|
9
10
|
declare function MessageScroller({
|
|
10
11
|
className,
|
|
@@ -22,7 +23,7 @@ declare function MessageScrollerItem({
|
|
|
22
23
|
className,
|
|
23
24
|
scrollAnchor,
|
|
24
25
|
...props
|
|
25
|
-
}:
|
|
26
|
+
}: MessageScrollerItemProps): import("react/jsx-runtime").JSX.Element;
|
|
26
27
|
declare function MessageScrollerButton({
|
|
27
28
|
direction,
|
|
28
29
|
className,
|
|
@@ -5,6 +5,7 @@ import * as React$1 from "react";
|
|
|
5
5
|
import { MessageScroller as MessageScroller$1, useMessageScroller, useMessageScrollerScrollable, useMessageScrollerVisibility } from "@shadcn/react/message-scroller";
|
|
6
6
|
|
|
7
7
|
//#region src/components/message-scroller.d.ts
|
|
8
|
+
type MessageScrollerItemProps = Omit<React$1.ComponentProps<typeof MessageScroller$1.Item>, 'animate' | 'exit' | 'initial' | 'variants' | 'onAnimationStart' | 'onDrag' | 'onDragStart' | 'onDragEnd' | 'onDragTransitionEnd'>;
|
|
8
9
|
declare function MessageScrollerProvider(props: React$1.ComponentProps<typeof MessageScroller$1.Provider>): import("react/jsx-runtime").JSX.Element;
|
|
9
10
|
declare function MessageScroller({
|
|
10
11
|
className,
|
|
@@ -22,7 +23,7 @@ declare function MessageScrollerItem({
|
|
|
22
23
|
className,
|
|
23
24
|
scrollAnchor,
|
|
24
25
|
...props
|
|
25
|
-
}:
|
|
26
|
+
}: MessageScrollerItemProps): import("react/jsx-runtime").JSX.Element;
|
|
26
27
|
declare function MessageScrollerButton({
|
|
27
28
|
direction,
|
|
28
29
|
className,
|
|
@@ -1,13 +1,30 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import { useReducedMotion } from "../hooks/use-reduced-motion.js";
|
|
2
3
|
import { cn } from "../utils/cn.js";
|
|
3
4
|
import { MaterialSymbol } from "../icons/material-symbol.js";
|
|
4
5
|
import { Button } from "./button.js";
|
|
5
|
-
import "
|
|
6
|
+
import { MESSAGE_ANIMATIONS } from "../lib/message-animations.js";
|
|
7
|
+
import * as React$1 from "react";
|
|
6
8
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
7
9
|
import { MessageScroller as MessageScroller$1, useMessageScroller, useMessageScrollerScrollable, useMessageScrollerVisibility } from "@shadcn/react/message-scroller";
|
|
10
|
+
import { LazyMotion, domAnimation } from "motion/react";
|
|
11
|
+
import { create } from "motion/react-m";
|
|
8
12
|
//#region src/components/message-scroller.tsx
|
|
13
|
+
const MessageScrollerAnimationReadyContext = React$1.createContext(false);
|
|
14
|
+
const MotionMessageScrollerPrimitiveItem = create(MessageScroller$1.Item);
|
|
9
15
|
function MessageScrollerProvider(props) {
|
|
10
|
-
|
|
16
|
+
const [ready, setReady] = React$1.useState(false);
|
|
17
|
+
React$1.useEffect(() => {
|
|
18
|
+
setReady(true);
|
|
19
|
+
}, []);
|
|
20
|
+
return /* @__PURE__ */ jsx(LazyMotion, {
|
|
21
|
+
features: domAnimation,
|
|
22
|
+
strict: true,
|
|
23
|
+
children: /* @__PURE__ */ jsx(MessageScrollerAnimationReadyContext.Provider, {
|
|
24
|
+
value: ready,
|
|
25
|
+
children: /* @__PURE__ */ jsx(MessageScroller$1.Provider, { ...props })
|
|
26
|
+
})
|
|
27
|
+
});
|
|
11
28
|
}
|
|
12
29
|
function MessageScroller({ className, ...props }) {
|
|
13
30
|
return /* @__PURE__ */ jsx(MessageScroller$1.Root, {
|
|
@@ -19,7 +36,7 @@ function MessageScroller({ className, ...props }) {
|
|
|
19
36
|
function MessageScrollerViewport({ className, ...props }) {
|
|
20
37
|
return /* @__PURE__ */ jsx(MessageScroller$1.Viewport, {
|
|
21
38
|
"data-slot": "message-scroller-viewport",
|
|
22
|
-
className: cn("size-full min-h-0 min-w-0 scroll-fade-b overflow-y-auto overscroll-contain contain-content [scrollbar-gutter:stable] [scrollbar-width:thin] data-autoscrolling:no-scrollbar", className),
|
|
39
|
+
className: cn("size-full min-h-0 min-w-0 scroll-fade-b overflow-y-auto overscroll-contain contain-content [scrollbar-gutter:stable] [scrollbar-width:thin] focus-visible:ring-2 focus-visible:ring-spark-11 focus-visible:ring-offset-2 focus-visible:outline-hidden data-autoscrolling:no-scrollbar", className),
|
|
23
40
|
...props
|
|
24
41
|
});
|
|
25
42
|
}
|
|
@@ -31,11 +48,18 @@ function MessageScrollerContent({ className, ...props }) {
|
|
|
31
48
|
});
|
|
32
49
|
}
|
|
33
50
|
function MessageScrollerItem({ className, scrollAnchor = false, ...props }) {
|
|
34
|
-
|
|
51
|
+
const ready = React$1.useContext(MessageScrollerAnimationReadyContext);
|
|
52
|
+
const shouldReduceMotion = useReducedMotion();
|
|
53
|
+
const skipEntrance = !ready || shouldReduceMotion;
|
|
54
|
+
return /* @__PURE__ */ jsx(MotionMessageScrollerPrimitiveItem, {
|
|
55
|
+
...props,
|
|
35
56
|
"data-slot": "message-scroller-item",
|
|
36
57
|
scrollAnchor,
|
|
37
58
|
className: cn("min-w-0 shrink-0 [contain-intrinsic-size:auto_10rem] [content-visibility:auto]", className),
|
|
38
|
-
|
|
59
|
+
variants: MESSAGE_ANIMATIONS["slide-up"].variants,
|
|
60
|
+
initial: skipEntrance ? false : "initial",
|
|
61
|
+
animate: "animate",
|
|
62
|
+
exit: skipEntrance ? void 0 : "exit"
|
|
39
63
|
});
|
|
40
64
|
}
|
|
41
65
|
function MessageScrollerButton({ direction = "end", className, children, render, styleVariant = "surface", color = "neutral", size = "icon-small", ...props }) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"message-scroller.js","names":["MessageScrollerPrimitive"],"sources":["../../src/components/message-scroller.tsx"],"sourcesContent":["import {\n MessageScroller as MessageScrollerPrimitive,\n useMessageScroller,\n useMessageScrollerScrollable,\n useMessageScrollerVisibility,\n} from '@shadcn/react/message-scroller'\nimport * as React from 'react'\nimport { MaterialSymbol } from '../icons/material-symbol'\nimport { cn } from '../utils/cn'\nimport { Button, type ButtonProps } from './button'\n\nfunction MessageScrollerProvider(\n props: React.ComponentProps<typeof MessageScrollerPrimitive.Provider>,\n) {\n return <MessageScrollerPrimitive.Provider {...props} />\n}\n\nfunction MessageScroller({\n className,\n ...props\n}: React.ComponentProps<typeof MessageScrollerPrimitive.Root>) {\n return (\n <MessageScrollerPrimitive.Root\n data-slot=\"message-scroller\"\n className={cn(\n 'group/message-scroller relative flex size-full min-h-0 flex-col overflow-hidden',\n className,\n )}\n {...props}\n />\n )\n}\n\nfunction MessageScrollerViewport({\n className,\n ...props\n}: React.ComponentProps<typeof MessageScrollerPrimitive.Viewport>) {\n return (\n <MessageScrollerPrimitive.Viewport\n data-slot=\"message-scroller-viewport\"\n // scroll-fade-b is a spark-adopted shadcn utility; scrollbar-width/gutter\n // are arbitrary props (spark ships no scrollbar-* utilities) and the native\n // bar collapses to no-scrollbar (spark util) while autoscrolling.\n className={cn(\n 'size-full min-h-0 min-w-0 scroll-fade-b overflow-y-auto overscroll-contain contain-content [scrollbar-gutter:stable] [scrollbar-width:thin] data-autoscrolling:no-scrollbar',\n className,\n )}\n {...props}\n />\n )\n}\n\nfunction MessageScrollerContent({\n className,\n ...props\n}: React.ComponentProps<typeof MessageScrollerPrimitive.Content>) {\n return (\n <MessageScrollerPrimitive.Content\n data-slot=\"message-scroller-content\"\n className={cn('flex h-max min-h-full flex-col gap-8', className)}\n {...props}\n />\n )\n}\n\nfunction MessageScrollerItem({\n className,\n scrollAnchor = false,\n ...props\n}: React.
|
|
1
|
+
{"version":3,"file":"message-scroller.js","names":["React","MessageScrollerPrimitive"],"sources":["../../src/components/message-scroller.tsx"],"sourcesContent":["import {\n MessageScroller as MessageScrollerPrimitive,\n useMessageScroller,\n useMessageScrollerScrollable,\n useMessageScrollerVisibility,\n} from '@shadcn/react/message-scroller'\nimport { LazyMotion, domAnimation } from 'motion/react'\nimport { create } from 'motion/react-m'\nimport * as React from 'react'\nimport { useReducedMotion } from '../hooks/use-reduced-motion'\nimport { MaterialSymbol } from '../icons/material-symbol'\nimport { MESSAGE_ANIMATIONS } from '../lib/message-animations'\nimport { cn } from '../utils/cn'\nimport { Button, type ButtonProps } from './button'\n\nconst MessageScrollerAnimationReadyContext = React.createContext(false)\n\ntype MessageScrollerItemProps = Omit<\n React.ComponentProps<typeof MessageScrollerPrimitive.Item>,\n | 'animate'\n | 'exit'\n | 'initial'\n | 'variants'\n | 'onAnimationStart'\n | 'onDrag'\n | 'onDragStart'\n | 'onDragEnd'\n | 'onDragTransitionEnd'\n>\n\nconst MotionMessageScrollerPrimitiveItem = create(MessageScrollerPrimitive.Item)\n\nfunction MessageScrollerProvider(\n props: React.ComponentProps<typeof MessageScrollerPrimitive.Provider>,\n) {\n const [ready, setReady] = React.useState(false)\n\n React.useEffect(() => {\n setReady(true)\n }, [])\n\n return (\n <LazyMotion features={domAnimation} strict>\n <MessageScrollerAnimationReadyContext.Provider value={ready}>\n <MessageScrollerPrimitive.Provider {...props} />\n </MessageScrollerAnimationReadyContext.Provider>\n </LazyMotion>\n )\n}\n\nfunction MessageScroller({\n className,\n ...props\n}: React.ComponentProps<typeof MessageScrollerPrimitive.Root>) {\n return (\n <MessageScrollerPrimitive.Root\n data-slot=\"message-scroller\"\n className={cn(\n 'group/message-scroller relative flex size-full min-h-0 flex-col overflow-hidden',\n className,\n )}\n {...props}\n />\n )\n}\n\nfunction MessageScrollerViewport({\n className,\n ...props\n}: React.ComponentProps<typeof MessageScrollerPrimitive.Viewport>) {\n return (\n <MessageScrollerPrimitive.Viewport\n data-slot=\"message-scroller-viewport\"\n // scroll-fade-b is a spark-adopted shadcn utility; scrollbar-width/gutter\n // are arbitrary props (spark ships no scrollbar-* utilities) and the native\n // bar collapses to no-scrollbar (spark util) while autoscrolling.\n className={cn(\n 'size-full min-h-0 min-w-0 scroll-fade-b overflow-y-auto overscroll-contain contain-content [scrollbar-gutter:stable] [scrollbar-width:thin] focus-visible:ring-2 focus-visible:ring-spark-11 focus-visible:ring-offset-2 focus-visible:outline-hidden data-autoscrolling:no-scrollbar',\n className,\n )}\n {...props}\n />\n )\n}\n\nfunction MessageScrollerContent({\n className,\n ...props\n}: React.ComponentProps<typeof MessageScrollerPrimitive.Content>) {\n return (\n <MessageScrollerPrimitive.Content\n data-slot=\"message-scroller-content\"\n className={cn('flex h-max min-h-full flex-col gap-8', className)}\n {...props}\n />\n )\n}\n\nfunction MessageScrollerItem({\n className,\n scrollAnchor = false,\n ...props\n}: MessageScrollerItemProps) {\n const ready = React.useContext(MessageScrollerAnimationReadyContext)\n const shouldReduceMotion = useReducedMotion()\n const skipEntrance = !ready || shouldReduceMotion\n\n return (\n <MotionMessageScrollerPrimitiveItem\n {...props}\n data-slot=\"message-scroller-item\"\n scrollAnchor={scrollAnchor}\n className={cn(\n 'min-w-0 shrink-0 [contain-intrinsic-size:auto_10rem] [content-visibility:auto]',\n className,\n )}\n variants={MESSAGE_ANIMATIONS['slide-up'].variants}\n initial={skipEntrance ? false : 'initial'}\n animate=\"animate\"\n exit={skipEntrance ? undefined : 'exit'}\n />\n )\n}\n\n// Renders a spark <Button> via `render`, so its `styleVariant`/`color`/`size`\n// recipe paints the chrome — we only add positioning + the enter/leave animation\n// keyed off the primitive's data-[active] state. Icon is a MaterialSymbol (spark's\n// icon set), pointing down for `end` and up for `start`.\nfunction MessageScrollerButton({\n direction = 'end',\n className,\n children,\n render,\n styleVariant = 'surface',\n color = 'neutral',\n size = 'icon-small',\n ...props\n}: React.ComponentProps<typeof MessageScrollerPrimitive.Button> &\n Pick<ButtonProps, 'styleVariant' | 'color' | 'size'>) {\n return (\n <MessageScrollerPrimitive.Button\n data-slot=\"message-scroller-button\"\n data-direction={direction}\n direction={direction}\n className={cn(\n 'absolute inset-s-1/2 -translate-x-1/2 rounded-full transition-[translate,scale,opacity] duration-200 data-[active=false]:pointer-events-none data-[active=false]:scale-95 data-[active=false]:opacity-0 data-[active=false]:duration-400 data-[active=false]:ease-[cubic-bezier(0.7,0,0.84,0)] data-[active=true]:translate-y-0 data-[active=true]:scale-100 data-[active=true]:opacity-100 data-[active=true]:ease-[cubic-bezier(0.23,1,0.32,1)] data-[direction=end]:bottom-4 data-[direction=end]:data-[active=false]:translate-y-full data-[direction=start]:top-4 data-[direction=start]:data-[active=false]:-translate-y-full motion-reduce:transition-none rtl:translate-x-1/2',\n className,\n )}\n render={\n render ?? (\n <Button styleVariant={styleVariant} color={color} size={size} />\n )\n }\n {...props}\n >\n {children ?? (\n <>\n <MaterialSymbol\n name={direction === 'end' ? 'arrow_downward' : 'arrow_upward'}\n />\n <span className=\"sr-only\">\n {direction === 'end' ? 'Scroll to end' : 'Scroll to start'}\n </span>\n </>\n )}\n </MessageScrollerPrimitive.Button>\n )\n}\n\nexport {\n MessageScroller,\n MessageScrollerButton,\n MessageScrollerContent,\n MessageScrollerItem,\n MessageScrollerProvider,\n MessageScrollerViewport,\n useMessageScroller,\n useMessageScrollerScrollable,\n useMessageScrollerVisibility,\n}\n"],"mappings":";;;;;;;;;;;;AAeA,MAAM,uCAAuCA,QAAM,cAAc,KAAK;AAetE,MAAM,qCAAqC,OAAOC,kBAAyB,IAAI;AAE/E,SAAS,wBACP,OACA;CACA,MAAM,CAAC,OAAO,YAAYD,QAAM,SAAS,KAAK;CAE9C,QAAM,gBAAgB;EACpB,SAAS,IAAI;CACf,GAAG,CAAC,CAAC;CAEL,OACE,oBAAC,YAAD;EAAY,UAAU;EAAc,QAAA;YAClC,oBAAC,qCAAqC,UAAtC;GAA+C,OAAO;aACpD,oBAACC,kBAAyB,UAA1B,EAAmC,GAAI,MAAQ,CAAA;EACF,CAAA;CACrC,CAAA;AAEhB;AAEA,SAAS,gBAAgB,EACvB,WACA,GAAG,SAC0D;CAC7D,OACE,oBAACA,kBAAyB,MAA1B;EACE,aAAU;EACV,WAAW,GACT,mFACA,SACF;EACA,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,wBAAwB,EAC/B,WACA,GAAG,SAC8D;CACjE,OACE,oBAACA,kBAAyB,UAA1B;EACE,aAAU;EAIV,WAAW,GACT,yRACA,SACF;EACA,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,uBAAuB,EAC9B,WACA,GAAG,SAC6D;CAChE,OACE,oBAACA,kBAAyB,SAA1B;EACE,aAAU;EACV,WAAW,GAAG,wCAAwC,SAAS;EAC/D,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,oBAAoB,EAC3B,WACA,eAAe,OACf,GAAG,SACwB;CAC3B,MAAM,QAAQD,QAAM,WAAW,oCAAoC;CACnE,MAAM,qBAAqB,iBAAiB;CAC5C,MAAM,eAAe,CAAC,SAAS;CAE/B,OACE,oBAAC,oCAAD;EACE,GAAI;EACJ,aAAU;EACI;EACd,WAAW,GACT,kFACA,SACF;EACA,UAAU,mBAAmB,YAAY;EACzC,SAAS,eAAe,QAAQ;EAChC,SAAQ;EACR,MAAM,eAAe,KAAA,IAAY;CAClC,CAAA;AAEL;AAMA,SAAS,sBAAsB,EAC7B,YAAY,OACZ,WACA,UACA,QACA,eAAe,WACf,QAAQ,WACR,OAAO,cACP,GAAG,SAEmD;CACtD,OACE,oBAACC,kBAAyB,QAA1B;EACE,aAAU;EACV,kBAAgB;EACL;EACX,WAAW,GACT,ypBACA,SACF;EACA,QACE,UACE,oBAAC,QAAD;GAAsB;GAAqB;GAAa;EAAO,CAAA;EAGnE,GAAI;YAEH,YACC,qBAAA,UAAA,EAAA,UAAA,CACE,oBAAC,gBAAD,EACE,MAAM,cAAc,QAAQ,mBAAmB,eAChD,CAAA,GACD,oBAAC,QAAD;GAAM,WAAU;aACb,cAAc,QAAQ,kBAAkB;EACrC,CAAA,CACN,EAAA,CAAA;CAE2B,CAAA;AAErC"}
|
|
@@ -6,7 +6,7 @@ import { useRender } from "@base-ui/react/use-render";
|
|
|
6
6
|
|
|
7
7
|
//#region src/components/page-header.d.ts
|
|
8
8
|
declare const PageHeader: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLElement> & React$1.RefAttributes<HTMLElement>>;
|
|
9
|
-
declare const PageHeaderBackButton: React$1.ForwardRefExoticComponent<Omit<ButtonProps, "
|
|
9
|
+
declare const PageHeaderBackButton: React$1.ForwardRefExoticComponent<Omit<ButtonProps, "size" | "color" | "styleVariant"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
10
10
|
declare const PageHeaderTitle: ({
|
|
11
11
|
className,
|
|
12
12
|
...props
|
|
@@ -6,7 +6,7 @@ import { useRender } from "@base-ui/react/use-render";
|
|
|
6
6
|
|
|
7
7
|
//#region src/components/page-header.d.ts
|
|
8
8
|
declare const PageHeader: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLElement> & React$1.RefAttributes<HTMLElement>>;
|
|
9
|
-
declare const PageHeaderBackButton: React$1.ForwardRefExoticComponent<Omit<ButtonProps, "
|
|
9
|
+
declare const PageHeaderBackButton: React$1.ForwardRefExoticComponent<Omit<ButtonProps, "size" | "color" | "styleVariant"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
10
10
|
declare const PageHeaderTitle: ({
|
|
11
11
|
className,
|
|
12
12
|
...props
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
4
|
const require_chunk = require("../chunk-DY84GLCh.cjs");
|
|
5
5
|
const require_icons_material_symbol = require("../icons/material-symbol.cjs");
|
|
6
|
-
const require_lib_input_box_variants = require("../lib/input-box-variants.cjs");
|
|
7
6
|
const require_components_field = require("./field.cjs");
|
|
7
|
+
const require_lib_input_box_variants = require("../lib/input-box-variants.cjs");
|
|
8
8
|
let react = require("react");
|
|
9
9
|
react = require_chunk.__toESM(react);
|
|
10
10
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
import { cn } from "../utils/cn.js";
|
|
4
4
|
import { MaterialSymbol } from "../icons/material-symbol.js";
|
|
5
|
-
import { boxChrome } from "../lib/input-box-variants.js";
|
|
6
5
|
import { useFieldControl } from "./field.js";
|
|
6
|
+
import { boxChrome } from "../lib/input-box-variants.js";
|
|
7
7
|
import "react";
|
|
8
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
9
|
import { Select as Select$1 } from "@base-ui/react/select";
|
|
@@ -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");
|
|
@@ -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";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"material-symbol.cjs","names":[],"sources":["../../src/icons/material-symbol.tsx"],"sourcesContent":["import { cn } from '../utils/cn'\n\nexport const materialSymbolIconNames = [\n 'access_time',\n 'add',\n 'alarm',\n 'arrow_downward',\n 'arrow_upward',\n 'auto_awesome',\n 'bar_chart',\n 'battery_0_bar',\n 'battery_1_bar',\n 'battery_2_bar',\n 'battery_3_bar',\n 'battery_4_bar',\n 'battery_5_bar',\n 'battery_6_bar',\n 'battery_charging_20',\n 'battery_charging_30',\n 'battery_charging_50',\n 'battery_charging_60',\n 'battery_charging_80',\n 'battery_charging_90',\n 'battery_charging_full',\n 'battery_full',\n 'bolt',\n 'calendar_month',\n 'cancel',\n 'check',\n 'check_circle',\n 'chevron_left',\n 'chevron_right',\n 'circle',\n 'close',\n 'close_fullscreen',\n 'content_copy',\n 'dashboard_2',\n 'delete',\n 'dishwasher',\n 'drag_indicator',\n 'edit',\n 'edit_square',\n 'electric_bolt',\n 'electric_car',\n 'electrical_services',\n 'ev_station',\n 'expand_more',\n 'heat_pump',\n 'home',\n 'info',\n 'laundry',\n 'layers',\n 'local_fire_department',\n 'more_vert',\n 'open_in_full',\n 'open_in_new',\n 'payments',\n 'pending',\n 'power',\n 'search',\n 'power_settings_new',\n 'price_change',\n 'recycling',\n 'refresh',\n 'schedule',\n 'settings',\n 'solar_power',\n 'speed',\n 'sunny',\n 'partly_cloudy_day',\n 'cloudy',\n 'rainy',\n 'weather_snowy',\n 'swap_vert',\n 'thermostat',\n 'toggle_on',\n 'track_changes',\n 'trending_down',\n 'trending_up',\n 'tune',\n 'warning',\n 'wifi_off',\n] as const\n\nexport const materialSymbolIconNamesString = [...materialSymbolIconNames]\n .sort()\n .join(',')\nexport const materialSymbolIconNamesURL = `https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL,GRAD@20,400,0,0&icon_names=${materialSymbolIconNamesString}&display=block`\n\nexport type MaterialSymbolIconName = (typeof materialSymbolIconNames)[number]\n\nexport type MaterialSymbolProps = {\n name: MaterialSymbolIconName\n className?: string\n}\n\nconst MaterialSymbol = ({ name, className }: MaterialSymbolProps) => {\n if (!materialSymbolIconNames.includes(name)) {\n console.warn(\n `[MaterialSymbol] \"${name}\" isn't a recognized icon name — it will render as literal text, not an icon. See materialSymbolIconNames from '@epilot/spark-ui/icons' for the full set.`,\n )\n }\n\n return (\n <span\n aria-hidden=\"true\"\n className={cn(\n // !important: the Google Fonts stylesheet is unlayered (24px) and beats every layered\n // utility — callers size the icon via --spark-icon-size, not font-size classes\n 'material-symbols-rounded inline-block size-(length:--spark-icon-size,20px) shrink-0 overflow-hidden text-(length:--spark-icon-size,20px)! leading-none select-none',\n className,\n )}\n translate=\"no\"\n >\n {name}\n </span>\n )\n}\nMaterialSymbol.displayName = 'MaterialSymbol'\n\nexport { MaterialSymbol }\n"],"mappings":";;;;;AAEA,MAAa,0BAA0B;CACrC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAEA,MAAa,gCAAgC,CAAC,GAAG,uBAAuB,EACrE,KAAK,EACL,KAAK,GAAG;AACX,MAAa,6BAA6B,+GAA+G,8BAA8B;AASvL,MAAM,kBAAkB,EAAE,MAAM,gBAAqC;CACnE,IAAI,CAAC,wBAAwB,SAAS,IAAI,GACxC,QAAQ,KACN,qBAAqB,KAAK,0JAC5B;CAGF,OACE,iBAAA,GAAA,kBAAA,KAAC,QAAD;EACE,eAAY;EACZ,YAAA,GAAA,OAAA,IAGE,sKACA,SACF;EACA,WAAU;YAET;CACG,CAAA;AAEV;AACA,eAAe,cAAc"}
|
|
1
|
+
{"version":3,"file":"material-symbol.cjs","names":[],"sources":["../../src/icons/material-symbol.tsx"],"sourcesContent":["import { cn } from '../utils/cn'\n\nexport const materialSymbolIconNames = [\n 'access_time',\n 'add',\n 'alarm',\n 'arrow_downward',\n 'arrow_upward',\n 'auto_awesome',\n 'bar_chart',\n 'battery_0_bar',\n 'battery_1_bar',\n 'battery_2_bar',\n 'battery_3_bar',\n 'battery_4_bar',\n 'battery_5_bar',\n 'battery_6_bar',\n 'battery_charging_20',\n 'battery_charging_30',\n 'battery_charging_50',\n 'battery_charging_60',\n 'battery_charging_80',\n 'battery_charging_90',\n 'battery_charging_full',\n 'battery_full',\n 'bolt',\n 'calendar_month',\n 'cancel',\n 'check',\n 'check_circle',\n 'chevron_left',\n 'chevron_right',\n 'circle',\n 'close',\n 'close_fullscreen',\n 'content_copy',\n 'dashboard_2',\n 'delete',\n 'dishwasher',\n 'drag_indicator',\n 'edit',\n 'edit_square',\n 'electric_bolt',\n 'electric_car',\n 'electrical_services',\n 'ev_station',\n 'expand_more',\n 'heat_pump',\n 'home',\n 'info',\n 'laundry',\n 'layers',\n 'local_fire_department',\n 'more_vert',\n 'open_in_full',\n 'open_in_new',\n 'payments',\n 'pending',\n 'photo_camera',\n 'power',\n 'search',\n 'power_settings_new',\n 'price_change',\n 'recycling',\n 'refresh',\n 'schedule',\n 'settings',\n 'solar_power',\n 'speed',\n 'sunny',\n 'partly_cloudy_day',\n 'cloudy',\n 'rainy',\n 'weather_snowy',\n 'swap_vert',\n 'thermostat',\n 'toggle_on',\n 'track_changes',\n 'trending_down',\n 'trending_up',\n 'tune',\n 'warning',\n 'wifi_off',\n] as const\n\nexport const materialSymbolIconNamesString = [...materialSymbolIconNames]\n .sort()\n .join(',')\nexport const materialSymbolIconNamesURL = `https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL,GRAD@20,400,0,0&icon_names=${materialSymbolIconNamesString}&display=block`\n\nexport type MaterialSymbolIconName = (typeof materialSymbolIconNames)[number]\n\nexport type MaterialSymbolProps = {\n name: MaterialSymbolIconName\n className?: string\n}\n\nconst MaterialSymbol = ({ name, className }: MaterialSymbolProps) => {\n if (!materialSymbolIconNames.includes(name)) {\n console.warn(\n `[MaterialSymbol] \"${name}\" isn't a recognized icon name — it will render as literal text, not an icon. See materialSymbolIconNames from '@epilot/spark-ui/icons' for the full set.`,\n )\n }\n\n return (\n <span\n aria-hidden=\"true\"\n className={cn(\n // !important: the Google Fonts stylesheet is unlayered (24px) and beats every layered\n // utility — callers size the icon via --spark-icon-size, not font-size classes\n 'material-symbols-rounded inline-block size-(length:--spark-icon-size,20px) shrink-0 overflow-hidden text-(length:--spark-icon-size,20px)! leading-none select-none',\n className,\n )}\n translate=\"no\"\n >\n {name}\n </span>\n )\n}\nMaterialSymbol.displayName = 'MaterialSymbol'\n\nexport { MaterialSymbol }\n"],"mappings":";;;;;AAEA,MAAa,0BAA0B;CACrC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAEA,MAAa,gCAAgC,CAAC,GAAG,uBAAuB,EACrE,KAAK,EACL,KAAK,GAAG;AACX,MAAa,6BAA6B,+GAA+G,8BAA8B;AASvL,MAAM,kBAAkB,EAAE,MAAM,gBAAqC;CACnE,IAAI,CAAC,wBAAwB,SAAS,IAAI,GACxC,QAAQ,KACN,qBAAqB,KAAK,0JAC5B;CAGF,OACE,iBAAA,GAAA,kBAAA,KAAC,QAAD;EACE,eAAY;EACZ,YAAA,GAAA,OAAA,IAGE,sKACA,SACF;EACA,WAAU;YAET;CACG,CAAA;AAEV;AACA,eAAe,cAAc"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
//#region src/icons/material-symbol.d.ts
|
|
4
|
-
declare const materialSymbolIconNames: readonly ["access_time", "add", "alarm", "arrow_downward", "arrow_upward", "auto_awesome", "bar_chart", "battery_0_bar", "battery_1_bar", "battery_2_bar", "battery_3_bar", "battery_4_bar", "battery_5_bar", "battery_6_bar", "battery_charging_20", "battery_charging_30", "battery_charging_50", "battery_charging_60", "battery_charging_80", "battery_charging_90", "battery_charging_full", "battery_full", "bolt", "calendar_month", "cancel", "check", "check_circle", "chevron_left", "chevron_right", "circle", "close", "close_fullscreen", "content_copy", "dashboard_2", "delete", "dishwasher", "drag_indicator", "edit", "edit_square", "electric_bolt", "electric_car", "electrical_services", "ev_station", "expand_more", "heat_pump", "home", "info", "laundry", "layers", "local_fire_department", "more_vert", "open_in_full", "open_in_new", "payments", "pending", "power", "search", "power_settings_new", "price_change", "recycling", "refresh", "schedule", "settings", "solar_power", "speed", "sunny", "partly_cloudy_day", "cloudy", "rainy", "weather_snowy", "swap_vert", "thermostat", "toggle_on", "track_changes", "trending_down", "trending_up", "tune", "warning", "wifi_off"];
|
|
4
|
+
declare const materialSymbolIconNames: readonly ["access_time", "add", "alarm", "arrow_downward", "arrow_upward", "auto_awesome", "bar_chart", "battery_0_bar", "battery_1_bar", "battery_2_bar", "battery_3_bar", "battery_4_bar", "battery_5_bar", "battery_6_bar", "battery_charging_20", "battery_charging_30", "battery_charging_50", "battery_charging_60", "battery_charging_80", "battery_charging_90", "battery_charging_full", "battery_full", "bolt", "calendar_month", "cancel", "check", "check_circle", "chevron_left", "chevron_right", "circle", "close", "close_fullscreen", "content_copy", "dashboard_2", "delete", "dishwasher", "drag_indicator", "edit", "edit_square", "electric_bolt", "electric_car", "electrical_services", "ev_station", "expand_more", "heat_pump", "home", "info", "laundry", "layers", "local_fire_department", "more_vert", "open_in_full", "open_in_new", "payments", "pending", "photo_camera", "power", "search", "power_settings_new", "price_change", "recycling", "refresh", "schedule", "settings", "solar_power", "speed", "sunny", "partly_cloudy_day", "cloudy", "rainy", "weather_snowy", "swap_vert", "thermostat", "toggle_on", "track_changes", "trending_down", "trending_up", "tune", "warning", "wifi_off"];
|
|
5
5
|
declare const materialSymbolIconNamesString: string;
|
|
6
6
|
declare const materialSymbolIconNamesURL: string;
|
|
7
7
|
type MaterialSymbolIconName = (typeof materialSymbolIconNames)[number];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
//#region src/icons/material-symbol.d.ts
|
|
4
|
-
declare const materialSymbolIconNames: readonly ["access_time", "add", "alarm", "arrow_downward", "arrow_upward", "auto_awesome", "bar_chart", "battery_0_bar", "battery_1_bar", "battery_2_bar", "battery_3_bar", "battery_4_bar", "battery_5_bar", "battery_6_bar", "battery_charging_20", "battery_charging_30", "battery_charging_50", "battery_charging_60", "battery_charging_80", "battery_charging_90", "battery_charging_full", "battery_full", "bolt", "calendar_month", "cancel", "check", "check_circle", "chevron_left", "chevron_right", "circle", "close", "close_fullscreen", "content_copy", "dashboard_2", "delete", "dishwasher", "drag_indicator", "edit", "edit_square", "electric_bolt", "electric_car", "electrical_services", "ev_station", "expand_more", "heat_pump", "home", "info", "laundry", "layers", "local_fire_department", "more_vert", "open_in_full", "open_in_new", "payments", "pending", "power", "search", "power_settings_new", "price_change", "recycling", "refresh", "schedule", "settings", "solar_power", "speed", "sunny", "partly_cloudy_day", "cloudy", "rainy", "weather_snowy", "swap_vert", "thermostat", "toggle_on", "track_changes", "trending_down", "trending_up", "tune", "warning", "wifi_off"];
|
|
4
|
+
declare const materialSymbolIconNames: readonly ["access_time", "add", "alarm", "arrow_downward", "arrow_upward", "auto_awesome", "bar_chart", "battery_0_bar", "battery_1_bar", "battery_2_bar", "battery_3_bar", "battery_4_bar", "battery_5_bar", "battery_6_bar", "battery_charging_20", "battery_charging_30", "battery_charging_50", "battery_charging_60", "battery_charging_80", "battery_charging_90", "battery_charging_full", "battery_full", "bolt", "calendar_month", "cancel", "check", "check_circle", "chevron_left", "chevron_right", "circle", "close", "close_fullscreen", "content_copy", "dashboard_2", "delete", "dishwasher", "drag_indicator", "edit", "edit_square", "electric_bolt", "electric_car", "electrical_services", "ev_station", "expand_more", "heat_pump", "home", "info", "laundry", "layers", "local_fire_department", "more_vert", "open_in_full", "open_in_new", "payments", "pending", "photo_camera", "power", "search", "power_settings_new", "price_change", "recycling", "refresh", "schedule", "settings", "solar_power", "speed", "sunny", "partly_cloudy_day", "cloudy", "rainy", "weather_snowy", "swap_vert", "thermostat", "toggle_on", "track_changes", "trending_down", "trending_up", "tune", "warning", "wifi_off"];
|
|
5
5
|
declare const materialSymbolIconNamesString: string;
|
|
6
6
|
declare const materialSymbolIconNamesURL: string;
|
|
7
7
|
type MaterialSymbolIconName = (typeof materialSymbolIconNames)[number];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"material-symbol.js","names":[],"sources":["../../src/icons/material-symbol.tsx"],"sourcesContent":["import { cn } from '../utils/cn'\n\nexport const materialSymbolIconNames = [\n 'access_time',\n 'add',\n 'alarm',\n 'arrow_downward',\n 'arrow_upward',\n 'auto_awesome',\n 'bar_chart',\n 'battery_0_bar',\n 'battery_1_bar',\n 'battery_2_bar',\n 'battery_3_bar',\n 'battery_4_bar',\n 'battery_5_bar',\n 'battery_6_bar',\n 'battery_charging_20',\n 'battery_charging_30',\n 'battery_charging_50',\n 'battery_charging_60',\n 'battery_charging_80',\n 'battery_charging_90',\n 'battery_charging_full',\n 'battery_full',\n 'bolt',\n 'calendar_month',\n 'cancel',\n 'check',\n 'check_circle',\n 'chevron_left',\n 'chevron_right',\n 'circle',\n 'close',\n 'close_fullscreen',\n 'content_copy',\n 'dashboard_2',\n 'delete',\n 'dishwasher',\n 'drag_indicator',\n 'edit',\n 'edit_square',\n 'electric_bolt',\n 'electric_car',\n 'electrical_services',\n 'ev_station',\n 'expand_more',\n 'heat_pump',\n 'home',\n 'info',\n 'laundry',\n 'layers',\n 'local_fire_department',\n 'more_vert',\n 'open_in_full',\n 'open_in_new',\n 'payments',\n 'pending',\n 'power',\n 'search',\n 'power_settings_new',\n 'price_change',\n 'recycling',\n 'refresh',\n 'schedule',\n 'settings',\n 'solar_power',\n 'speed',\n 'sunny',\n 'partly_cloudy_day',\n 'cloudy',\n 'rainy',\n 'weather_snowy',\n 'swap_vert',\n 'thermostat',\n 'toggle_on',\n 'track_changes',\n 'trending_down',\n 'trending_up',\n 'tune',\n 'warning',\n 'wifi_off',\n] as const\n\nexport const materialSymbolIconNamesString = [...materialSymbolIconNames]\n .sort()\n .join(',')\nexport const materialSymbolIconNamesURL = `https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL,GRAD@20,400,0,0&icon_names=${materialSymbolIconNamesString}&display=block`\n\nexport type MaterialSymbolIconName = (typeof materialSymbolIconNames)[number]\n\nexport type MaterialSymbolProps = {\n name: MaterialSymbolIconName\n className?: string\n}\n\nconst MaterialSymbol = ({ name, className }: MaterialSymbolProps) => {\n if (!materialSymbolIconNames.includes(name)) {\n console.warn(\n `[MaterialSymbol] \"${name}\" isn't a recognized icon name — it will render as literal text, not an icon. See materialSymbolIconNames from '@epilot/spark-ui/icons' for the full set.`,\n )\n }\n\n return (\n <span\n aria-hidden=\"true\"\n className={cn(\n // !important: the Google Fonts stylesheet is unlayered (24px) and beats every layered\n // utility — callers size the icon via --spark-icon-size, not font-size classes\n 'material-symbols-rounded inline-block size-(length:--spark-icon-size,20px) shrink-0 overflow-hidden text-(length:--spark-icon-size,20px)! leading-none select-none',\n className,\n )}\n translate=\"no\"\n >\n {name}\n </span>\n )\n}\nMaterialSymbol.displayName = 'MaterialSymbol'\n\nexport { MaterialSymbol }\n"],"mappings":";;;;AAEA,MAAa,0BAA0B;CACrC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAEA,MAAa,gCAAgC,CAAC,GAAG,uBAAuB,EACrE,KAAK,EACL,KAAK,GAAG;AACX,MAAa,6BAA6B,+GAA+G,8BAA8B;AASvL,MAAM,kBAAkB,EAAE,MAAM,gBAAqC;CACnE,IAAI,CAAC,wBAAwB,SAAS,IAAI,GACxC,QAAQ,KACN,qBAAqB,KAAK,0JAC5B;CAGF,OACE,oBAAC,QAAD;EACE,eAAY;EACZ,WAAW,GAGT,sKACA,SACF;EACA,WAAU;YAET;CACG,CAAA;AAEV;AACA,eAAe,cAAc"}
|
|
1
|
+
{"version":3,"file":"material-symbol.js","names":[],"sources":["../../src/icons/material-symbol.tsx"],"sourcesContent":["import { cn } from '../utils/cn'\n\nexport const materialSymbolIconNames = [\n 'access_time',\n 'add',\n 'alarm',\n 'arrow_downward',\n 'arrow_upward',\n 'auto_awesome',\n 'bar_chart',\n 'battery_0_bar',\n 'battery_1_bar',\n 'battery_2_bar',\n 'battery_3_bar',\n 'battery_4_bar',\n 'battery_5_bar',\n 'battery_6_bar',\n 'battery_charging_20',\n 'battery_charging_30',\n 'battery_charging_50',\n 'battery_charging_60',\n 'battery_charging_80',\n 'battery_charging_90',\n 'battery_charging_full',\n 'battery_full',\n 'bolt',\n 'calendar_month',\n 'cancel',\n 'check',\n 'check_circle',\n 'chevron_left',\n 'chevron_right',\n 'circle',\n 'close',\n 'close_fullscreen',\n 'content_copy',\n 'dashboard_2',\n 'delete',\n 'dishwasher',\n 'drag_indicator',\n 'edit',\n 'edit_square',\n 'electric_bolt',\n 'electric_car',\n 'electrical_services',\n 'ev_station',\n 'expand_more',\n 'heat_pump',\n 'home',\n 'info',\n 'laundry',\n 'layers',\n 'local_fire_department',\n 'more_vert',\n 'open_in_full',\n 'open_in_new',\n 'payments',\n 'pending',\n 'photo_camera',\n 'power',\n 'search',\n 'power_settings_new',\n 'price_change',\n 'recycling',\n 'refresh',\n 'schedule',\n 'settings',\n 'solar_power',\n 'speed',\n 'sunny',\n 'partly_cloudy_day',\n 'cloudy',\n 'rainy',\n 'weather_snowy',\n 'swap_vert',\n 'thermostat',\n 'toggle_on',\n 'track_changes',\n 'trending_down',\n 'trending_up',\n 'tune',\n 'warning',\n 'wifi_off',\n] as const\n\nexport const materialSymbolIconNamesString = [...materialSymbolIconNames]\n .sort()\n .join(',')\nexport const materialSymbolIconNamesURL = `https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL,GRAD@20,400,0,0&icon_names=${materialSymbolIconNamesString}&display=block`\n\nexport type MaterialSymbolIconName = (typeof materialSymbolIconNames)[number]\n\nexport type MaterialSymbolProps = {\n name: MaterialSymbolIconName\n className?: string\n}\n\nconst MaterialSymbol = ({ name, className }: MaterialSymbolProps) => {\n if (!materialSymbolIconNames.includes(name)) {\n console.warn(\n `[MaterialSymbol] \"${name}\" isn't a recognized icon name — it will render as literal text, not an icon. See materialSymbolIconNames from '@epilot/spark-ui/icons' for the full set.`,\n )\n }\n\n return (\n <span\n aria-hidden=\"true\"\n className={cn(\n // !important: the Google Fonts stylesheet is unlayered (24px) and beats every layered\n // utility — callers size the icon via --spark-icon-size, not font-size classes\n 'material-symbols-rounded inline-block size-(length:--spark-icon-size,20px) shrink-0 overflow-hidden text-(length:--spark-icon-size,20px)! leading-none select-none',\n className,\n )}\n translate=\"no\"\n >\n {name}\n </span>\n )\n}\nMaterialSymbol.displayName = 'MaterialSymbol'\n\nexport { MaterialSymbol }\n"],"mappings":";;;;AAEA,MAAa,0BAA0B;CACrC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAEA,MAAa,gCAAgC,CAAC,GAAG,uBAAuB,EACrE,KAAK,EACL,KAAK,GAAG;AACX,MAAa,6BAA6B,+GAA+G,8BAA8B;AASvL,MAAM,kBAAkB,EAAE,MAAM,gBAAqC;CACnE,IAAI,CAAC,wBAAwB,SAAS,IAAI,GACxC,QAAQ,KACN,qBAAqB,KAAK,0JAC5B;CAGF,OACE,oBAAC,QAAD;EACE,eAAY;EACZ,WAAW,GAGT,sKACA,SACF;EACA,WAAU;YAET;CACG,CAAA;AAEV;AACA,eAAe,cAAc"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
//#region src/lib/message-animations.ts
|
|
4
|
+
const MESSAGE_ANIMATIONS = { "slide-up": {
|
|
5
|
+
id: "slide-up",
|
|
6
|
+
name: "Slide Up",
|
|
7
|
+
variants: {
|
|
8
|
+
initial: {
|
|
9
|
+
opacity: 0,
|
|
10
|
+
y: 10
|
|
11
|
+
},
|
|
12
|
+
animate: {
|
|
13
|
+
opacity: 1,
|
|
14
|
+
y: 0,
|
|
15
|
+
transition: {
|
|
16
|
+
duration: .26,
|
|
17
|
+
ease: [
|
|
18
|
+
.16,
|
|
19
|
+
1,
|
|
20
|
+
.3,
|
|
21
|
+
1
|
|
22
|
+
]
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
exit: {
|
|
26
|
+
opacity: 0,
|
|
27
|
+
y: 4,
|
|
28
|
+
transition: { duration: .15 }
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
} };
|
|
32
|
+
//#endregion
|
|
33
|
+
exports.MESSAGE_ANIMATIONS = MESSAGE_ANIMATIONS;
|
|
34
|
+
|
|
35
|
+
//# sourceMappingURL=message-animations.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"message-animations.cjs","names":[],"sources":["../../src/lib/message-animations.ts"],"sourcesContent":["import type { Variants } from 'motion/react'\n\nconst MESSAGE_ANIMATIONS = {\n 'slide-up': {\n id: 'slide-up',\n name: 'Slide Up',\n variants: {\n initial: { opacity: 0, y: 10 },\n animate: {\n opacity: 1,\n y: 0,\n transition: { duration: 0.26, ease: [0.16, 1, 0.3, 1] },\n },\n exit: { opacity: 0, y: 4, transition: { duration: 0.15 } },\n } satisfies Variants,\n },\n} as const\n\nexport { MESSAGE_ANIMATIONS }\n"],"mappings":";;;AAEA,MAAM,qBAAqB,EACzB,YAAY;CACV,IAAI;CACJ,MAAM;CACN,UAAU;EACR,SAAS;GAAE,SAAS;GAAG,GAAG;EAAG;EAC7B,SAAS;GACP,SAAS;GACT,GAAG;GACH,YAAY;IAAE,UAAU;IAAM,MAAM;KAAC;KAAM;KAAG;KAAK;IAAC;GAAE;EACxD;EACA,MAAM;GAAE,SAAS;GAAG,GAAG;GAAG,YAAY,EAAE,UAAU,IAAK;EAAE;CAC3D;AACF,EACF"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
//#region src/lib/message-animations.d.ts
|
|
4
|
+
declare const MESSAGE_ANIMATIONS: {
|
|
5
|
+
readonly 'slide-up': {
|
|
6
|
+
readonly id: "slide-up";
|
|
7
|
+
readonly name: "Slide Up";
|
|
8
|
+
readonly variants: {
|
|
9
|
+
initial: {
|
|
10
|
+
opacity: number;
|
|
11
|
+
y: number;
|
|
12
|
+
};
|
|
13
|
+
animate: {
|
|
14
|
+
opacity: number;
|
|
15
|
+
y: number;
|
|
16
|
+
transition: {
|
|
17
|
+
duration: number;
|
|
18
|
+
ease: [number, number, number, number];
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
exit: {
|
|
22
|
+
opacity: number;
|
|
23
|
+
y: number;
|
|
24
|
+
transition: {
|
|
25
|
+
duration: number;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
//#endregion
|
|
32
|
+
export { MESSAGE_ANIMATIONS };
|
|
33
|
+
//# sourceMappingURL=message-animations.d.cts.map
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
//#region src/lib/message-animations.d.ts
|
|
4
|
+
declare const MESSAGE_ANIMATIONS: {
|
|
5
|
+
readonly 'slide-up': {
|
|
6
|
+
readonly id: "slide-up";
|
|
7
|
+
readonly name: "Slide Up";
|
|
8
|
+
readonly variants: {
|
|
9
|
+
initial: {
|
|
10
|
+
opacity: number;
|
|
11
|
+
y: number;
|
|
12
|
+
};
|
|
13
|
+
animate: {
|
|
14
|
+
opacity: number;
|
|
15
|
+
y: number;
|
|
16
|
+
transition: {
|
|
17
|
+
duration: number;
|
|
18
|
+
ease: [number, number, number, number];
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
exit: {
|
|
22
|
+
opacity: number;
|
|
23
|
+
y: number;
|
|
24
|
+
transition: {
|
|
25
|
+
duration: number;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
//#endregion
|
|
32
|
+
export { MESSAGE_ANIMATIONS };
|
|
33
|
+
//# sourceMappingURL=message-animations.d.ts.map
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
//#region src/lib/message-animations.ts
|
|
3
|
+
const MESSAGE_ANIMATIONS = { "slide-up": {
|
|
4
|
+
id: "slide-up",
|
|
5
|
+
name: "Slide Up",
|
|
6
|
+
variants: {
|
|
7
|
+
initial: {
|
|
8
|
+
opacity: 0,
|
|
9
|
+
y: 10
|
|
10
|
+
},
|
|
11
|
+
animate: {
|
|
12
|
+
opacity: 1,
|
|
13
|
+
y: 0,
|
|
14
|
+
transition: {
|
|
15
|
+
duration: .26,
|
|
16
|
+
ease: [
|
|
17
|
+
.16,
|
|
18
|
+
1,
|
|
19
|
+
.3,
|
|
20
|
+
1
|
|
21
|
+
]
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
exit: {
|
|
25
|
+
opacity: 0,
|
|
26
|
+
y: 4,
|
|
27
|
+
transition: { duration: .15 }
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
} };
|
|
31
|
+
//#endregion
|
|
32
|
+
export { MESSAGE_ANIMATIONS };
|
|
33
|
+
|
|
34
|
+
//# sourceMappingURL=message-animations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"message-animations.js","names":[],"sources":["../../src/lib/message-animations.ts"],"sourcesContent":["import type { Variants } from 'motion/react'\n\nconst MESSAGE_ANIMATIONS = {\n 'slide-up': {\n id: 'slide-up',\n name: 'Slide Up',\n variants: {\n initial: { opacity: 0, y: 10 },\n animate: {\n opacity: 1,\n y: 0,\n transition: { duration: 0.26, ease: [0.16, 1, 0.3, 1] },\n },\n exit: { opacity: 0, y: 4, transition: { duration: 0.15 } },\n } satisfies Variants,\n },\n} as const\n\nexport { MESSAGE_ANIMATIONS }\n"],"mappings":";;AAEA,MAAM,qBAAqB,EACzB,YAAY;CACV,IAAI;CACJ,MAAM;CACN,UAAU;EACR,SAAS;GAAE,SAAS;GAAG,GAAG;EAAG;EAC7B,SAAS;GACP,SAAS;GACT,GAAG;GACH,YAAY;IAAE,UAAU;IAAM,MAAM;KAAC;KAAM;KAAG;KAAK;IAAC;GAAE;EACxD;EACA,MAAM;GAAE,SAAS;GAAG,GAAG;GAAG,YAAY,EAAE,UAAU,IAAK;EAAE;CAC3D;AACF,EACF"}
|
package/dist/styles/theme.css
CHANGED
|
@@ -581,8 +581,15 @@
|
|
|
581
581
|
|
|
582
582
|
:root,
|
|
583
583
|
.spark-theme {
|
|
584
|
-
/*
|
|
585
|
-
|
|
584
|
+
/*
|
|
585
|
+
* --spark-11, not Radix's --focus-8 nor step 10: steps 9/10 are solved to be
|
|
586
|
+
* solid fills, so their canvas contrast is incidental — over the 135-hex accent
|
|
587
|
+
* grid step 10 drops to 1.32:1 (light, warm accents) and 1.75:1 (dark, where it
|
|
588
|
+
* stays a dark fill). Step 11 is the accent *text* step, so the generator already
|
|
589
|
+
* solves it against the canvas: ≥4.24:1 light, ≥9.41:1 dark, clearing WCAG 1.4.11
|
|
590
|
+
* (3:1) for every accent in both appearances.
|
|
591
|
+
*/
|
|
592
|
+
--color-focus-root: var(--spark-11);
|
|
586
593
|
--color-selection-root: var(--spark-a5);
|
|
587
594
|
--color-autofill-root: var(--spark-a3);
|
|
588
595
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@epilot/spark-ui",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.3",
|
|
4
4
|
"description": "React UI component library from Spark SDK",
|
|
5
5
|
"homepage": "https://spark-ui.epilot.io/docs/ui",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -82,6 +82,7 @@
|
|
|
82
82
|
"@types/react": "^19.2.14",
|
|
83
83
|
"@types/react-dom": "^19.2.3",
|
|
84
84
|
"jsdom": "^29.1.1",
|
|
85
|
+
"motion": "^13.0.0",
|
|
85
86
|
"postcss": "^8.5.23",
|
|
86
87
|
"react": "^19.2.5",
|
|
87
88
|
"react-dom": "^19.2.5",
|
|
@@ -94,6 +95,7 @@
|
|
|
94
95
|
"vitest-axe": "^0.1.0"
|
|
95
96
|
},
|
|
96
97
|
"peerDependencies": {
|
|
98
|
+
"motion": "^13.0.0",
|
|
97
99
|
"react": ">=18.0.0",
|
|
98
100
|
"react-dom": ">=18.0.0",
|
|
99
101
|
"tailwindcss": ">=4.1.0",
|