@epicbagel/saas-kit 1.23.0 → 1.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-WE3F6EUM.cjs → chunk-KLBMHQ6U.cjs} +5 -1
- package/dist/{chunk-YFXZWDA5.js → chunk-M5BYOPDK.js} +5 -1
- package/dist/primitives/chat.cjs +3 -1
- package/dist/primitives/chat.js +3 -1
- package/dist/primitives/editable-list.cjs +27 -24
- package/dist/primitives/editable-list.js +27 -24
- package/dist/primitives/list.cjs +2 -2
- package/dist/primitives/list.js +1 -1
- package/package.json +1 -1
|
@@ -66,7 +66,11 @@ var ListItem = _react.forwardRef.call(void 0, function ListItem2({ className, la
|
|
|
66
66
|
radius === "md" && "rounded-md",
|
|
67
67
|
accent === "success" && "border-l-2 border-emerald-500 bg-emerald-500/5",
|
|
68
68
|
accent === "destructive" && "border-l-2 border-red-500 bg-red-500/5",
|
|
69
|
-
layout === "bullet" && "group flex
|
|
69
|
+
layout === "bullet" && "group flex items-start gap-3",
|
|
70
|
+
// A row with controls is as tall as they are, and a touch target on a
|
|
71
|
+
// touchscreen; a read-only row is just its text, so a brief's lists don't
|
|
72
|
+
// stand 44px apart on a phone.
|
|
73
|
+
layout === "bullet" && actions && "min-h-8 pointer-coarse:min-h-[max(44px,2.75rem)]",
|
|
70
74
|
className
|
|
71
75
|
), ...props, children: layout === "bullet" ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
72
76
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkW5I4FN7Gcjs.SentimentDot, { sentiment, className: "mt-[5px] shrink-0" }),
|
|
@@ -66,7 +66,11 @@ var ListItem = forwardRef(function ListItem2({ className, layout = "plain", sent
|
|
|
66
66
|
radius === "md" && "rounded-md",
|
|
67
67
|
accent === "success" && "border-l-2 border-emerald-500 bg-emerald-500/5",
|
|
68
68
|
accent === "destructive" && "border-l-2 border-red-500 bg-red-500/5",
|
|
69
|
-
layout === "bullet" && "group flex
|
|
69
|
+
layout === "bullet" && "group flex items-start gap-3",
|
|
70
|
+
// A row with controls is as tall as they are, and a touch target on a
|
|
71
|
+
// touchscreen; a read-only row is just its text, so a brief's lists don't
|
|
72
|
+
// stand 44px apart on a phone.
|
|
73
|
+
layout === "bullet" && actions && "min-h-8 pointer-coarse:min-h-[max(44px,2.75rem)]",
|
|
70
74
|
className
|
|
71
75
|
), ...props, children: layout === "bullet" ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
72
76
|
/* @__PURE__ */ jsx(SentimentDot, { sentiment, className: "mt-[5px] shrink-0" }),
|
package/dist/primitives/chat.cjs
CHANGED
|
@@ -520,7 +520,9 @@ function ChatInput({
|
|
|
520
520
|
// Grows with the text, then scrolls rather than pushing the thread away.
|
|
521
521
|
"leading-relaxed disabled:opacity-70 placeholder:text-sm",
|
|
522
522
|
!compact && "max-h-48",
|
|
523
|
-
|
|
523
|
+
// Compact: in from the rounded corner, the text starting where the + icon below it does
|
|
524
|
+
// (22px in at any root size: the bar's 0.5rem padding plus half of 44px less the 1rem icon).
|
|
525
|
+
compact ? "pb-1 pl-[22px] pr-4 pt-3.5" : spacious ? "px-6 pb-2 pt-6" : "px-4 py-3.5"
|
|
524
526
|
)
|
|
525
527
|
}
|
|
526
528
|
),
|
package/dist/primitives/chat.js
CHANGED
|
@@ -520,7 +520,9 @@ function ChatInput({
|
|
|
520
520
|
// Grows with the text, then scrolls rather than pushing the thread away.
|
|
521
521
|
"leading-relaxed disabled:opacity-70 placeholder:text-sm",
|
|
522
522
|
!compact && "max-h-48",
|
|
523
|
-
|
|
523
|
+
// Compact: in from the rounded corner, the text starting where the + icon below it does
|
|
524
|
+
// (22px in at any root size: the bar's 0.5rem padding plus half of 44px less the 1rem icon).
|
|
525
|
+
compact ? "pb-1 pl-[22px] pr-4 pt-3.5" : spacious ? "px-6 pb-2 pt-6" : "px-4 py-3.5"
|
|
524
526
|
)
|
|
525
527
|
}
|
|
526
528
|
),
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunkKLBMHQ6Ucjs = require('../chunk-KLBMHQ6U.cjs');
|
|
6
6
|
require('../chunk-W5I4FN7G.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
@@ -51,29 +51,32 @@ function EditableList({
|
|
|
51
51
|
};
|
|
52
52
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "section", { className: _chunkKWLSBTB2cjs.cn.call(void 0, "border-t border-border pt-4", className), children: [
|
|
53
53
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk373W6VADcjs.Text, { as: "span", variant: "caption", className: "text-xs font-medium uppercase tracking-wider", children: label }),
|
|
54
|
-
items.length === 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk373W6VADcjs.Text, { variant: "caption", className: "mt-3 italic", children: emptyText }) :
|
|
55
|
-
|
|
56
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
54
|
+
items.length === 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk373W6VADcjs.Text, { variant: "caption", className: "mt-3 italic", children: emptyText }) : (
|
|
55
|
+
// Read-only rows are just text, about 1.8em apart; editable rows keep room for their controls.
|
|
56
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKLBMHQ6Ucjs.List, { spacing: readOnly ? "tight" : "normal", className: "mt-3", children: items.map((item, index) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKLBMHQ6Ucjs.ListItem, { layout: "bullet", sentiment, actions: !readOnly && (_optionalChain([editing, 'optionalAccess', _5 => _5.index]) === index ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
57
|
+
/* @__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" }) }),
|
|
58
|
+
/* @__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" }) })
|
|
59
|
+
] }) : /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
60
|
+
/* @__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" }) }),
|
|
61
|
+
/* @__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" }) })
|
|
62
|
+
] })), children: !readOnly && _optionalChain([editing, 'optionalAccess', _6 => _6.index]) === index ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
63
|
+
_chunkPQUSJEXLcjs.Input,
|
|
64
|
+
{
|
|
65
|
+
autoFocus: true,
|
|
66
|
+
value: editing.value,
|
|
67
|
+
"aria-label": `Edit ${itemName}`,
|
|
68
|
+
onChange: (event) => setEditing({ index, value: event.target.value }),
|
|
69
|
+
onKeyDown: (event) => {
|
|
70
|
+
if (event.key === "Enter") {
|
|
71
|
+
event.preventDefault();
|
|
72
|
+
commitEdit();
|
|
73
|
+
}
|
|
74
|
+
if (event.key === "Escape") setEditing(null);
|
|
75
|
+
},
|
|
76
|
+
grow: true
|
|
77
|
+
}
|
|
78
|
+
) : item }, `${item}-${index}`)) })
|
|
79
|
+
),
|
|
77
80
|
!readOnly && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "mt-3 flex items-center gap-2", children: [
|
|
78
81
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
79
82
|
_chunkPQUSJEXLcjs.Input,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
List,
|
|
4
4
|
ListItem
|
|
5
|
-
} from "../chunk-
|
|
5
|
+
} from "../chunk-M5BYOPDK.js";
|
|
6
6
|
import "../chunk-YWAQRAXP.js";
|
|
7
7
|
import {
|
|
8
8
|
Text
|
|
@@ -51,29 +51,32 @@ function EditableList({
|
|
|
51
51
|
};
|
|
52
52
|
return /* @__PURE__ */ jsxs("section", { className: cn("border-t border-border pt-4", className), children: [
|
|
53
53
|
/* @__PURE__ */ jsx(Text, { as: "span", variant: "caption", className: "text-xs font-medium uppercase tracking-wider", children: label }),
|
|
54
|
-
items.length === 0 ? /* @__PURE__ */ jsx(Text, { variant: "caption", className: "mt-3 italic", children: emptyText }) :
|
|
55
|
-
|
|
56
|
-
/* @__PURE__ */ jsx(
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
54
|
+
items.length === 0 ? /* @__PURE__ */ jsx(Text, { variant: "caption", className: "mt-3 italic", children: emptyText }) : (
|
|
55
|
+
// Read-only rows are just text, about 1.8em apart; editable rows keep room for their controls.
|
|
56
|
+
/* @__PURE__ */ jsx(List, { spacing: readOnly ? "tight" : "normal", className: "mt-3", children: items.map((item, index) => /* @__PURE__ */ jsx(ListItem, { layout: "bullet", sentiment, actions: !readOnly && (editing?.index === index ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
57
|
+
/* @__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" }) }),
|
|
58
|
+
/* @__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" }) })
|
|
59
|
+
] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
60
|
+
/* @__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" }) }),
|
|
61
|
+
/* @__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" }) })
|
|
62
|
+
] })), children: !readOnly && editing?.index === index ? /* @__PURE__ */ jsx(
|
|
63
|
+
Input,
|
|
64
|
+
{
|
|
65
|
+
autoFocus: true,
|
|
66
|
+
value: editing.value,
|
|
67
|
+
"aria-label": `Edit ${itemName}`,
|
|
68
|
+
onChange: (event) => setEditing({ index, value: event.target.value }),
|
|
69
|
+
onKeyDown: (event) => {
|
|
70
|
+
if (event.key === "Enter") {
|
|
71
|
+
event.preventDefault();
|
|
72
|
+
commitEdit();
|
|
73
|
+
}
|
|
74
|
+
if (event.key === "Escape") setEditing(null);
|
|
75
|
+
},
|
|
76
|
+
grow: true
|
|
77
|
+
}
|
|
78
|
+
) : item }, `${item}-${index}`)) })
|
|
79
|
+
),
|
|
77
80
|
!readOnly && /* @__PURE__ */ jsxs("div", { className: "mt-3 flex items-center gap-2", children: [
|
|
78
81
|
/* @__PURE__ */ jsx(
|
|
79
82
|
Input,
|
package/dist/primitives/list.cjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunkKLBMHQ6Ucjs = require('../chunk-KLBMHQ6U.cjs');
|
|
6
6
|
require('../chunk-W5I4FN7G.cjs');
|
|
7
7
|
require('../chunk-373W6VAD.cjs');
|
|
8
8
|
require('../chunk-EJP2L5QV.cjs');
|
|
@@ -10,4 +10,4 @@ require('../chunk-KWLSBTB2.cjs');
|
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
exports.List =
|
|
13
|
+
exports.List = _chunkKLBMHQ6Ucjs.List; exports.ListItem = _chunkKLBMHQ6Ucjs.ListItem;
|
package/dist/primitives/list.js
CHANGED
package/package.json
CHANGED