@lukeashford/aurelius 2.1.0 → 2.2.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/index.d.mts +81 -1
- package/dist/index.d.ts +81 -1
- package/dist/index.js +475 -21
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +459 -14
- package/dist/index.mjs.map +1 -1
- package/dist/styles/base.css +4 -0
- package/dist/styles/prose.css +61 -0
- package/dist/styles/theme.css +85 -19
- package/llms.md +11 -2
- package/package.json +14 -4
- package/scripts/eslint.mjs +127 -117
package/dist/index.js
CHANGED
|
@@ -33,17 +33,26 @@ __export(index_exports, {
|
|
|
33
33
|
Alert: () => Alert,
|
|
34
34
|
Avatar: () => Avatar,
|
|
35
35
|
Badge: () => Badge,
|
|
36
|
+
BrandIcon: () => BrandIcon,
|
|
36
37
|
Button: () => Button,
|
|
37
38
|
Card: () => Card,
|
|
39
|
+
ChatHistory: () => ChatHistory,
|
|
38
40
|
Checkbox: () => Checkbox,
|
|
41
|
+
ColorSwatch: () => ColorSwatch,
|
|
39
42
|
HelperText: () => HelperText,
|
|
43
|
+
ImageCard: () => ImageCard,
|
|
40
44
|
Input: () => Input,
|
|
41
45
|
Label: () => Label,
|
|
46
|
+
MarkdownContent: () => MarkdownContent,
|
|
47
|
+
Message: () => Message,
|
|
42
48
|
Modal: () => Modal,
|
|
43
49
|
Radio: () => Radio,
|
|
50
|
+
SectionHeading: () => SectionHeading,
|
|
44
51
|
Select: () => Select,
|
|
45
52
|
Skeleton: () => Skeleton,
|
|
46
53
|
Spinner: () => Spinner,
|
|
54
|
+
Stepper: () => Stepper,
|
|
55
|
+
StreamingCursor: () => StreamingCursor,
|
|
47
56
|
Switch: () => Switch,
|
|
48
57
|
Textarea: () => Textarea,
|
|
49
58
|
Tooltip: () => Tooltip,
|
|
@@ -127,28 +136,40 @@ Input.displayName = "Input";
|
|
|
127
136
|
|
|
128
137
|
// src/components/Card.tsx
|
|
129
138
|
var import_react3 = __toESM(require("react"));
|
|
139
|
+
var import_lucide_react = require("lucide-react");
|
|
140
|
+
var VARIANT_STYLES = {
|
|
141
|
+
default: "bg-charcoal shadow-sm border border-gold/30",
|
|
142
|
+
elevated: "bg-charcoal shadow-lg border-0",
|
|
143
|
+
outlined: "bg-charcoal shadow-none border border-ash",
|
|
144
|
+
ghost: "bg-transparent shadow-none border-0",
|
|
145
|
+
featured: "bg-charcoal border border-gold shadow-glow-sm"
|
|
146
|
+
};
|
|
130
147
|
function cx3(...classes) {
|
|
131
148
|
return classes.filter(Boolean).join(" ");
|
|
132
149
|
}
|
|
133
150
|
var Card = import_react3.default.forwardRef(
|
|
134
|
-
({ variant = "default", interactive = false, className, ...
|
|
135
|
-
const base = "rounded-none p-6";
|
|
136
|
-
const variantClasses = {
|
|
137
|
-
default: "bg-charcoal shadow-sm border border-gold/30",
|
|
138
|
-
elevated: "bg-charcoal shadow-lg border-0",
|
|
139
|
-
outlined: "bg-charcoal shadow-none border border-ash",
|
|
140
|
-
ghost: "bg-transparent shadow-none border-0",
|
|
141
|
-
featured: "bg-charcoal border border-gold shadow-[0_0_10px_rgba(201,162,39,0.2)]"
|
|
142
|
-
};
|
|
143
|
-
const interactiveClass = interactive ? "transition-all duration-200 hover:border-gold hover:shadow-glow cursor-pointer" : "";
|
|
144
|
-
const variantClass = variantClasses[variant];
|
|
151
|
+
({ variant = "default", interactive = false, selected = false, className, children, ...props }, ref) => {
|
|
145
152
|
return /* @__PURE__ */ import_react3.default.createElement(
|
|
146
153
|
"div",
|
|
147
154
|
{
|
|
148
155
|
ref,
|
|
149
|
-
className: cx3(
|
|
150
|
-
|
|
151
|
-
|
|
156
|
+
className: cx3(
|
|
157
|
+
"rounded-none p-6 relative",
|
|
158
|
+
VARIANT_STYLES[variant],
|
|
159
|
+
interactive && "transition-all duration-200 hover:border-gold hover:shadow-glow cursor-pointer",
|
|
160
|
+
selected && "border-gold shadow-glow-md",
|
|
161
|
+
className
|
|
162
|
+
),
|
|
163
|
+
...props
|
|
164
|
+
},
|
|
165
|
+
children,
|
|
166
|
+
selected && /* @__PURE__ */ import_react3.default.createElement(
|
|
167
|
+
"div",
|
|
168
|
+
{
|
|
169
|
+
className: "absolute top-3 right-3 flex items-center justify-center h-6 w-6 rounded-full bg-gold text-obsidian"
|
|
170
|
+
},
|
|
171
|
+
/* @__PURE__ */ import_react3.default.createElement(import_lucide_react.Check, { className: "h-4 w-4" })
|
|
172
|
+
)
|
|
152
173
|
);
|
|
153
174
|
}
|
|
154
175
|
);
|
|
@@ -543,15 +564,15 @@ Switch.displayName = "Switch";
|
|
|
543
564
|
|
|
544
565
|
// src/components/Alert.tsx
|
|
545
566
|
var import_react14 = __toESM(require("react"));
|
|
546
|
-
var
|
|
567
|
+
var import_lucide_react2 = require("lucide-react");
|
|
547
568
|
function cx14(...classes) {
|
|
548
569
|
return classes.filter(Boolean).join(" ");
|
|
549
570
|
}
|
|
550
571
|
var icons = {
|
|
551
|
-
info:
|
|
552
|
-
success:
|
|
553
|
-
warning:
|
|
554
|
-
error:
|
|
572
|
+
info: import_lucide_react2.Info,
|
|
573
|
+
success: import_lucide_react2.CheckCircle,
|
|
574
|
+
warning: import_lucide_react2.AlertTriangle,
|
|
575
|
+
error: import_lucide_react2.XCircle
|
|
555
576
|
};
|
|
556
577
|
var variantStyles = {
|
|
557
578
|
info: "bg-info/10 border-info text-info",
|
|
@@ -628,7 +649,7 @@ Skeleton.displayName = "Skeleton";
|
|
|
628
649
|
// src/components/Modal.tsx
|
|
629
650
|
var import_react17 = __toESM(require("react"));
|
|
630
651
|
var import_react_dom = require("react-dom");
|
|
631
|
-
var
|
|
652
|
+
var import_lucide_react3 = require("lucide-react");
|
|
632
653
|
function cx17(...classes) {
|
|
633
654
|
return classes.filter(Boolean).join(" ");
|
|
634
655
|
}
|
|
@@ -672,13 +693,437 @@ var Modal = ({ isOpen, onClose, title, children, className }) => {
|
|
|
672
693
|
"data-state": "open",
|
|
673
694
|
onClick: (e) => e.stopPropagation()
|
|
674
695
|
},
|
|
675
|
-
/* @__PURE__ */ import_react17.default.createElement("div", { className: "flex items-center justify-between mb-2" }, title ? /* @__PURE__ */ import_react17.default.createElement("h3", { className: "text-xl font-semibold text-white m-0" }, title) : /* @__PURE__ */ import_react17.default.createElement("div", null), /* @__PURE__ */ import_react17.default.createElement("button", { onClick: onClose, className: "text-silver hover:text-white transition-colors ml-auto" }, /* @__PURE__ */ import_react17.default.createElement(
|
|
696
|
+
/* @__PURE__ */ import_react17.default.createElement("div", { className: "flex items-center justify-between mb-2" }, title ? /* @__PURE__ */ import_react17.default.createElement("h3", { className: "text-xl font-semibold text-white m-0" }, title) : /* @__PURE__ */ import_react17.default.createElement("div", null), /* @__PURE__ */ import_react17.default.createElement("button", { onClick: onClose, className: "text-silver hover:text-white transition-colors ml-auto" }, /* @__PURE__ */ import_react17.default.createElement(import_lucide_react3.X, { className: "h-5 w-5" }), /* @__PURE__ */ import_react17.default.createElement("span", { className: "sr-only" }, "Close"))),
|
|
676
697
|
/* @__PURE__ */ import_react17.default.createElement("div", null, children)
|
|
677
698
|
));
|
|
678
699
|
return (0, import_react_dom.createPortal)(content, document.body);
|
|
679
700
|
};
|
|
680
701
|
Modal.displayName = "Modal";
|
|
681
702
|
|
|
703
|
+
// src/components/Stepper.tsx
|
|
704
|
+
var import_react18 = __toESM(require("react"));
|
|
705
|
+
var import_lucide_react4 = require("lucide-react");
|
|
706
|
+
function cx18(...classes) {
|
|
707
|
+
return classes.filter(Boolean).join(" ");
|
|
708
|
+
}
|
|
709
|
+
var Stepper = import_react18.default.forwardRef(
|
|
710
|
+
({ steps, currentStep, status, className, ...rest }, ref) => {
|
|
711
|
+
const currentIndex = steps.findIndex((step) => step.id === currentStep);
|
|
712
|
+
const getStepState = (index) => {
|
|
713
|
+
if (index < currentIndex) {
|
|
714
|
+
return "complete";
|
|
715
|
+
}
|
|
716
|
+
if (index === currentIndex) {
|
|
717
|
+
return status || "current";
|
|
718
|
+
}
|
|
719
|
+
return "future";
|
|
720
|
+
};
|
|
721
|
+
return /* @__PURE__ */ import_react18.default.createElement(
|
|
722
|
+
"div",
|
|
723
|
+
{
|
|
724
|
+
ref,
|
|
725
|
+
className: cx18("flex items-center w-full", className),
|
|
726
|
+
...rest
|
|
727
|
+
},
|
|
728
|
+
steps.map((step, index) => {
|
|
729
|
+
const state = getStepState(index);
|
|
730
|
+
const isLast = index === steps.length - 1;
|
|
731
|
+
return /* @__PURE__ */ import_react18.default.createElement(import_react18.default.Fragment, { key: step.id }, /* @__PURE__ */ import_react18.default.createElement("div", { className: "flex flex-col items-center" }, /* @__PURE__ */ import_react18.default.createElement(
|
|
732
|
+
"div",
|
|
733
|
+
{
|
|
734
|
+
className: cx18(
|
|
735
|
+
"flex items-center justify-center w-10 h-10 rounded-full border-2 font-semibold text-sm transition-all duration-200",
|
|
736
|
+
state === "complete" && "bg-gold border-gold text-obsidian",
|
|
737
|
+
state === "current" && "bg-charcoal border-gold text-gold",
|
|
738
|
+
state === "error" && "bg-error border-error text-white",
|
|
739
|
+
state === "future" && "bg-charcoal border-ash text-silver"
|
|
740
|
+
)
|
|
741
|
+
},
|
|
742
|
+
state === "complete" ? /* @__PURE__ */ import_react18.default.createElement(import_lucide_react4.Check, { className: "h-5 w-5" }) : /* @__PURE__ */ import_react18.default.createElement("span", null, index + 1)
|
|
743
|
+
), /* @__PURE__ */ import_react18.default.createElement(
|
|
744
|
+
"span",
|
|
745
|
+
{
|
|
746
|
+
className: cx18(
|
|
747
|
+
"mt-2 text-xs font-medium",
|
|
748
|
+
state === "complete" && "text-gold",
|
|
749
|
+
state === "current" && "text-white",
|
|
750
|
+
state === "error" && "text-error",
|
|
751
|
+
state === "future" && "text-silver"
|
|
752
|
+
)
|
|
753
|
+
},
|
|
754
|
+
step.label
|
|
755
|
+
)), !isLast && /* @__PURE__ */ import_react18.default.createElement(
|
|
756
|
+
"div",
|
|
757
|
+
{
|
|
758
|
+
className: cx18(
|
|
759
|
+
"flex-1 h-0.5 mx-4 transition-all duration-200",
|
|
760
|
+
index < currentIndex ? "bg-gold" : "bg-ash"
|
|
761
|
+
)
|
|
762
|
+
}
|
|
763
|
+
));
|
|
764
|
+
})
|
|
765
|
+
);
|
|
766
|
+
}
|
|
767
|
+
);
|
|
768
|
+
Stepper.displayName = "Stepper";
|
|
769
|
+
|
|
770
|
+
// src/components/Message.tsx
|
|
771
|
+
var import_react21 = __toESM(require("react"));
|
|
772
|
+
|
|
773
|
+
// src/components/MarkdownContent.tsx
|
|
774
|
+
var import_react19 = __toESM(require("react"));
|
|
775
|
+
var import_dompurify = __toESM(require("dompurify"));
|
|
776
|
+
function cx19(...classes) {
|
|
777
|
+
return classes.filter(Boolean).join(" ");
|
|
778
|
+
}
|
|
779
|
+
var DEFAULT_SANITIZE_CONFIG = {
|
|
780
|
+
ALLOWED_TAGS: [
|
|
781
|
+
"h1",
|
|
782
|
+
"h2",
|
|
783
|
+
"h3",
|
|
784
|
+
"h4",
|
|
785
|
+
"h5",
|
|
786
|
+
"h6",
|
|
787
|
+
"p",
|
|
788
|
+
"br",
|
|
789
|
+
"hr",
|
|
790
|
+
"strong",
|
|
791
|
+
"b",
|
|
792
|
+
"em",
|
|
793
|
+
"i",
|
|
794
|
+
"u",
|
|
795
|
+
"s",
|
|
796
|
+
"strike",
|
|
797
|
+
"del",
|
|
798
|
+
"ins",
|
|
799
|
+
"sup",
|
|
800
|
+
"sub",
|
|
801
|
+
"mark",
|
|
802
|
+
"small",
|
|
803
|
+
"ul",
|
|
804
|
+
"ol",
|
|
805
|
+
"li",
|
|
806
|
+
"a",
|
|
807
|
+
"code",
|
|
808
|
+
"pre",
|
|
809
|
+
"kbd",
|
|
810
|
+
"samp",
|
|
811
|
+
"var",
|
|
812
|
+
"blockquote",
|
|
813
|
+
"q",
|
|
814
|
+
"cite",
|
|
815
|
+
"abbr",
|
|
816
|
+
"table",
|
|
817
|
+
"thead",
|
|
818
|
+
"tbody",
|
|
819
|
+
"tfoot",
|
|
820
|
+
"tr",
|
|
821
|
+
"th",
|
|
822
|
+
"td",
|
|
823
|
+
"caption",
|
|
824
|
+
"colgroup",
|
|
825
|
+
"col",
|
|
826
|
+
"div",
|
|
827
|
+
"span",
|
|
828
|
+
"details",
|
|
829
|
+
"summary"
|
|
830
|
+
],
|
|
831
|
+
ALLOWED_ATTR: [
|
|
832
|
+
"href",
|
|
833
|
+
"title",
|
|
834
|
+
"target",
|
|
835
|
+
"rel",
|
|
836
|
+
"class",
|
|
837
|
+
"id",
|
|
838
|
+
"colspan",
|
|
839
|
+
"rowspan",
|
|
840
|
+
"scope",
|
|
841
|
+
"open"
|
|
842
|
+
],
|
|
843
|
+
ADD_ATTR: ["target", "rel"],
|
|
844
|
+
ALLOWED_URI_REGEXP: /^(?:(?:https?|mailto|tel):|[^a-z]|[a-z+.-]+(?:[^a-z+.\-:]|$))/i
|
|
845
|
+
};
|
|
846
|
+
function useDOMPurifySetup() {
|
|
847
|
+
(0, import_react19.useMemo)(() => {
|
|
848
|
+
import_dompurify.default.addHook("afterSanitizeAttributes", (node) => {
|
|
849
|
+
if (node.tagName === "A") {
|
|
850
|
+
node.setAttribute("target", "_blank");
|
|
851
|
+
node.setAttribute("rel", "noopener noreferrer");
|
|
852
|
+
}
|
|
853
|
+
});
|
|
854
|
+
}, []);
|
|
855
|
+
}
|
|
856
|
+
var MarkdownContent = import_react19.default.forwardRef(
|
|
857
|
+
({ className, content, sanitizeConfig, ...rest }, ref) => {
|
|
858
|
+
useDOMPurifySetup();
|
|
859
|
+
const sanitizedHtml = (0, import_react19.useMemo)(() => {
|
|
860
|
+
if (!content) {
|
|
861
|
+
return "";
|
|
862
|
+
}
|
|
863
|
+
const config = sanitizeConfig ?? DEFAULT_SANITIZE_CONFIG;
|
|
864
|
+
return import_dompurify.default.sanitize(content, config);
|
|
865
|
+
}, [content, sanitizeConfig]);
|
|
866
|
+
return /* @__PURE__ */ import_react19.default.createElement(
|
|
867
|
+
"div",
|
|
868
|
+
{
|
|
869
|
+
ref,
|
|
870
|
+
className: cx19("prose", className),
|
|
871
|
+
dangerouslySetInnerHTML: { __html: sanitizedHtml },
|
|
872
|
+
...rest
|
|
873
|
+
}
|
|
874
|
+
);
|
|
875
|
+
}
|
|
876
|
+
);
|
|
877
|
+
MarkdownContent.displayName = "MarkdownContent";
|
|
878
|
+
|
|
879
|
+
// src/components/StreamingCursor.tsx
|
|
880
|
+
var import_react20 = __toESM(require("react"));
|
|
881
|
+
function cx20(...classes) {
|
|
882
|
+
return classes.filter(Boolean).join(" ");
|
|
883
|
+
}
|
|
884
|
+
var StreamingCursor = import_react20.default.forwardRef(
|
|
885
|
+
({ className, variant = "line", ...rest }, ref) => {
|
|
886
|
+
const variantStyles3 = {
|
|
887
|
+
block: "w-2.5 h-cursor translate-y-cursor-offset",
|
|
888
|
+
line: "w-0.5 h-cursor translate-y-cursor-offset",
|
|
889
|
+
underscore: "w-2.5 h-0.5 self-end mb-0.5"
|
|
890
|
+
};
|
|
891
|
+
return /* @__PURE__ */ import_react20.default.createElement(
|
|
892
|
+
"span",
|
|
893
|
+
{
|
|
894
|
+
ref,
|
|
895
|
+
className: cx20(
|
|
896
|
+
"inline-block bg-current animate-cursor-blink",
|
|
897
|
+
variantStyles3[variant],
|
|
898
|
+
className
|
|
899
|
+
),
|
|
900
|
+
"aria-hidden": "true",
|
|
901
|
+
...rest
|
|
902
|
+
}
|
|
903
|
+
);
|
|
904
|
+
}
|
|
905
|
+
);
|
|
906
|
+
StreamingCursor.displayName = "StreamingCursor";
|
|
907
|
+
|
|
908
|
+
// src/components/Message.tsx
|
|
909
|
+
function cx21(...classes) {
|
|
910
|
+
return classes.filter(Boolean).join(" ");
|
|
911
|
+
}
|
|
912
|
+
var variantStyles2 = {
|
|
913
|
+
user: "bg-gold text-obsidian ml-auto",
|
|
914
|
+
assistant: "bg-charcoal border border-ash text-white mr-auto"
|
|
915
|
+
};
|
|
916
|
+
var Message = import_react21.default.forwardRef(
|
|
917
|
+
({ variant = "assistant", className, content, isStreaming, ...rest }, ref) => {
|
|
918
|
+
const isUser = variant === "user";
|
|
919
|
+
return /* @__PURE__ */ import_react21.default.createElement(
|
|
920
|
+
"div",
|
|
921
|
+
{
|
|
922
|
+
ref,
|
|
923
|
+
className: cx21(
|
|
924
|
+
"px-3 py-2 w-fit",
|
|
925
|
+
variantStyles2[variant],
|
|
926
|
+
className
|
|
927
|
+
),
|
|
928
|
+
...rest
|
|
929
|
+
},
|
|
930
|
+
/* @__PURE__ */ import_react21.default.createElement(
|
|
931
|
+
MarkdownContent,
|
|
932
|
+
{
|
|
933
|
+
content,
|
|
934
|
+
className: cx21("prose-sm", isUser ? "prose-inherit" : "prose-invert")
|
|
935
|
+
}
|
|
936
|
+
),
|
|
937
|
+
isStreaming && /* @__PURE__ */ import_react21.default.createElement(StreamingCursor, { className: "ml-0.5" })
|
|
938
|
+
);
|
|
939
|
+
}
|
|
940
|
+
);
|
|
941
|
+
Message.displayName = "Message";
|
|
942
|
+
|
|
943
|
+
// src/components/ChatHistory.tsx
|
|
944
|
+
var import_react22 = __toESM(require("react"));
|
|
945
|
+
function cx22(...classes) {
|
|
946
|
+
return classes.filter(Boolean).join(" ");
|
|
947
|
+
}
|
|
948
|
+
var ChatHistory = import_react22.default.forwardRef(
|
|
949
|
+
({ messages, className, ...rest }, ref) => {
|
|
950
|
+
return /* @__PURE__ */ import_react22.default.createElement(
|
|
951
|
+
"div",
|
|
952
|
+
{
|
|
953
|
+
ref,
|
|
954
|
+
className: cx22("flex flex-col gap-3 w-full", className),
|
|
955
|
+
...rest
|
|
956
|
+
},
|
|
957
|
+
messages.map(({ id, variant, className: messageClassName, ...messageProps }, index) => /* @__PURE__ */ import_react22.default.createElement(
|
|
958
|
+
Message,
|
|
959
|
+
{
|
|
960
|
+
key: id ?? index,
|
|
961
|
+
variant,
|
|
962
|
+
className: messageClassName,
|
|
963
|
+
...messageProps
|
|
964
|
+
}
|
|
965
|
+
))
|
|
966
|
+
);
|
|
967
|
+
}
|
|
968
|
+
);
|
|
969
|
+
ChatHistory.displayName = "ChatHistory";
|
|
970
|
+
|
|
971
|
+
// src/components/BrandIcon.tsx
|
|
972
|
+
var import_react23 = __toESM(require("react"));
|
|
973
|
+
function cx23(...classes) {
|
|
974
|
+
return classes.filter(Boolean).join(" ");
|
|
975
|
+
}
|
|
976
|
+
var sizeMap2 = {
|
|
977
|
+
sm: "h-8 w-8 text-sm",
|
|
978
|
+
md: "h-12 w-12 text-base",
|
|
979
|
+
lg: "h-16 w-16 text-lg"
|
|
980
|
+
};
|
|
981
|
+
var BrandIcon = import_react23.default.forwardRef(
|
|
982
|
+
({ size = "md", variant = "solid", children, className, ...rest }, ref) => {
|
|
983
|
+
const variantClasses = variant === "solid" ? "bg-gold text-obsidian border-2 border-gold" : "bg-transparent text-gold border-2 border-gold";
|
|
984
|
+
return /* @__PURE__ */ import_react23.default.createElement(
|
|
985
|
+
"div",
|
|
986
|
+
{
|
|
987
|
+
ref,
|
|
988
|
+
className: cx23(
|
|
989
|
+
"inline-flex items-center justify-center rounded-none font-bold select-none overflow-hidden",
|
|
990
|
+
sizeMap2[size],
|
|
991
|
+
variantClasses,
|
|
992
|
+
className
|
|
993
|
+
),
|
|
994
|
+
...rest
|
|
995
|
+
},
|
|
996
|
+
children
|
|
997
|
+
);
|
|
998
|
+
}
|
|
999
|
+
);
|
|
1000
|
+
BrandIcon.displayName = "BrandIcon";
|
|
1001
|
+
|
|
1002
|
+
// src/components/ColorSwatch.tsx
|
|
1003
|
+
var import_react24 = __toESM(require("react"));
|
|
1004
|
+
function cx24(...classes) {
|
|
1005
|
+
return classes.filter(Boolean).join(" ");
|
|
1006
|
+
}
|
|
1007
|
+
var ColorSwatch = import_react24.default.forwardRef(
|
|
1008
|
+
({ color, label, className, ...rest }, ref) => {
|
|
1009
|
+
return /* @__PURE__ */ import_react24.default.createElement(
|
|
1010
|
+
"div",
|
|
1011
|
+
{
|
|
1012
|
+
ref,
|
|
1013
|
+
className: cx24("flex flex-col items-center gap-2", className),
|
|
1014
|
+
...rest
|
|
1015
|
+
},
|
|
1016
|
+
/* @__PURE__ */ import_react24.default.createElement(
|
|
1017
|
+
"div",
|
|
1018
|
+
{
|
|
1019
|
+
className: "h-16 w-16 border-2 border-ash rounded-none shadow-sm",
|
|
1020
|
+
style: { backgroundColor: color },
|
|
1021
|
+
"aria-label": label || color
|
|
1022
|
+
}
|
|
1023
|
+
),
|
|
1024
|
+
label && /* @__PURE__ */ import_react24.default.createElement("span", { className: "text-xs text-silver font-medium" }, label)
|
|
1025
|
+
);
|
|
1026
|
+
}
|
|
1027
|
+
);
|
|
1028
|
+
ColorSwatch.displayName = "ColorSwatch";
|
|
1029
|
+
|
|
1030
|
+
// src/components/ImageCard.tsx
|
|
1031
|
+
var import_react25 = __toESM(require("react"));
|
|
1032
|
+
var ASPECT_RATIO_PRESETS = {
|
|
1033
|
+
landscape: "3 / 2",
|
|
1034
|
+
portrait: "2 / 3",
|
|
1035
|
+
square: "1 / 1"
|
|
1036
|
+
};
|
|
1037
|
+
function resolveAspectRatio(ratio) {
|
|
1038
|
+
if (ratio in ASPECT_RATIO_PRESETS) {
|
|
1039
|
+
return ASPECT_RATIO_PRESETS[ratio];
|
|
1040
|
+
}
|
|
1041
|
+
return ratio.replace("/", " / ");
|
|
1042
|
+
}
|
|
1043
|
+
function cx25(...classes) {
|
|
1044
|
+
return classes.filter(Boolean).join(" ");
|
|
1045
|
+
}
|
|
1046
|
+
var ImageCard = import_react25.default.forwardRef(
|
|
1047
|
+
({
|
|
1048
|
+
src,
|
|
1049
|
+
alt,
|
|
1050
|
+
title,
|
|
1051
|
+
subtitle,
|
|
1052
|
+
aspectRatio,
|
|
1053
|
+
objectFit = "cover",
|
|
1054
|
+
overlay,
|
|
1055
|
+
mediaClassName,
|
|
1056
|
+
contentClassName,
|
|
1057
|
+
className,
|
|
1058
|
+
children,
|
|
1059
|
+
...props
|
|
1060
|
+
}, ref) => {
|
|
1061
|
+
const hasAspectRatio = aspectRatio !== void 0;
|
|
1062
|
+
const isContain = objectFit === "contain";
|
|
1063
|
+
return /* @__PURE__ */ import_react25.default.createElement(Card, { ref, className: cx25("p-0 overflow-hidden group w-fit", className), ...props }, /* @__PURE__ */ import_react25.default.createElement(
|
|
1064
|
+
"div",
|
|
1065
|
+
{
|
|
1066
|
+
className: cx25(
|
|
1067
|
+
"relative",
|
|
1068
|
+
hasAspectRatio && "overflow-hidden",
|
|
1069
|
+
mediaClassName
|
|
1070
|
+
),
|
|
1071
|
+
style: hasAspectRatio ? { aspectRatio: resolveAspectRatio(aspectRatio) } : void 0
|
|
1072
|
+
},
|
|
1073
|
+
/* @__PURE__ */ import_react25.default.createElement(
|
|
1074
|
+
"img",
|
|
1075
|
+
{
|
|
1076
|
+
src,
|
|
1077
|
+
alt,
|
|
1078
|
+
className: cx25(
|
|
1079
|
+
"block max-w-full",
|
|
1080
|
+
hasAspectRatio && "w-full h-full",
|
|
1081
|
+
hasAspectRatio && (isContain ? "object-contain" : "object-cover"),
|
|
1082
|
+
!hasAspectRatio && "h-auto"
|
|
1083
|
+
)
|
|
1084
|
+
}
|
|
1085
|
+
),
|
|
1086
|
+
overlay && /* @__PURE__ */ import_react25.default.createElement(
|
|
1087
|
+
"div",
|
|
1088
|
+
{
|
|
1089
|
+
className: "absolute inset-0 bg-obsidian/80 opacity-0 group-hover:opacity-100 transition-opacity duration-200 flex items-center justify-center"
|
|
1090
|
+
},
|
|
1091
|
+
overlay
|
|
1092
|
+
)
|
|
1093
|
+
), (title || subtitle || children) && /* @__PURE__ */ import_react25.default.createElement("div", { className: cx25("px-4 pt-4", contentClassName) }, title && /* @__PURE__ */ import_react25.default.createElement("h4", { className: "text-lg font-semibold leading-tight" }, title), subtitle && /* @__PURE__ */ import_react25.default.createElement("p", { className: "text-sm text-silver leading-normal" }, subtitle), children));
|
|
1094
|
+
}
|
|
1095
|
+
);
|
|
1096
|
+
ImageCard.displayName = "ImageCard";
|
|
1097
|
+
|
|
1098
|
+
// src/components/SectionHeading.tsx
|
|
1099
|
+
var import_react26 = __toESM(require("react"));
|
|
1100
|
+
function cx26(...classes) {
|
|
1101
|
+
return classes.filter(Boolean).join(" ");
|
|
1102
|
+
}
|
|
1103
|
+
var levelStyles = {
|
|
1104
|
+
h2: "text-2xl mb-4",
|
|
1105
|
+
h3: "text-xl mb-3"
|
|
1106
|
+
};
|
|
1107
|
+
var SectionHeading = import_react26.default.forwardRef(
|
|
1108
|
+
({ level = "h2", children, className, ...rest }, ref) => {
|
|
1109
|
+
const Component = level;
|
|
1110
|
+
return /* @__PURE__ */ import_react26.default.createElement(
|
|
1111
|
+
Component,
|
|
1112
|
+
{
|
|
1113
|
+
ref,
|
|
1114
|
+
className: cx26(
|
|
1115
|
+
"text-gold font-semibold tracking-tight",
|
|
1116
|
+
levelStyles[level],
|
|
1117
|
+
className
|
|
1118
|
+
),
|
|
1119
|
+
...rest
|
|
1120
|
+
},
|
|
1121
|
+
children
|
|
1122
|
+
);
|
|
1123
|
+
}
|
|
1124
|
+
);
|
|
1125
|
+
SectionHeading.displayName = "SectionHeading";
|
|
1126
|
+
|
|
682
1127
|
// src/index.ts
|
|
683
1128
|
var version = "2.0.0";
|
|
684
1129
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -686,17 +1131,26 @@ var version = "2.0.0";
|
|
|
686
1131
|
Alert,
|
|
687
1132
|
Avatar,
|
|
688
1133
|
Badge,
|
|
1134
|
+
BrandIcon,
|
|
689
1135
|
Button,
|
|
690
1136
|
Card,
|
|
1137
|
+
ChatHistory,
|
|
691
1138
|
Checkbox,
|
|
1139
|
+
ColorSwatch,
|
|
692
1140
|
HelperText,
|
|
1141
|
+
ImageCard,
|
|
693
1142
|
Input,
|
|
694
1143
|
Label,
|
|
1144
|
+
MarkdownContent,
|
|
1145
|
+
Message,
|
|
695
1146
|
Modal,
|
|
696
1147
|
Radio,
|
|
1148
|
+
SectionHeading,
|
|
697
1149
|
Select,
|
|
698
1150
|
Skeleton,
|
|
699
1151
|
Spinner,
|
|
1152
|
+
Stepper,
|
|
1153
|
+
StreamingCursor,
|
|
700
1154
|
Switch,
|
|
701
1155
|
Textarea,
|
|
702
1156
|
Tooltip,
|