@dust-tt/sparkle 0.1.25 → 0.1.27-alpha.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/cjs/_index.d.ts +1 -1
- package/dist/cjs/components/IconToggleButton.d.ts +1 -1
- package/dist/cjs/index.js +40 -5
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/logo/Logo.d.ts +8 -4
- package/dist/cjs/logo/LogoColoredGrey.d.ts +4 -0
- package/dist/cjs/logo/LogoFullColor.d.ts +4 -0
- package/dist/cjs/logo/LogoSquareColoredGrey.d.ts +4 -0
- package/dist/cjs/logo/LogoSquareFullColor.d.ts +4 -0
- package/dist/cjs/stories/Logo.stories.d.ts +6 -3
- package/dist/esm/_index.d.ts +1 -1
- package/dist/esm/components/IconToggleButton.d.ts +1 -1
- package/dist/esm/index.js +40 -5
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/logo/Logo.d.ts +8 -4
- package/dist/esm/logo/LogoColoredGrey.d.ts +4 -0
- package/dist/esm/logo/LogoFullColor.d.ts +4 -0
- package/dist/esm/logo/LogoSquareColoredGrey.d.ts +4 -0
- package/dist/esm/logo/LogoSquareFullColor.d.ts +4 -0
- package/dist/esm/stories/Logo.stories.d.ts +6 -3
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/dist/cjs/logo/index.d.ts +0 -1
- package/dist/esm/logo/index.d.ts +0 -1
package/dist/cjs/_index.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ import { PageHeader } from "./components/PageHeader";
|
|
|
10
10
|
export { PageHeader };
|
|
11
11
|
import { Icon } from "./components/Icon";
|
|
12
12
|
export { Icon };
|
|
13
|
-
import { Logo } from "./logo";
|
|
13
|
+
import { Logo } from "./logo/Logo";
|
|
14
14
|
export { Logo };
|
|
15
15
|
import { Checkbox } from "./components/Checkbox";
|
|
16
16
|
export { Checkbox };
|
|
@@ -8,5 +8,5 @@ type IconToggleButtonProps = {
|
|
|
8
8
|
disabled?: boolean;
|
|
9
9
|
selected?: boolean;
|
|
10
10
|
};
|
|
11
|
-
export declare function IconToggleButton({ type, onClick, disabled, tooltip, icon, className, selected
|
|
11
|
+
export declare function IconToggleButton({ type, onClick, disabled, tooltip, icon, className, selected, }: IconToggleButtonProps): React.JSX.Element;
|
|
12
12
|
export {};
|
package/dist/cjs/index.js
CHANGED
|
@@ -514,7 +514,11 @@ function PageHeader(_a) {
|
|
|
514
514
|
React.createElement("div", { className: descriptionClasses }, description)));
|
|
515
515
|
}
|
|
516
516
|
|
|
517
|
-
var
|
|
517
|
+
var SvgLogoColoredGrey = function (props) { return (React__namespace.createElement("svg", __assign({ xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", fill: "none", viewBox: "0 0 96 24" }, props),
|
|
518
|
+
React__namespace.createElement("path", { fill: "#64748B", fillRule: "evenodd", d: "M12 24c6.627 0 12-5.373 12-12 0 6.627 5.373 12 12 12s12-5.373 12-12v12h12a6 6 0 0 0 0-12H48c0-6.627-5.373-12-12-12S24 5.373 24 12c0-6.627-5.373-12-12-12S0 5.373 0 12s5.373 12 12 12Zm72-12H72v12h12V12Z", clipRule: "evenodd" }),
|
|
519
|
+
React__namespace.createElement("path", { fill: "#334155", fillRule: "evenodd", d: "M0 0h12v24H0V0Zm24 0h24v12H24V0Zm36 12h36V0H60a6 6 0 0 0 0 12Z", clipRule: "evenodd" }))); };
|
|
520
|
+
|
|
521
|
+
var SvgLogoFullColor = function (props) { return (React__namespace.createElement("svg", __assign({ xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", fill: "none", viewBox: "0 0 64 16" }, props),
|
|
518
522
|
React__namespace.createElement("path", { fill: "#FCD34D", d: "M56 8h-8v8h8V8Z" }),
|
|
519
523
|
React__namespace.createElement("path", { fill: "#6EE7B7", d: "M8 16A8 8 0 1 0 8 0a8 8 0 0 0 0 16Z" }),
|
|
520
524
|
React__namespace.createElement("path", { fill: "#F9A8D4", d: "M24 16a8 8 0 1 0 0-16 8 8 0 0 0 0 16Z" }),
|
|
@@ -523,6 +527,39 @@ var SvgLogo = function (props) { return (React__namespace.createElement("svg", _
|
|
|
523
527
|
React__namespace.createElement("path", { fill: "#3B82F6", fillRule: "evenodd", d: "M40 8a4 4 0 0 1 0-8h24v8H40Z", clipRule: "evenodd" }),
|
|
524
528
|
React__namespace.createElement("path", { fill: "#7DD3FC", fillRule: "evenodd", d: "M32 16V8h8a4 4 0 0 1 0 8h-8Z", clipRule: "evenodd" }))); };
|
|
525
529
|
|
|
530
|
+
var SvgLogoSquareColoredGrey = function (props) { return (React__namespace.createElement("svg", __assign({ xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", fill: "none", viewBox: "0 0 48 48" }, props),
|
|
531
|
+
React__namespace.createElement("path", { fill: "#64748B", fillRule: "evenodd", d: "M12 24c6.627 0 12-5.373 12-12 0 6.627 5.373 12 12 12s12-5.373 12-12S42.627 0 36 0 24 5.373 24 12c0-6.627-5.373-12-12-12S0 5.373 0 12s5.373 12 12 12Zm24 12H24v12h12V36ZM12 48a6 6 0 0 0 0-12H0v12h12Z", clipRule: "evenodd" }),
|
|
532
|
+
React__namespace.createElement("path", { fill: "#334155", fillRule: "evenodd", d: "M12 0H0v24h12a6 6 0 0 0 0 12h36V24H12V0Zm12 0h24v12H24V0Z", clipRule: "evenodd" }))); };
|
|
533
|
+
|
|
534
|
+
var SvgLogoSquareFullColor = function (props) { return (React__namespace.createElement("svg", __assign({ xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", fill: "none", viewBox: "0 0 48 48" }, props),
|
|
535
|
+
React__namespace.createElement("path", { fill: "#FCD34D", d: "M36 36H24v12h12V36Z" }),
|
|
536
|
+
React__namespace.createElement("path", { fill: "#3B82F6", fillRule: "evenodd", d: "M12 36a6 6 0 0 1 0-12h36v12H12Z", clipRule: "evenodd" }),
|
|
537
|
+
React__namespace.createElement("path", { fill: "#7DD3FC", fillRule: "evenodd", d: "M0 48V36h12a6 6 0 0 1 0 12H0Z", clipRule: "evenodd" }),
|
|
538
|
+
React__namespace.createElement("path", { fill: "#6EE7B7", d: "M12 24c6.627 0 12-5.373 12-12S18.627 0 12 0 0 5.373 0 12s5.373 12 12 12Z" }),
|
|
539
|
+
React__namespace.createElement("path", { fill: "#F9A8D4", d: "M36 24c6.627 0 12-5.373 12-12S42.627 0 36 0 24 5.373 24 12s5.373 12 12 12Z" }),
|
|
540
|
+
React__namespace.createElement("path", { fill: "#10B981", d: "M12 0H0v24h12V0Z" }),
|
|
541
|
+
React__namespace.createElement("path", { fill: "#F87171", d: "M48 0H24v12h24V0Z" }))); };
|
|
542
|
+
|
|
543
|
+
function Logo(_a) {
|
|
544
|
+
var _b = _a.type, type = _b === void 0 ? "full-color" : _b, _c = _a.shape, shape = _c === void 0 ? "full" : _c, _d = _a.className, className = _d === void 0 ? "" : _d;
|
|
545
|
+
if (shape === "square") {
|
|
546
|
+
if (type === "colored-grey") {
|
|
547
|
+
return React.createElement(SvgLogoSquareColoredGrey, { className: className });
|
|
548
|
+
}
|
|
549
|
+
else {
|
|
550
|
+
return React.createElement(SvgLogoSquareFullColor, { className: className });
|
|
551
|
+
}
|
|
552
|
+
}
|
|
553
|
+
else {
|
|
554
|
+
if (type === "colored-grey") {
|
|
555
|
+
return React.createElement(SvgLogoColoredGrey, { className: className });
|
|
556
|
+
}
|
|
557
|
+
else {
|
|
558
|
+
return React.createElement(SvgLogoFullColor, { className: className });
|
|
559
|
+
}
|
|
560
|
+
}
|
|
561
|
+
}
|
|
562
|
+
|
|
526
563
|
function Checkbox(_a) {
|
|
527
564
|
var checked = _a.checked, onChange = _a.onChange, _b = _a.className, className = _b === void 0 ? "" : _b, disabled = _a.disabled;
|
|
528
565
|
var baseStyleClasses = {
|
|
@@ -628,8 +665,7 @@ var iconClasses = {
|
|
|
628
665
|
},
|
|
629
666
|
};
|
|
630
667
|
function IconToggleButton(_a) {
|
|
631
|
-
var _b = _a.type, type = _b === void 0 ? "tertiary" : _b, onClick = _a.onClick, _c = _a.disabled, disabled = _c === void 0 ? false : _c, tooltip = _a.tooltip, icon = _a.icon, _d = _a.className, className = _d === void 0 ? "" : _d, _e = _a.selected,
|
|
632
|
-
var _f = __read(React.useState(isSelected), 2), selected = _f[0], setSelected = _f[1];
|
|
668
|
+
var _b = _a.type, type = _b === void 0 ? "tertiary" : _b, onClick = _a.onClick, _c = _a.disabled, disabled = _c === void 0 ? false : _c, tooltip = _a.tooltip, icon = _a.icon, _d = _a.className, className = _d === void 0 ? "" : _d, _e = _a.selected, selected = _e === void 0 ? false : _e;
|
|
633
669
|
var iconGroup = iconClasses[type];
|
|
634
670
|
var finalIconClasses = classNames(className, baseClasses, disabled
|
|
635
671
|
? iconGroup.disabled
|
|
@@ -642,7 +678,6 @@ function IconToggleButton(_a) {
|
|
|
642
678
|
: "", disabled ? "" : selected ? "" : iconGroup.dark.hover, disabled ? "" : iconGroup.dark.active);
|
|
643
679
|
var IconButtonToggleContent = (React.createElement("button", { className: finalIconClasses, onClick: function (e) {
|
|
644
680
|
if (!disabled) {
|
|
645
|
-
setSelected(!selected); // Toggle selected state
|
|
646
681
|
onClick === null || onClick === void 0 ? void 0 : onClick(e); // Run passed onClick event
|
|
647
682
|
}
|
|
648
683
|
}, disabled: disabled }, icon && React.createElement(Icon, { IconComponent: icon, className: "s-h-5 s-w-5" })));
|
|
@@ -924,7 +959,7 @@ exports.Item = Item;
|
|
|
924
959
|
exports.KeyIcon = SvgKey$2;
|
|
925
960
|
exports.KeySolidIcon = SvgKey;
|
|
926
961
|
exports.KeyStrokeIcon = SvgKey$1;
|
|
927
|
-
exports.Logo =
|
|
962
|
+
exports.Logo = Logo;
|
|
928
963
|
exports.MagnifyingGlassIcon = SvgMagnifyingGlass$2;
|
|
929
964
|
exports.MagnifyingGlassSolidIcon = SvgMagnifyingGlass;
|
|
930
965
|
exports.MagnifyingGlassStrokeIcon = SvgMagnifyingGlass$1;
|