@epicbagel/saas-kit 1.14.0 → 1.15.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.
@@ -0,0 +1,81 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
2
+
3
+
4
+ var _chunkW5I4FN7Gcjs = require('./chunk-W5I4FN7G.cjs');
5
+
6
+
7
+ var _chunk373W6VADcjs = require('./chunk-373W6VAD.cjs');
8
+
9
+
10
+ var _chunkKWLSBTB2cjs = require('./chunk-KWLSBTB2.cjs');
11
+
12
+ // src/primitives/list.tsx
13
+ var _react = require('react');
14
+ var _jsxruntime = require('react/jsx-runtime');
15
+ var spacingStyles = { none: "", tight: "space-y-1.5", normal: "space-y-3" };
16
+ var markerStyles = {
17
+ none: "list-none",
18
+ disc: "list-disc pl-5",
19
+ decimal: "list-decimal pl-5"
20
+ };
21
+ var List = _react.forwardRef.call(void 0, function List2({ ordered = false, spacing = "none", marker = "none", divided = false, inset = "none", guide = false, textSize = "inherit", tone = "inherit", marginTop = "none", surface = "none", radius = "none", className, ...props }, ref) {
22
+ const Component = ordered ? "ol" : "ul";
23
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
24
+ Component,
25
+ {
26
+ ref,
27
+ role: marker === "none" ? "list" : void 0,
28
+ className: _chunkKWLSBTB2cjs.cn.call(void 0,
29
+ spacingStyles[spacing],
30
+ markerStyles[marker],
31
+ divided && "divide-y divide-border",
32
+ inset === "xs" && "pl-1",
33
+ inset === "md" && "pl-4",
34
+ guide && "border-l border-border",
35
+ textSize === "xs" && "text-xs",
36
+ textSize === "sm" && "text-sm",
37
+ tone === "muted" && "text-muted-foreground",
38
+ tone === "soft" && "text-foreground/80",
39
+ marginTop === "sm" && "mt-2",
40
+ marginTop === "md" && "mt-4",
41
+ surface === "bordered" && "border border-border bg-background",
42
+ radius === "md" && "rounded-md",
43
+ className
44
+ ),
45
+ ...props
46
+ }
47
+ );
48
+ });
49
+ var ListItem = _react.forwardRef.call(void 0, function ListItem2({ className, layout = "plain", sentiment = "neutral", actions, children, surface = "none", padding = "none", textSize = "inherit", tone = "inherit", position = "static", justify = "start", align = "start", gap = "xs", interactiveGroup = false, radius = "none", accent = "none", ...props }, ref) {
50
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "li", { ref, className: _chunkKWLSBTB2cjs.cn.call(void 0,
51
+ layout === "row" && "flex items-start",
52
+ surface === "bordered" && "rounded-md border",
53
+ padding === "sm" && "p-2",
54
+ padding === "md" && "px-3 py-2",
55
+ padding === "compact" && "py-2.5",
56
+ textSize === "xs" && "text-xs",
57
+ textSize === "sm" && "text-sm",
58
+ tone === "soft" && "text-foreground/80",
59
+ position === "relative" && "relative",
60
+ justify === "between" && "justify-between gap-3",
61
+ align === "center" && "items-center",
62
+ align === "baseline" && "items-baseline",
63
+ gap === "xs" && "gap-1.5",
64
+ gap === "sm" && "gap-2",
65
+ interactiveGroup && "group",
66
+ radius === "md" && "rounded-md",
67
+ accent === "success" && "border-l-2 border-emerald-500 bg-emerald-500/5",
68
+ accent === "destructive" && "border-l-2 border-red-500 bg-red-500/5",
69
+ layout === "bullet" && "group flex min-h-8 items-start gap-3 pointer-coarse:min-h-[max(44px,2.75rem)]",
70
+ className
71
+ ), ...props, children: layout === "bullet" ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
72
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkW5I4FN7Gcjs.SentimentDot, { sentiment, className: "mt-[5px] shrink-0" }),
73
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk373W6VADcjs.Text, { as: "div", variant: "small", className: "min-w-0 flex-1 leading-snug [overflow-wrap:anywhere]", children }),
74
+ actions
75
+ ] }) : children });
76
+ });
77
+
78
+
79
+
80
+
81
+ exports.List = List; exports.ListItem = ListItem;
@@ -0,0 +1,81 @@
1
+ "use client";
2
+ import {
3
+ SentimentDot
4
+ } from "./chunk-YWAQRAXP.js";
5
+ import {
6
+ Text
7
+ } from "./chunk-EIY5LLSP.js";
8
+ import {
9
+ cn
10
+ } from "./chunk-G6SRSWXB.js";
11
+
12
+ // src/primitives/list.tsx
13
+ import { forwardRef } from "react";
14
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
15
+ var spacingStyles = { none: "", tight: "space-y-1.5", normal: "space-y-3" };
16
+ var markerStyles = {
17
+ none: "list-none",
18
+ disc: "list-disc pl-5",
19
+ decimal: "list-decimal pl-5"
20
+ };
21
+ var List = forwardRef(function List2({ ordered = false, spacing = "none", marker = "none", divided = false, inset = "none", guide = false, textSize = "inherit", tone = "inherit", marginTop = "none", surface = "none", radius = "none", className, ...props }, ref) {
22
+ const Component = ordered ? "ol" : "ul";
23
+ return /* @__PURE__ */ jsx(
24
+ Component,
25
+ {
26
+ ref,
27
+ role: marker === "none" ? "list" : void 0,
28
+ className: cn(
29
+ spacingStyles[spacing],
30
+ markerStyles[marker],
31
+ divided && "divide-y divide-border",
32
+ inset === "xs" && "pl-1",
33
+ inset === "md" && "pl-4",
34
+ guide && "border-l border-border",
35
+ textSize === "xs" && "text-xs",
36
+ textSize === "sm" && "text-sm",
37
+ tone === "muted" && "text-muted-foreground",
38
+ tone === "soft" && "text-foreground/80",
39
+ marginTop === "sm" && "mt-2",
40
+ marginTop === "md" && "mt-4",
41
+ surface === "bordered" && "border border-border bg-background",
42
+ radius === "md" && "rounded-md",
43
+ className
44
+ ),
45
+ ...props
46
+ }
47
+ );
48
+ });
49
+ var ListItem = forwardRef(function ListItem2({ className, layout = "plain", sentiment = "neutral", actions, children, surface = "none", padding = "none", textSize = "inherit", tone = "inherit", position = "static", justify = "start", align = "start", gap = "xs", interactiveGroup = false, radius = "none", accent = "none", ...props }, ref) {
50
+ return /* @__PURE__ */ jsx("li", { ref, className: cn(
51
+ layout === "row" && "flex items-start",
52
+ surface === "bordered" && "rounded-md border",
53
+ padding === "sm" && "p-2",
54
+ padding === "md" && "px-3 py-2",
55
+ padding === "compact" && "py-2.5",
56
+ textSize === "xs" && "text-xs",
57
+ textSize === "sm" && "text-sm",
58
+ tone === "soft" && "text-foreground/80",
59
+ position === "relative" && "relative",
60
+ justify === "between" && "justify-between gap-3",
61
+ align === "center" && "items-center",
62
+ align === "baseline" && "items-baseline",
63
+ gap === "xs" && "gap-1.5",
64
+ gap === "sm" && "gap-2",
65
+ interactiveGroup && "group",
66
+ radius === "md" && "rounded-md",
67
+ accent === "success" && "border-l-2 border-emerald-500 bg-emerald-500/5",
68
+ accent === "destructive" && "border-l-2 border-red-500 bg-red-500/5",
69
+ layout === "bullet" && "group flex min-h-8 items-start gap-3 pointer-coarse:min-h-[max(44px,2.75rem)]",
70
+ className
71
+ ), ...props, children: layout === "bullet" ? /* @__PURE__ */ jsxs(Fragment, { children: [
72
+ /* @__PURE__ */ jsx(SentimentDot, { sentiment, className: "mt-[5px] shrink-0" }),
73
+ /* @__PURE__ */ jsx(Text, { as: "div", variant: "small", className: "min-w-0 flex-1 leading-snug [overflow-wrap:anywhere]", children }),
74
+ actions
75
+ ] }) : children });
76
+ });
77
+
78
+ export {
79
+ List,
80
+ ListItem
81
+ };
@@ -4,7 +4,7 @@ import * as class_variance_authority_types from 'class-variance-authority/types'
4
4
  import { VariantProps } from 'class-variance-authority';
5
5
 
6
6
  declare const alertVariants: (props?: ({
7
- variant?: "default" | "destructive" | "success" | "warning" | null | undefined;
7
+ variant?: "success" | "default" | "destructive" | "warning" | null | undefined;
8
8
  } & class_variance_authority_types.ClassProp) | undefined) => string;
9
9
  interface AlertProps extends HTMLAttributes<HTMLDivElement>, VariantProps<typeof alertVariants> {
10
10
  marginBottom?: "none" | "md";
@@ -4,7 +4,7 @@ import * as class_variance_authority_types from 'class-variance-authority/types'
4
4
  import { VariantProps } from 'class-variance-authority';
5
5
 
6
6
  declare const alertVariants: (props?: ({
7
- variant?: "default" | "destructive" | "success" | "warning" | null | undefined;
7
+ variant?: "success" | "default" | "destructive" | "warning" | null | undefined;
8
8
  } & class_variance_authority_types.ClassProp) | undefined) => string;
9
9
  interface AlertProps extends HTMLAttributes<HTMLDivElement>, VariantProps<typeof alertVariants> {
10
10
  marginBottom?: "none" | "md";
@@ -4,7 +4,7 @@ import { VariantProps } from 'class-variance-authority';
4
4
  import { ElementType } from 'react';
5
5
 
6
6
  declare const badgeVariants: (props?: ({
7
- variant?: "default" | "secondary" | "destructive" | "outline" | "success" | "warning" | "error" | "info" | "neutral" | null | undefined;
7
+ variant?: "neutral" | "error" | "success" | "default" | "secondary" | "destructive" | "outline" | "warning" | "info" | null | undefined;
8
8
  } & class_variance_authority_types.ClassProp) | undefined) => string;
9
9
  interface BadgeProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
10
10
  weight?: "normal" | "semibold" | "bold";
@@ -4,7 +4,7 @@ import { VariantProps } from 'class-variance-authority';
4
4
  import { ElementType } from 'react';
5
5
 
6
6
  declare const badgeVariants: (props?: ({
7
- variant?: "default" | "secondary" | "destructive" | "outline" | "success" | "warning" | "error" | "info" | "neutral" | null | undefined;
7
+ variant?: "neutral" | "error" | "success" | "default" | "secondary" | "destructive" | "outline" | "warning" | "info" | null | undefined;
8
8
  } & class_variance_authority_types.ClassProp) | undefined) => string;
9
9
  interface BadgeProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
10
10
  weight?: "normal" | "semibold" | "bold";
@@ -5,7 +5,7 @@ import { VariantProps } from 'class-variance-authority';
5
5
 
6
6
  declare function BubbleGroup({ className, ...props }: React.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
7
7
  declare const bubbleVariants: (props?: ({
8
- variant?: "default" | "muted" | "secondary" | "destructive" | "outline" | "ghost" | "tinted" | null | undefined;
8
+ variant?: "default" | "muted" | "ghost" | "secondary" | "destructive" | "outline" | "tinted" | null | undefined;
9
9
  } & class_variance_authority_types.ClassProp) | undefined) => string;
10
10
  declare function Bubble({ variant, align, className, ...props }: React.ComponentProps<"div"> & VariantProps<typeof bubbleVariants> & {
11
11
  align?: "start" | "end";
@@ -5,7 +5,7 @@ import { VariantProps } from 'class-variance-authority';
5
5
 
6
6
  declare function BubbleGroup({ className, ...props }: React.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
7
7
  declare const bubbleVariants: (props?: ({
8
- variant?: "default" | "muted" | "secondary" | "destructive" | "outline" | "ghost" | "tinted" | null | undefined;
8
+ variant?: "default" | "muted" | "ghost" | "secondary" | "destructive" | "outline" | "tinted" | null | undefined;
9
9
  } & class_variance_authority_types.ClassProp) | undefined) => string;
10
10
  declare function Bubble({ variant, align, className, ...props }: React.ComponentProps<"div"> & VariantProps<typeof bubbleVariants> & {
11
11
  align?: "start" | "end";
@@ -4,8 +4,8 @@ import * as class_variance_authority_types from 'class-variance-authority/types'
4
4
  import { VariantProps } from 'class-variance-authority';
5
5
 
6
6
  declare const buttonVariants: (props?: ({
7
- variant?: "link" | "default" | "secondary" | "destructive" | "outline" | "outline-muted" | "ghost" | "quiet" | "ghost-destructive" | "link-muted" | "inverted" | "status-error" | "status-warning" | "status-muted" | null | undefined;
8
- size?: "filter" | "status" | "toolbar" | "sm" | "lg" | "default" | "micro" | "compact" | "hero" | "icon" | "icon-lg" | "icon-sm" | "icon-md" | "icon-xs" | "icon-compact" | "icon-micro" | "bare" | "voice-sm" | "voice" | "suggestion" | "tone" | null | undefined;
7
+ variant?: "link" | "default" | "ghost" | "secondary" | "destructive" | "outline" | "outline-muted" | "quiet" | "ghost-destructive" | "link-muted" | "inverted" | "status-error" | "status-warning" | "status-muted" | null | undefined;
8
+ size?: "filter" | "status" | "toolbar" | "sm" | "lg" | "default" | "micro" | "tone" | "compact" | "hero" | "icon" | "icon-lg" | "icon-sm" | "icon-md" | "icon-xs" | "icon-compact" | "icon-micro" | "bare" | "voice-sm" | "voice" | "suggestion" | null | undefined;
9
9
  width?: "auto" | "full" | "responsive" | null | undefined;
10
10
  align?: "center" | "start" | null | undefined;
11
11
  shrink?: boolean | null | undefined;
@@ -4,8 +4,8 @@ import * as class_variance_authority_types from 'class-variance-authority/types'
4
4
  import { VariantProps } from 'class-variance-authority';
5
5
 
6
6
  declare const buttonVariants: (props?: ({
7
- variant?: "link" | "default" | "secondary" | "destructive" | "outline" | "outline-muted" | "ghost" | "quiet" | "ghost-destructive" | "link-muted" | "inverted" | "status-error" | "status-warning" | "status-muted" | null | undefined;
8
- size?: "filter" | "status" | "toolbar" | "sm" | "lg" | "default" | "micro" | "compact" | "hero" | "icon" | "icon-lg" | "icon-sm" | "icon-md" | "icon-xs" | "icon-compact" | "icon-micro" | "bare" | "voice-sm" | "voice" | "suggestion" | "tone" | null | undefined;
7
+ variant?: "link" | "default" | "ghost" | "secondary" | "destructive" | "outline" | "outline-muted" | "quiet" | "ghost-destructive" | "link-muted" | "inverted" | "status-error" | "status-warning" | "status-muted" | null | undefined;
8
+ size?: "filter" | "status" | "toolbar" | "sm" | "lg" | "default" | "micro" | "tone" | "compact" | "hero" | "icon" | "icon-lg" | "icon-sm" | "icon-md" | "icon-xs" | "icon-compact" | "icon-micro" | "bare" | "voice-sm" | "voice" | "suggestion" | null | undefined;
9
9
  width?: "auto" | "full" | "responsive" | null | undefined;
10
10
  align?: "center" | "start" | null | undefined;
11
11
  shrink?: boolean | null | undefined;
@@ -1,7 +1,9 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }"use client";
2
2
 
3
3
 
4
- var _chunkW5I4FN7Gcjs = require('../chunk-W5I4FN7G.cjs');
4
+
5
+ var _chunkWE3F6EUMcjs = require('../chunk-WE3F6EUM.cjs');
6
+ require('../chunk-W5I4FN7G.cjs');
5
7
 
6
8
 
7
9
  var _chunk373W6VADcjs = require('../chunk-373W6VAD.cjs');
@@ -49,36 +51,29 @@ function EditableList({
49
51
  };
50
52
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "section", { className: _chunkKWLSBTB2cjs.cn.call(void 0, "border-t border-border pt-4", className), children: [
51
53
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk373W6VADcjs.Text, { as: "span", variant: "caption", className: "text-xs font-medium uppercase tracking-wider", children: label }),
52
- items.length === 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk373W6VADcjs.Text, { variant: "caption", className: "mt-3 italic", children: emptyText }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "ul", { className: "mt-3 space-y-3", children: items.map((item, index) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "li", { className: "group flex items-start gap-3", children: [
53
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkW5I4FN7Gcjs.SentimentDot, { sentiment, className: "mt-[5px] shrink-0" }),
54
- !readOnly && _optionalChain([editing, 'optionalAccess', _5 => _5.index]) === index ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
55
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
56
- _chunkPQUSJEXLcjs.Input,
57
- {
58
- autoFocus: true,
59
- value: editing.value,
60
- "aria-label": `Edit ${itemName}`,
61
- onChange: (event) => setEditing({ index, value: event.target.value }),
62
- onKeyDown: (event) => {
63
- if (event.key === "Enter") {
64
- event.preventDefault();
65
- commitEdit();
66
- }
67
- if (event.key === "Escape") setEditing(null);
68
- },
69
- grow: true
54
+ items.length === 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk373W6VADcjs.Text, { variant: "caption", className: "mt-3 italic", children: emptyText }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWE3F6EUMcjs.List, { spacing: "normal", className: "mt-3", children: items.map((item, index) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWE3F6EUMcjs.ListItem, { layout: "bullet", sentiment, actions: !readOnly && (_optionalChain([editing, 'optionalAccess', _5 => _5.index]) === index ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
55
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJDEXZGIYcjs.Button, { type: "button", variant: "ghost", size: "icon-sm", shrink: true, className: "text-emerald-600", "aria-label": `Save ${itemName}`, onClick: commitEdit, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Check, { className: "h-4 w-4" }) }),
56
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJDEXZGIYcjs.Button, { type: "button", variant: "quiet", size: "icon-sm", shrink: true, marginEnd: "negative-xs", "aria-label": `Cancel editing ${itemName}`, onClick: () => setEditing(null), children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.X, { className: "h-4 w-4" }) })
57
+ ] }) : /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
58
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJDEXZGIYcjs.Button, { type: "button", variant: "ghost", size: "icon", className: "h-8 w-8 shrink-0 text-muted-foreground opacity-0 transition-opacity group-hover:opacity-100 focus:opacity-100", "aria-label": `Edit ${itemName}`, onClick: () => setEditing({ index, value: item }), children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Pencil, { className: "h-4 w-4" }) }),
59
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJDEXZGIYcjs.Button, { type: "button", variant: "ghost", size: "icon", className: "-mr-1 h-8 w-8 shrink-0 text-muted-foreground opacity-0 transition-opacity group-hover:opacity-100 focus:opacity-100", "aria-label": `Remove ${itemName}`, onClick: () => onChange(items.filter((_, itemIndex) => itemIndex !== index)), children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.X, { className: "h-4 w-4" }) })
60
+ ] })), children: !readOnly && _optionalChain([editing, 'optionalAccess', _6 => _6.index]) === index ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
61
+ _chunkPQUSJEXLcjs.Input,
62
+ {
63
+ autoFocus: true,
64
+ value: editing.value,
65
+ "aria-label": `Edit ${itemName}`,
66
+ onChange: (event) => setEditing({ index, value: event.target.value }),
67
+ onKeyDown: (event) => {
68
+ if (event.key === "Enter") {
69
+ event.preventDefault();
70
+ commitEdit();
70
71
  }
71
- ),
72
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJDEXZGIYcjs.Button, { type: "button", variant: "ghost", size: "icon-sm", shrink: true, className: "text-emerald-600", "aria-label": `Save ${itemName}`, onClick: commitEdit, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Check, { className: "h-4 w-4" }) }),
73
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJDEXZGIYcjs.Button, { type: "button", variant: "quiet", size: "icon-sm", shrink: true, marginEnd: "negative-xs", "aria-label": `Cancel editing ${itemName}`, onClick: () => setEditing(null), children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.X, { className: "h-4 w-4" }) })
74
- ] }) : /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
75
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk373W6VADcjs.Text, { as: "span", variant: "small", className: "flex-1 leading-snug", children: item }),
76
- !readOnly && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
77
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJDEXZGIYcjs.Button, { type: "button", variant: "ghost", size: "icon", className: "h-8 w-8 shrink-0 text-muted-foreground opacity-0 transition-opacity group-hover:opacity-100 focus:opacity-100", "aria-label": `Edit ${itemName}`, onClick: () => setEditing({ index, value: item }), children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Pencil, { className: "h-4 w-4" }) }),
78
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJDEXZGIYcjs.Button, { type: "button", variant: "ghost", size: "icon", className: "-mr-1 h-8 w-8 shrink-0 text-muted-foreground opacity-0 transition-opacity group-hover:opacity-100 focus:opacity-100", "aria-label": `Remove ${itemName}`, onClick: () => onChange(items.filter((_, itemIndex) => itemIndex !== index)), children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.X, { className: "h-4 w-4" }) })
79
- ] })
80
- ] })
81
- ] }, `${item}-${index}`)) }),
72
+ if (event.key === "Escape") setEditing(null);
73
+ },
74
+ grow: true
75
+ }
76
+ ) : item }, `${item}-${index}`)) }),
82
77
  !readOnly && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "mt-3 flex items-center gap-2", children: [
83
78
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
84
79
  _chunkPQUSJEXLcjs.Input,
@@ -1,7 +1,9 @@
1
1
  "use client";
2
2
  import {
3
- SentimentDot
4
- } from "../chunk-YWAQRAXP.js";
3
+ List,
4
+ ListItem
5
+ } from "../chunk-YFXZWDA5.js";
6
+ import "../chunk-YWAQRAXP.js";
5
7
  import {
6
8
  Text
7
9
  } from "../chunk-EIY5LLSP.js";
@@ -49,36 +51,29 @@ function EditableList({
49
51
  };
50
52
  return /* @__PURE__ */ jsxs("section", { className: cn("border-t border-border pt-4", className), children: [
51
53
  /* @__PURE__ */ jsx(Text, { as: "span", variant: "caption", className: "text-xs font-medium uppercase tracking-wider", children: label }),
52
- items.length === 0 ? /* @__PURE__ */ jsx(Text, { variant: "caption", className: "mt-3 italic", children: emptyText }) : /* @__PURE__ */ jsx("ul", { className: "mt-3 space-y-3", children: items.map((item, index) => /* @__PURE__ */ jsxs("li", { className: "group flex items-start gap-3", children: [
53
- /* @__PURE__ */ jsx(SentimentDot, { sentiment, className: "mt-[5px] shrink-0" }),
54
- !readOnly && editing?.index === index ? /* @__PURE__ */ jsxs(Fragment, { children: [
55
- /* @__PURE__ */ jsx(
56
- Input,
57
- {
58
- autoFocus: true,
59
- value: editing.value,
60
- "aria-label": `Edit ${itemName}`,
61
- onChange: (event) => setEditing({ index, value: event.target.value }),
62
- onKeyDown: (event) => {
63
- if (event.key === "Enter") {
64
- event.preventDefault();
65
- commitEdit();
66
- }
67
- if (event.key === "Escape") setEditing(null);
68
- },
69
- grow: true
54
+ items.length === 0 ? /* @__PURE__ */ jsx(Text, { variant: "caption", className: "mt-3 italic", children: emptyText }) : /* @__PURE__ */ jsx(List, { spacing: "normal", className: "mt-3", children: items.map((item, index) => /* @__PURE__ */ jsx(ListItem, { layout: "bullet", sentiment, actions: !readOnly && (editing?.index === index ? /* @__PURE__ */ jsxs(Fragment, { children: [
55
+ /* @__PURE__ */ jsx(Button, { type: "button", variant: "ghost", size: "icon-sm", shrink: true, className: "text-emerald-600", "aria-label": `Save ${itemName}`, onClick: commitEdit, children: /* @__PURE__ */ jsx(Check, { className: "h-4 w-4" }) }),
56
+ /* @__PURE__ */ jsx(Button, { type: "button", variant: "quiet", size: "icon-sm", shrink: true, marginEnd: "negative-xs", "aria-label": `Cancel editing ${itemName}`, onClick: () => setEditing(null), children: /* @__PURE__ */ jsx(X, { className: "h-4 w-4" }) })
57
+ ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
58
+ /* @__PURE__ */ jsx(Button, { type: "button", variant: "ghost", size: "icon", className: "h-8 w-8 shrink-0 text-muted-foreground opacity-0 transition-opacity group-hover:opacity-100 focus:opacity-100", "aria-label": `Edit ${itemName}`, onClick: () => setEditing({ index, value: item }), children: /* @__PURE__ */ jsx(Pencil, { className: "h-4 w-4" }) }),
59
+ /* @__PURE__ */ jsx(Button, { type: "button", variant: "ghost", size: "icon", className: "-mr-1 h-8 w-8 shrink-0 text-muted-foreground opacity-0 transition-opacity group-hover:opacity-100 focus:opacity-100", "aria-label": `Remove ${itemName}`, onClick: () => onChange(items.filter((_, itemIndex) => itemIndex !== index)), children: /* @__PURE__ */ jsx(X, { className: "h-4 w-4" }) })
60
+ ] })), children: !readOnly && editing?.index === index ? /* @__PURE__ */ jsx(
61
+ Input,
62
+ {
63
+ autoFocus: true,
64
+ value: editing.value,
65
+ "aria-label": `Edit ${itemName}`,
66
+ onChange: (event) => setEditing({ index, value: event.target.value }),
67
+ onKeyDown: (event) => {
68
+ if (event.key === "Enter") {
69
+ event.preventDefault();
70
+ commitEdit();
70
71
  }
71
- ),
72
- /* @__PURE__ */ jsx(Button, { type: "button", variant: "ghost", size: "icon-sm", shrink: true, className: "text-emerald-600", "aria-label": `Save ${itemName}`, onClick: commitEdit, children: /* @__PURE__ */ jsx(Check, { className: "h-4 w-4" }) }),
73
- /* @__PURE__ */ jsx(Button, { type: "button", variant: "quiet", size: "icon-sm", shrink: true, marginEnd: "negative-xs", "aria-label": `Cancel editing ${itemName}`, onClick: () => setEditing(null), children: /* @__PURE__ */ jsx(X, { className: "h-4 w-4" }) })
74
- ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
75
- /* @__PURE__ */ jsx(Text, { as: "span", variant: "small", className: "flex-1 leading-snug", children: item }),
76
- !readOnly && /* @__PURE__ */ jsxs(Fragment, { children: [
77
- /* @__PURE__ */ jsx(Button, { type: "button", variant: "ghost", size: "icon", className: "h-8 w-8 shrink-0 text-muted-foreground opacity-0 transition-opacity group-hover:opacity-100 focus:opacity-100", "aria-label": `Edit ${itemName}`, onClick: () => setEditing({ index, value: item }), children: /* @__PURE__ */ jsx(Pencil, { className: "h-4 w-4" }) }),
78
- /* @__PURE__ */ jsx(Button, { type: "button", variant: "ghost", size: "icon", className: "-mr-1 h-8 w-8 shrink-0 text-muted-foreground opacity-0 transition-opacity group-hover:opacity-100 focus:opacity-100", "aria-label": `Remove ${itemName}`, onClick: () => onChange(items.filter((_, itemIndex) => itemIndex !== index)), children: /* @__PURE__ */ jsx(X, { className: "h-4 w-4" }) })
79
- ] })
80
- ] })
81
- ] }, `${item}-${index}`)) }),
72
+ if (event.key === "Escape") setEditing(null);
73
+ },
74
+ grow: true
75
+ }
76
+ ) : item }, `${item}-${index}`)) }),
82
77
  !readOnly && /* @__PURE__ */ jsxs("div", { className: "mt-3 flex items-center gap-2", children: [
83
78
  /* @__PURE__ */ jsx(
84
79
  Input,
@@ -1,68 +1,13 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
2
2
 
3
3
 
4
- var _chunkKWLSBTB2cjs = require('../chunk-KWLSBTB2.cjs');
5
4
 
6
- // src/primitives/list.tsx
7
- var _react = require('react');
8
- var _jsxruntime = require('react/jsx-runtime');
9
- var spacingStyles = { none: "", tight: "space-y-1.5", normal: "space-y-3" };
10
- var markerStyles = {
11
- none: "list-none",
12
- disc: "list-disc pl-5",
13
- decimal: "list-decimal pl-5"
14
- };
15
- var List = _react.forwardRef.call(void 0, function List2({ ordered = false, spacing = "none", marker = "none", divided = false, inset = "none", guide = false, textSize = "inherit", tone = "inherit", marginTop = "none", surface = "none", radius = "none", className, ...props }, ref) {
16
- const Component = ordered ? "ol" : "ul";
17
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
18
- Component,
19
- {
20
- ref,
21
- className: _chunkKWLSBTB2cjs.cn.call(void 0,
22
- spacingStyles[spacing],
23
- markerStyles[marker],
24
- divided && "divide-y divide-border",
25
- inset === "xs" && "pl-1",
26
- inset === "md" && "pl-4",
27
- guide && "border-l border-border",
28
- textSize === "xs" && "text-xs",
29
- textSize === "sm" && "text-sm",
30
- tone === "muted" && "text-muted-foreground",
31
- tone === "soft" && "text-foreground/80",
32
- marginTop === "sm" && "mt-2",
33
- marginTop === "md" && "mt-4",
34
- surface === "bordered" && "border border-border bg-background",
35
- radius === "md" && "rounded-md",
36
- className
37
- ),
38
- ...props
39
- }
40
- );
41
- });
42
- var ListItem = _react.forwardRef.call(void 0, function ListItem2({ className, layout = "plain", surface = "none", padding = "none", textSize = "inherit", tone = "inherit", position = "static", justify = "start", align = "start", gap = "xs", interactiveGroup = false, radius = "none", accent = "none", ...props }, ref) {
43
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "li", { ref, className: _chunkKWLSBTB2cjs.cn.call(void 0,
44
- layout === "row" && "flex items-start",
45
- surface === "bordered" && "rounded-md border",
46
- padding === "sm" && "p-2",
47
- padding === "md" && "px-3 py-2",
48
- padding === "compact" && "py-2.5",
49
- textSize === "xs" && "text-xs",
50
- textSize === "sm" && "text-sm",
51
- tone === "soft" && "text-foreground/80",
52
- position === "relative" && "relative",
53
- justify === "between" && "justify-between gap-3",
54
- align === "center" && "items-center",
55
- align === "baseline" && "items-baseline",
56
- gap === "xs" && "gap-1.5",
57
- gap === "sm" && "gap-2",
58
- interactiveGroup && "group",
59
- radius === "md" && "rounded-md",
60
- accent === "success" && "border-l-2 border-emerald-500 bg-emerald-500/5",
61
- accent === "destructive" && "border-l-2 border-red-500 bg-red-500/5",
62
- className
63
- ), ...props });
64
- });
5
+ var _chunkWE3F6EUMcjs = require('../chunk-WE3F6EUM.cjs');
6
+ require('../chunk-W5I4FN7G.cjs');
7
+ require('../chunk-373W6VAD.cjs');
8
+ require('../chunk-EJP2L5QV.cjs');
9
+ require('../chunk-KWLSBTB2.cjs');
65
10
 
66
11
 
67
12
 
68
- exports.List = List; exports.ListItem = ListItem;
13
+ exports.List = _chunkWE3F6EUMcjs.List; exports.ListItem = _chunkWE3F6EUMcjs.ListItem;
@@ -1,5 +1,8 @@
1
1
  import * as React from 'react';
2
- import { HTMLAttributes } from 'react';
2
+ import { HTMLAttributes, ReactNode } from 'react';
3
+ import { Sentiment } from './sentiment-dot.cjs';
4
+ import 'react/jsx-runtime';
5
+ import '../lib/status-colors.cjs';
3
6
 
4
7
  interface ListProps extends HTMLAttributes<HTMLUListElement | HTMLOListElement> {
5
8
  ordered?: boolean;
@@ -17,7 +20,11 @@ interface ListProps extends HTMLAttributes<HTMLUListElement | HTMLOListElement>
17
20
  /** Semantic ordered or unordered list with controlled rhythm and markers. */
18
21
  declare const List: React.ForwardRefExoticComponent<ListProps & React.RefAttributes<HTMLOListElement | HTMLUListElement>>;
19
22
  interface ListItemProps extends HTMLAttributes<HTMLLIElement> {
20
- layout?: "plain" | "row";
23
+ layout?: "plain" | "row" | "bullet";
24
+ /** A semantic dot with consistent spacing and wrapping in the bullet layout. */
25
+ sentiment?: Sentiment;
26
+ /** Trailing controls for a bullet row; the content keeps the same alignment without them. */
27
+ actions?: ReactNode;
21
28
  surface?: "none" | "bordered";
22
29
  padding?: "none" | "sm" | "compact" | "md";
23
30
  textSize?: "inherit" | "xs" | "sm";
@@ -1,5 +1,8 @@
1
1
  import * as React from 'react';
2
- import { HTMLAttributes } from 'react';
2
+ import { HTMLAttributes, ReactNode } from 'react';
3
+ import { Sentiment } from './sentiment-dot.js';
4
+ import 'react/jsx-runtime';
5
+ import '../lib/status-colors.js';
3
6
 
4
7
  interface ListProps extends HTMLAttributes<HTMLUListElement | HTMLOListElement> {
5
8
  ordered?: boolean;
@@ -17,7 +20,11 @@ interface ListProps extends HTMLAttributes<HTMLUListElement | HTMLOListElement>
17
20
  /** Semantic ordered or unordered list with controlled rhythm and markers. */
18
21
  declare const List: React.ForwardRefExoticComponent<ListProps & React.RefAttributes<HTMLOListElement | HTMLUListElement>>;
19
22
  interface ListItemProps extends HTMLAttributes<HTMLLIElement> {
20
- layout?: "plain" | "row";
23
+ layout?: "plain" | "row" | "bullet";
24
+ /** A semantic dot with consistent spacing and wrapping in the bullet layout. */
25
+ sentiment?: Sentiment;
26
+ /** Trailing controls for a bullet row; the content keeps the same alignment without them. */
27
+ actions?: ReactNode;
21
28
  surface?: "none" | "bordered";
22
29
  padding?: "none" | "sm" | "compact" | "md";
23
30
  textSize?: "inherit" | "xs" | "sm";
@@ -1,67 +1,12 @@
1
1
  "use client";
2
2
  import {
3
- cn
4
- } from "../chunk-G6SRSWXB.js";
5
-
6
- // src/primitives/list.tsx
7
- import { forwardRef } from "react";
8
- import { jsx } from "react/jsx-runtime";
9
- var spacingStyles = { none: "", tight: "space-y-1.5", normal: "space-y-3" };
10
- var markerStyles = {
11
- none: "list-none",
12
- disc: "list-disc pl-5",
13
- decimal: "list-decimal pl-5"
14
- };
15
- var List = forwardRef(function List2({ ordered = false, spacing = "none", marker = "none", divided = false, inset = "none", guide = false, textSize = "inherit", tone = "inherit", marginTop = "none", surface = "none", radius = "none", className, ...props }, ref) {
16
- const Component = ordered ? "ol" : "ul";
17
- return /* @__PURE__ */ jsx(
18
- Component,
19
- {
20
- ref,
21
- className: cn(
22
- spacingStyles[spacing],
23
- markerStyles[marker],
24
- divided && "divide-y divide-border",
25
- inset === "xs" && "pl-1",
26
- inset === "md" && "pl-4",
27
- guide && "border-l border-border",
28
- textSize === "xs" && "text-xs",
29
- textSize === "sm" && "text-sm",
30
- tone === "muted" && "text-muted-foreground",
31
- tone === "soft" && "text-foreground/80",
32
- marginTop === "sm" && "mt-2",
33
- marginTop === "md" && "mt-4",
34
- surface === "bordered" && "border border-border bg-background",
35
- radius === "md" && "rounded-md",
36
- className
37
- ),
38
- ...props
39
- }
40
- );
41
- });
42
- var ListItem = forwardRef(function ListItem2({ className, layout = "plain", surface = "none", padding = "none", textSize = "inherit", tone = "inherit", position = "static", justify = "start", align = "start", gap = "xs", interactiveGroup = false, radius = "none", accent = "none", ...props }, ref) {
43
- return /* @__PURE__ */ jsx("li", { ref, className: cn(
44
- layout === "row" && "flex items-start",
45
- surface === "bordered" && "rounded-md border",
46
- padding === "sm" && "p-2",
47
- padding === "md" && "px-3 py-2",
48
- padding === "compact" && "py-2.5",
49
- textSize === "xs" && "text-xs",
50
- textSize === "sm" && "text-sm",
51
- tone === "soft" && "text-foreground/80",
52
- position === "relative" && "relative",
53
- justify === "between" && "justify-between gap-3",
54
- align === "center" && "items-center",
55
- align === "baseline" && "items-baseline",
56
- gap === "xs" && "gap-1.5",
57
- gap === "sm" && "gap-2",
58
- interactiveGroup && "group",
59
- radius === "md" && "rounded-md",
60
- accent === "success" && "border-l-2 border-emerald-500 bg-emerald-500/5",
61
- accent === "destructive" && "border-l-2 border-red-500 bg-red-500/5",
62
- className
63
- ), ...props });
64
- });
3
+ List,
4
+ ListItem
5
+ } from "../chunk-YFXZWDA5.js";
6
+ import "../chunk-YWAQRAXP.js";
7
+ import "../chunk-EIY5LLSP.js";
8
+ import "../chunk-F7JHSZNT.js";
9
+ import "../chunk-G6SRSWXB.js";
65
10
  export {
66
11
  List,
67
12
  ListItem
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epicbagel/saas-kit",
3
- "version": "1.14.0",
3
+ "version": "1.15.0",
4
4
  "description": "Accessible React primitives, layout components and design tokens for SaaS apps, built on Radix UI and Tailwind CSS v4.",
5
5
  "license": "MIT",
6
6
  "keywords": [