@dust-tt/sparkle 0.2.257 → 0.2.258

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.
@@ -3,7 +3,7 @@ export interface ContentMessageProps {
3
3
  title: string;
4
4
  children: React.ReactNode;
5
5
  className?: string;
6
- size?: "sm" | "md";
6
+ size?: "sm" | "md" | "lg";
7
7
  variant?: "emerald" | "amber" | "slate" | "purple" | "warning" | "sky" | "pink" | "action" | "red";
8
8
  icon?: ComponentType;
9
9
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ContentMessage.d.ts","sourceRoot":"","sources":["../../../src/components/ContentMessage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAM7C,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACnB,OAAO,CAAC,EACJ,SAAS,GACT,OAAO,GACP,OAAO,GACP,QAAQ,GACR,SAAS,GACT,KAAK,GACL,MAAM,GACN,QAAQ,GACR,KAAK,CAAC;IACV,IAAI,CAAC,EAAE,aAAa,CAAC;CACtB;AAED,wBAAgB,cAAc,CAAC,EAC7B,KAAK,EACL,OAAiB,EACjB,QAAQ,EACR,IAAW,EACX,SAAc,EACd,IAAI,GACL,EAAE,mBAAmB,qBAkDrB"}
1
+ {"version":3,"file":"ContentMessage.d.ts","sourceRoot":"","sources":["../../../src/components/ContentMessage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAM7C,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC1B,OAAO,CAAC,EACJ,SAAS,GACT,OAAO,GACP,OAAO,GACP,QAAQ,GACR,SAAS,GACT,KAAK,GACL,MAAM,GACN,QAAQ,GACR,KAAK,CAAC;IACV,IAAI,CAAC,EAAE,aAAa,CAAC;CACtB;AAED,wBAAgB,cAAc,CAAC,EAC7B,KAAK,EACL,OAAiB,EACjB,QAAQ,EACR,IAAW,EACX,SAAc,EACd,IAAI,GACL,EAAE,mBAAmB,qBAoDrB"}
@@ -11,10 +11,12 @@ export function ContentMessage(_a) {
11
11
  titleColor: "s-text-".concat(variant, "-800"),
12
12
  textColor: "s-text-".concat(variant, "-950"),
13
13
  };
14
- return (React.createElement("div", { className: classNames("s-flex s-gap-2 s-border", variantClasses.border, variantClasses.background, size === "md"
15
- ? "s-max-w-[500px] s-rounded-2xl s-p-4"
16
- : "s-max-w-[380px] s-rounded-xl s-px-4 s-py-3", className) },
17
- size === "md" && (React.createElement(React.Fragment, null,
14
+ return (React.createElement("div", { className: classNames("s-flex s-gap-2 s-border", variantClasses.border, variantClasses.background, size === "lg"
15
+ ? "s-rounded-2xl s-p-4"
16
+ : size === "md"
17
+ ? "s-max-w-[500px] s-rounded-2xl s-p-4"
18
+ : "s-max-w-[380px] s-rounded-xl s-px-4 s-py-3", className) },
19
+ ["md", "lg"].includes(size) && (React.createElement(React.Fragment, null,
18
20
  React.createElement(Icon, { size: "md", visual: icon !== null && icon !== void 0 ? icon : InformationCircleIcon, className: classNames("s-shrink-0", variantClasses.iconColor) }),
19
21
  React.createElement("div", { className: "s-flex s-flex-col s-gap-2" },
20
22
  React.createElement("div", { className: classNames("s-text-base s-font-semibold", variantClasses.titleColor) }, title),
@@ -1 +1 @@
1
- {"version":3,"file":"ContentMessage.js","sourceRoot":"","sources":["../../../src/components/ContentMessage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwB,MAAM,OAAO,CA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ACL,CACF,CACL,CACJ;QACA,IAAI,KAAK,IAAI,IAAI,CAChB,6BAAK,SAAS,EAAE,UAAU,CAAC,WAAW,EAAE,cAAc,CAAC,SAAS,CAAC,IAC9D,QAAQ,CACL,CACP,CACG,CACP,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"ContentMessage.js","sourceRoot":"","sources":["../../../src/components/ContentMessage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwB,MAAM,OAAO,CAAC;AAE7C,OAAO,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAC;AAChD,OAAO,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAoBhD,MAAM,UAAU,cAAc,CAAC,EAOT;QANpB,KAAK,WAAA,EACL,eAAiB,EAAjB,OAAO,mBAAG,OAAO,KAAA,EACjB,QAAQ,cAAA,EACR,YAAW,EAAX,IAAI,mBAAG,IAAI,KAAA,EACX,iBAAc,EAAd,SAAS,mBAAG,EAAE,KAAA,EACd,IAAI,UAAA;IAEJ,IAAM,cAAc,GAAG;QACrB,MAAM,EAAE,mBAAY,OAAO,SAAM;QACjC,UAAU,EAAE,eAAQ,OAAO,SAAM;QACjC,SAAS,EAAE,iBAAU,OAAO,SAAM;QAClC,UAAU,EAAE,iBAAU,OAAO,SAAM;QACnC,SAAS,EAAE,iBAAU,OAAO,SAAM;KACnC,CAAC;IAEF,OAAO,CACL,6BACE,SAAS,EAAE,UAAU,CACnB,yBAAyB,EACzB,cAAc,CAAC,MAAM,EACrB,cAAc,CAAC,UAAU,EACzB,IAAI,KAAK,IAAI;YACX,CAAC,CAAC,qBAAqB;YACvB,CAAC,CAAC,IAAI,KAAK,IAAI;gBACb,CAAC,CAAC,qCAAqC;gBACvC,CAAC,CAAC,4CAA4C,EAClD,SAAS,CACV;QAEA,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAC9B;YACE,oBAAC,IAAI,IACH,IAAI,EAAC,IAAI,EACT,MAAM,EAAE,IAAI,aAAJ,IAAI,cAAJ,IAAI,GAAI,qBAAqB,EACrC,SAAS,EAAE,UAAU,CAAC,YAAY,EAAE,cAAc,CAAC,SAAS,CAAC,GAC7D;YACF,6BAAK,SAAS,EAAC,2BAA2B;gBACxC,6BACE,SAAS,EAAE,UAAU,CACnB,6BAA6B,EAC7B,cAAc,CAAC,UAAU,CAC1B,IAEA,KAAK,CACF;gBACN,6BAAK,SAAS,EAAE,UAAU,CAAC,WAAW,EAAE,cAAc,CAAC,SAAS,CAAC,IAC9D,QAAQ,CACL,CACF,CACL,CACJ;QACA,IAAI,KAAK,IAAI,IAAI,CAChB,6BAAK,SAAS,EAAE,UAAU,CAAC,WAAW,EAAE,cAAc,CAAC,SAAS,CAAC,IAC9D,QAAQ,CACL,CACP,CACG,CACP,CAAC;AACJ,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dust-tt/sparkle",
3
- "version": "0.2.257",
3
+ "version": "0.2.258",
4
4
  "scripts": {
5
5
  "build": "rm -rf dist && npm run tailwind && npm run build:esm && npm run build:cjs",
6
6
  "tailwind": "tailwindcss -i ./src/styles/tailwind.css -o dist/sparkle.css",
@@ -8,7 +8,7 @@ export interface ContentMessageProps {
8
8
  title: string;
9
9
  children: React.ReactNode;
10
10
  className?: string;
11
- size?: "sm" | "md";
11
+ size?: "sm" | "md" | "lg";
12
12
  variant?:
13
13
  | "emerald"
14
14
  | "amber"
@@ -44,13 +44,15 @@ export function ContentMessage({
44
44
  "s-flex s-gap-2 s-border",
45
45
  variantClasses.border,
46
46
  variantClasses.background,
47
- size === "md"
48
- ? "s-max-w-[500px] s-rounded-2xl s-p-4"
49
- : "s-max-w-[380px] s-rounded-xl s-px-4 s-py-3",
47
+ size === "lg"
48
+ ? "s-rounded-2xl s-p-4"
49
+ : size === "md"
50
+ ? "s-max-w-[500px] s-rounded-2xl s-p-4"
51
+ : "s-max-w-[380px] s-rounded-xl s-px-4 s-py-3",
50
52
  className
51
53
  )}
52
54
  >
53
- {size === "md" && (
55
+ {["md", "lg"].includes(size) && (
54
56
  <>
55
57
  <Icon
56
58
  size="md"