@dust-tt/sparkle 0.2.155-alphatv → 0.2.157-alphatv
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.js +5 -3
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +5 -3
- package/dist/esm/index.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -74717,6 +74717,7 @@ ContextItem.SectionHeader = function (_a) {
|
|
|
74717
74717
|
description && (React.createElement("div", { className: "s-text-sm s-font-normal s-text-element-700 dark:s-text-element-700-dark" }, description))));
|
|
74718
74718
|
};
|
|
74719
74719
|
|
|
74720
|
+
var isBrowser = typeof window !== "undefined";
|
|
74720
74721
|
var breakpoints = {
|
|
74721
74722
|
sm: 640,
|
|
74722
74723
|
md: 768,
|
|
@@ -74724,19 +74725,20 @@ var breakpoints = {
|
|
|
74724
74725
|
xl: 1280,
|
|
74725
74726
|
xxl: 1536, // Tailwind's default for `2xl`
|
|
74726
74727
|
};
|
|
74728
|
+
var getWindowWidth = function () { return isBrowser ? window.innerWidth : 0; };
|
|
74727
74729
|
var titleClassNames = {
|
|
74728
74730
|
base: "s-truncate s-font-medium s-text-element-900 s-w-full",
|
|
74729
74731
|
item: "s-text-sm",
|
|
74730
74732
|
list: "s-text-base",
|
|
74731
74733
|
gallery: "s-text-lg",
|
|
74732
|
-
minimalGallery: "s-overflow-hidden s-whitespace-nowrap ".concat(
|
|
74734
|
+
minimalGallery: "s-overflow-hidden s-whitespace-nowrap ".concat(getWindowWidth() <= breakpoints.sm ? "s-text-sm" : getWindowWidth() <= breakpoints.md ? "s-text-base" : ""),
|
|
74733
74735
|
};
|
|
74734
74736
|
var subtitleClassNames = {
|
|
74735
74737
|
base: "s-font-normal s-text-element-700 s-truncate s-w-full",
|
|
74736
74738
|
item: "s-text-xs",
|
|
74737
74739
|
list: "s-text-sm",
|
|
74738
74740
|
gallery: "s-text-sm",
|
|
74739
|
-
minimalGallery: "s-overflow-hidden s-whitespace-nowrap ".concat(
|
|
74741
|
+
minimalGallery: "s-overflow-hidden s-whitespace-nowrap ".concat(getWindowWidth() <= breakpoints.sm ? "s-text-xs" : getWindowWidth() <= breakpoints.md ? "s-text-sm" : ""),
|
|
74740
74742
|
};
|
|
74741
74743
|
var descriptionClassNames = {
|
|
74742
74744
|
base: "s-font-normal s-mb-1",
|
|
@@ -74809,7 +74811,7 @@ var GalleryVariantContent = function (_a) {
|
|
|
74809
74811
|
};
|
|
74810
74812
|
var MinimalGalleryVariantContent = function (_a) {
|
|
74811
74813
|
var title = _a.title, pictureUrl = _a.pictureUrl, subtitle = _a.subtitle, _b = _a.hasAction, hasAction = _b === void 0 ? true : _b, onClick = _a.onClick, onActionClick = _a.onActionClick, renderActionButton = _a.renderActionButton;
|
|
74812
|
-
var isSmallScreen =
|
|
74814
|
+
var isSmallScreen = getWindowWidth() <= breakpoints.sm;
|
|
74813
74815
|
var actionButton = (React.createElement(Button, { label: "", icon: SvgMore$1, variant: "tertiary", size: isSmallScreen ? "xs" : "sm", labelVisible: false, hasMagnifying: false, disabledTooltip: true, onClick: function (e) {
|
|
74814
74816
|
e.stopPropagation();
|
|
74815
74817
|
onActionClick === null || onActionClick === void 0 ? void 0 : onActionClick();
|