@cryptlex/web-components 3.3.0 → 3.3.1

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.
@@ -1,11 +1,11 @@
1
- import { jsx as t, jsxs as a } from "react/jsx-runtime";
2
- import { Separator as c } from "./separator.es.js";
3
- import { cn as r } from "../../utils/index.es.js";
4
- import { cva as l } from "class-variance-authority";
5
- function x({ className: e, ...i }) {
6
- return /* @__PURE__ */ t("ol", { className: r("flex flex-col gap-4", e), ...i });
1
+ import { jsx as t, jsxs as o } from "react/jsx-runtime";
2
+ import { Separator as m } from "./separator.es.js";
3
+ import { cn as n } from "../../utils/index.es.js";
4
+ import { cva as u } from "class-variance-authority";
5
+ function v({ className: e, ...i }) {
6
+ return /* @__PURE__ */ t("ol", { className: n("flex flex-col gap-4", e), ...i });
7
7
  }
8
- const m = l(
8
+ const d = u(
9
9
  "p-1 rounded-full",
10
10
  {
11
11
  variants: {
@@ -20,23 +20,24 @@ const m = l(
20
20
  }
21
21
  }
22
22
  );
23
- function v({ date: e, className: i, icon: n, children: s, iconVariant: o }) {
24
- return /* @__PURE__ */ a("li", { className: "flex list-none gap-4", children: [
25
- e && /* @__PURE__ */ t("time", { dateTime: e.toISOString(), className: "leading-none text-muted", children: e.toLocaleDateString() }),
26
- /* @__PURE__ */ a("div", { className: "flex flex-col items-center gap-2", children: [
27
- /* @__PURE__ */ t("div", { className: r(m(o)), children: n && /* @__PURE__ */ t(n, { className: "size-icon " }) }),
28
- /* @__PURE__ */ t(c, { decorative: !0, orientation: "vertical" })
23
+ function N({ date: e, dateFormatter: i, className: s, icon: r, children: a, iconVariant: c }) {
24
+ const l = `${(e.getMonth() + 1).toString().padStart(2, "0")}-${e.getFullYear()}`;
25
+ return /* @__PURE__ */ o("li", { className: "flex list-none gap-4", children: [
26
+ /* @__PURE__ */ t("time", { dateTime: e.toISOString(), className: "font-mono leading-none text-muted", children: i ? i(e) : l }),
27
+ /* @__PURE__ */ o("div", { className: "flex flex-col items-center gap-2", children: [
28
+ /* @__PURE__ */ t("div", { className: n(d(c)), children: r && /* @__PURE__ */ t(r, { className: "size-icon " }) }),
29
+ /* @__PURE__ */ t(m, { decorative: !0, orientation: "vertical" })
29
30
  ] }),
30
- /* @__PURE__ */ t("section", { className: r("grow", i), children: s })
31
+ /* @__PURE__ */ t("section", { className: n("grow", s), children: a })
31
32
  ] });
32
33
  }
33
- function p({ date: e }) {
34
+ function S({ date: e }) {
34
35
  return /* @__PURE__ */ t("time", { dateTime: e.toISOString(), className: "text-muted", children: e.toDateString() });
35
36
  }
36
37
  export {
37
- x as Timeline,
38
- v as TimelineItem,
39
- p as TimelineTime,
40
- m as timelineIconVariants
38
+ v as Timeline,
39
+ N as TimelineItem,
40
+ S as TimelineTime,
41
+ d as timelineIconVariants
41
42
  };
42
43
  //# sourceMappingURL=timeline.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"timeline.es.js","sources":["../../../lib/components/ui/timeline.tsx"],"sourcesContent":["import { Separator } from \"@/components/ui/separator\";\nimport { cn } from \"@/utils\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport type { LucideIcon } from \"lucide-react\";\n\nexport function Timeline({ className, ...props }: React.ComponentProps<'ol'>) {\n return <ol className={cn(\"flex flex-col gap-4\", className)} {...props} />\n}\n\nexport const timelineIconVariants = cva(\n `p-1 rounded-full`,\n {\n variants: {\n variant: {\n destructive: \"text-destructive-foreground bg-destructive\",\n success: \"text-success-foreground bg-success\",\n muted: \"text-muted-foreground bg-muted\",\n },\n },\n defaultVariants: {\n variant: \"muted\",\n },\n },\n);\nexport function TimelineItem({ date, className, icon: Icon, children, iconVariant }: React.ComponentProps<'div'> & { date: Date, icon?: LucideIcon, iconVariant?: VariantProps<typeof timelineIconVariants> }) {\n return (\n <li className=\"flex list-none gap-4\">\n {date && <time dateTime={date.toISOString()} className=\"leading-none text-muted\">{date.toLocaleDateString()}</time>}\n {/* Status?? */}\n <div className=\"flex flex-col items-center gap-2\">\n <div className={cn(timelineIconVariants(iconVariant))}>\n {Icon && <Icon className=\"size-icon \" />}\n </div>\n <Separator decorative={true} orientation=\"vertical\" />\n </div>\n\n <section className={cn(\"grow\", className)}>\n {children}\n </section>\n </li>\n )\n}\n\nexport function TimelineTime({ date }: React.ComponentProps<'time'> & {\n date: Date\n}) {\n return <time dateTime={date.toISOString()} className=\"text-muted\">{date.toDateString()}</time>\n}\n\n// export function TimelineIcon()"],"names":["Timeline","className","props","jsx","cn","timelineIconVariants","cva","TimelineItem","date","Icon","children","iconVariant","jsxs","Separator","TimelineTime"],"mappings":";;;;AAKO,SAASA,EAAS,EAAE,WAAAC,GAAW,GAAGC,KAAqC;AACnE,SAAA,gBAAAC,EAAC,QAAG,WAAWC,EAAG,uBAAuBH,CAAS,GAAI,GAAGC,GAAO;AAC3E;AAEO,MAAMG,IAAuBC;AAAA,EAChC;AAAA,EACA;AAAA,IACI,UAAU;AAAA,MACN,SAAS;AAAA,QACL,aAAa;AAAA,QACb,SAAS;AAAA,QACT,OAAO;AAAA,MAAA;AAAA,IAEf;AAAA,IACA,iBAAiB;AAAA,MACb,SAAS;AAAA,IAAA;AAAA,EACb;AAER;AACgB,SAAAC,EAAa,EAAE,MAAAC,GAAM,WAAAP,GAAW,MAAMQ,GAAM,UAAAC,GAAU,aAAAC,KAAyI;AAEvM,SAAA,gBAAAC,EAAC,MAAG,EAAA,WAAU,wBACT,UAAA;AAAA,IAAQJ,KAAA,gBAAAL,EAAC,QAAK,EAAA,UAAUK,EAAK,eAAe,WAAU,2BAA2B,UAAKA,EAAA,mBAAqB,EAAA,CAAA;AAAA,IAE5G,gBAAAI,EAAC,OAAI,EAAA,WAAU,oCACX,UAAA;AAAA,MAAA,gBAAAT,EAAC,OAAI,EAAA,WAAWC,EAAGC,EAAqBM,CAAW,CAAC,GAC/C,UAAAF,KAAS,gBAAAN,EAAAM,GAAA,EAAK,WAAU,aAAa,CAAA,GAC1C;AAAA,MACC,gBAAAN,EAAAU,GAAA,EAAU,YAAY,IAAM,aAAY,WAAW,CAAA;AAAA,IAAA,GACxD;AAAA,sBAEC,WAAQ,EAAA,WAAWT,EAAG,QAAQH,CAAS,GACnC,UAAAS,EACL,CAAA;AAAA,EAAA,GACJ;AAER;AAEgB,SAAAI,EAAa,EAAE,MAAAN,KAE5B;AACQ,SAAA,gBAAAL,EAAC,QAAK,EAAA,UAAUK,EAAK,YAAA,GAAe,WAAU,cAAc,UAAKA,EAAA,aAAe,EAAA,CAAA;AAC3F;"}
1
+ {"version":3,"file":"timeline.es.js","sources":["../../../lib/components/ui/timeline.tsx"],"sourcesContent":["import { Separator } from \"@/components/ui/separator\";\nimport { cn } from \"@/utils\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport type { LucideIcon } from \"lucide-react\";\n\nexport function Timeline({ className, ...props }: React.ComponentProps<'ol'>) {\n return <ol className={cn(\"flex flex-col gap-4\", className)} {...props} />\n}\n\nexport const timelineIconVariants = cva(\n `p-1 rounded-full`,\n {\n variants: {\n variant: {\n destructive: \"text-destructive-foreground bg-destructive\",\n success: \"text-success-foreground bg-success\",\n muted: \"text-muted-foreground bg-muted\",\n },\n },\n defaultVariants: {\n variant: \"muted\",\n },\n },\n);\nexport function TimelineItem({ date, dateFormatter, className, icon: Icon, children, iconVariant }: React.ComponentProps<'div'> & { date: Date, dateFormatter?: (d: Date) => string; icon?: LucideIcon, iconVariant?: VariantProps<typeof timelineIconVariants> }) {\n const defaultDateDisplay = `${(date.getMonth() + 1).toString().padStart(2, '0')}-${date.getFullYear()}`;\n return (\n <li className=\"flex list-none gap-4\">\n <time dateTime={date.toISOString()} className=\"font-mono leading-none text-muted\">{dateFormatter ? dateFormatter(date) : defaultDateDisplay}</time>\n {/* Status?? */}\n <div className=\"flex flex-col items-center gap-2\">\n <div className={cn(timelineIconVariants(iconVariant))}>\n {Icon && <Icon className=\"size-icon \" />}\n </div>\n <Separator decorative={true} orientation=\"vertical\" />\n </div>\n\n <section className={cn(\"grow\", className)}>\n {children}\n </section>\n </li>\n )\n}\n\nexport function TimelineTime({ date }: React.ComponentProps<'time'> & {\n date: Date\n}) {\n return <time dateTime={date.toISOString()} className=\"text-muted\">{date.toDateString()}</time>\n}\n\n// export function TimelineIcon()"],"names":["Timeline","className","props","jsx","cn","timelineIconVariants","cva","TimelineItem","date","dateFormatter","Icon","children","iconVariant","defaultDateDisplay","jsxs","Separator","TimelineTime"],"mappings":";;;;AAKO,SAASA,EAAS,EAAE,WAAAC,GAAW,GAAGC,KAAqC;AACnE,SAAA,gBAAAC,EAAC,QAAG,WAAWC,EAAG,uBAAuBH,CAAS,GAAI,GAAGC,GAAO;AAC3E;AAEO,MAAMG,IAAuBC;AAAA,EAChC;AAAA,EACA;AAAA,IACI,UAAU;AAAA,MACN,SAAS;AAAA,QACL,aAAa;AAAA,QACb,SAAS;AAAA,QACT,OAAO;AAAA,MAAA;AAAA,IAEf;AAAA,IACA,iBAAiB;AAAA,MACb,SAAS;AAAA,IAAA;AAAA,EACb;AAER;AACgB,SAAAC,EAAa,EAAE,MAAAC,GAAM,eAAAC,GAAe,WAAAR,GAAW,MAAMS,GAAM,UAAAC,GAAU,aAAAC,KAA8K;AAC/P,QAAMC,IAAqB,IAAIL,EAAK,SAAA,IAAa,GAAG,SAAA,EAAW,SAAS,GAAG,GAAG,CAAC,IAAIA,EAAK,aAAa;AAEjG,SAAA,gBAAAM,EAAC,MAAG,EAAA,WAAU,wBACV,UAAA;AAAA,IAAC,gBAAAX,EAAA,QAAA,EAAK,UAAUK,EAAK,YAAY,GAAG,WAAU,qCAAqC,UAAgBC,IAAAA,EAAcD,CAAI,IAAIK,EAAmB,CAAA;AAAA,IAE5I,gBAAAC,EAAC,OAAI,EAAA,WAAU,oCACX,UAAA;AAAA,MAAA,gBAAAX,EAAC,OAAI,EAAA,WAAWC,EAAGC,EAAqBO,CAAW,CAAC,GAC/C,UAAAF,KAAS,gBAAAP,EAAAO,GAAA,EAAK,WAAU,aAAa,CAAA,GAC1C;AAAA,MACC,gBAAAP,EAAAY,GAAA,EAAU,YAAY,IAAM,aAAY,WAAW,CAAA;AAAA,IAAA,GACxD;AAAA,sBAEC,WAAQ,EAAA,WAAWX,EAAG,QAAQH,CAAS,GACnC,UAAAU,EACL,CAAA;AAAA,EAAA,GACJ;AAER;AAEgB,SAAAK,EAAa,EAAE,MAAAR,KAE5B;AACQ,SAAA,gBAAAL,EAAC,QAAK,EAAA,UAAUK,EAAK,YAAA,GAAe,WAAU,cAAc,UAAKA,EAAA,aAAe,EAAA,CAAA;AAC3F;"}
@@ -695,8 +695,9 @@ export declare const timelineIconVariants: (props?: ({
695
695
  variant?: "destructive" | "success" | "muted" | null | undefined;
696
696
  } & ClassProp) | undefined) => string;
697
697
 
698
- export declare function TimelineItem({ date, className, icon: Icon, children, iconVariant }: React.ComponentProps<'div'> & {
698
+ export declare function TimelineItem({ date, dateFormatter, className, icon: Icon, children, iconVariant }: React.ComponentProps<'div'> & {
699
699
  date: Date;
700
+ dateFormatter?: (d: Date) => string;
700
701
  icon?: LucideIcon;
701
702
  iconVariant?: VariantProps<typeof timelineIconVariants>;
702
703
  }): JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cryptlex/web-components",
3
- "version": "3.3.0",
3
+ "version": "3.3.1",
4
4
  "description": "React component library for Cryptlex web applications",
5
5
  "author": "Cryptlex",
6
6
  "type": "module",