@0xsquid/ui 2.2.6 → 2.2.8
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 -5
- package/dist/esm/index.js +5 -5
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -8501,10 +8501,10 @@ const borderRadiusClassMap = {
|
|
|
8501
8501
|
};
|
|
8502
8502
|
function Menu(_a) {
|
|
8503
8503
|
var { children, containerClassName, contentClassName, rounded = "lg", menuRef, contentWrapperProps } = _a, props = __rest$1(_a, ["children", "containerClassName", "contentClassName", "rounded", "menuRef", "contentWrapperProps"]);
|
|
8504
|
-
return (jsxRuntime.jsx("div", Object.assign({}, props, { className: cn("tw-max-w-[320px]", containerClassName), ref: menuRef, children: jsxRuntime.jsxs("div", { className: cn("tw-
|
|
8504
|
+
return (jsxRuntime.jsx("div", Object.assign({}, props, { className: cn("tw-max-w-[320px]", containerClassName), ref: menuRef, children: jsxRuntime.jsxs("div", { className: cn("tw-relative tw-inline-flex tw-max-w-full tw-flex-col tw-items-center tw-justify-center tw-gap-squid-xs tw-bg-menu-bg tw-p-squid-xs tw-text-center tw-text-menu-text group-data-[squid-theme-type=dark]:tw-shadow-elevation-dark-2 group-data-[squid-theme-type=light]:tw-shadow-elevation-light-2", borderRadiusClassMap[rounded], contentClassName,
|
|
8505
8505
|
// :before element to create a backdrop
|
|
8506
8506
|
// Not applied to the div itself because the backdrop-filter spec does not apply nested backdrop filters
|
|
8507
|
-
"before:tw-absolute before:tw-inset-0 before:-tw-z-[1] before:tw-h-full before:tw-w-full before:tw-backdrop-blur/20 before:tw-backdrop-saturate-150"), children: [typeof children === "string" ? (jsxRuntime.jsx(CaptionText, { className: "tw-z-20 tw-self-stretch !tw-leading-[10px]", children: children })) : (jsxRuntime.jsx("div", Object.assign({}, contentWrapperProps, { className: cn("tw-z-20 tw-max-w-full tw-text-caption tw-font-caption", contentWrapperProps === null || contentWrapperProps === void 0 ? void 0 : contentWrapperProps.className), children: children }))), jsxRuntime.jsx("div", { className: cn("tw-
|
|
8507
|
+
"before:tw-absolute before:tw-inset-0 before:-tw-z-[1] before:tw-h-full before:tw-w-full before:tw-backdrop-blur/20 before:tw-backdrop-saturate-150"), children: [typeof children === "string" ? (jsxRuntime.jsx(CaptionText, { className: "tw-z-20 tw-self-stretch !tw-leading-[10px]", children: children })) : (jsxRuntime.jsx("div", Object.assign({}, contentWrapperProps, { className: cn("tw-z-20 tw-max-w-full tw-text-caption tw-font-caption", contentWrapperProps === null || contentWrapperProps === void 0 ? void 0 : contentWrapperProps.className), children: children }))), jsxRuntime.jsx("div", { className: cn("tw-absolute tw-inset-0 tw-z-10 tw-h-full tw-w-full tw-border tw-border-material-light-thin tw-bg-menu-backdrop", borderRadiusClassMap[rounded]) })] }) })));
|
|
8508
8508
|
}
|
|
8509
8509
|
|
|
8510
8510
|
function Announcement({ message, detail, mainIcon, link, }) {
|
|
@@ -18802,7 +18802,7 @@ function NavigationBar(_a) {
|
|
|
18802
18802
|
// add small spacing on the right when back button is displayed to have the subtitle centered
|
|
18803
18803
|
displayBackButton &&
|
|
18804
18804
|
(!actions || actions.length === 0) &&
|
|
18805
|
-
"tw-mr-squid-xl mobile-lg:tw-mr-squid-m mobile-lg:tw-pr-squid-xxl "), children: jsxRuntime.jsx(BodyText, { size: "small", children: subtitle }) })) : null] }), title ? (jsxRuntime.jsx("div", { className: cn("tw-h-squid-xxl tw-w-full tw-
|
|
18805
|
+
"tw-mr-squid-xl mobile-lg:tw-mr-squid-m mobile-lg:tw-pr-squid-xxl "), children: jsxRuntime.jsx(BodyText, { size: "small", children: subtitle }) })) : null] }), title ? (jsxRuntime.jsx("div", { className: cn("tw-h-squid-xxl tw-w-full tw-items-center tw-px-squid-m tw-py-squid-xxs mobile-lg:tw-px-squid-l",
|
|
18806
18806
|
// hide the title on small screens when back button is displayed, so it's positioned on the left
|
|
18807
18807
|
displayBackButton
|
|
18808
18808
|
? "tw-hidden mobile-xs-height:tw-flex"
|
|
@@ -18824,7 +18824,7 @@ function ProductCard({ children }) {
|
|
|
18824
18824
|
}, [containerRef]);
|
|
18825
18825
|
return (jsxRuntime.jsx("div", { style: {
|
|
18826
18826
|
width: `min(100vw, ${MEDIA_QUERIES.MOBILE_LG.value}px)`,
|
|
18827
|
-
}, className: "
|
|
18827
|
+
}, className: "tw-flex tw-min-h-full tw-max-w-[100vw] tw-flex-col tw-justify-center tw-overflow-hidden tw-bg-grey-900 tw-text-grey-300 tw-shadow-container tw-outline tw-outline-1 tw-outline-material-light-thin mobile-lg:tw-max-w-card-large mobile-lg:tw-rounded-container", children: jsxRuntime.jsx("div", { ref: containerRef, className: "tw-relative tw-flex tw-h-card-small tw-w-full tw-flex-col tw-justify-end mobile-lg:tw-w-card-large mobile-xs-height:tw-h-card-compact mobile-sm-height:tw-h-card-large", children: children }) }));
|
|
18828
18828
|
}
|
|
18829
18829
|
function BorderedContainer({ children, className, }) {
|
|
18830
18830
|
return (jsxRuntime.jsx("section", { className: cn("tw-border-t tw-border-t-material-light-thin", className), children: children }));
|
|
@@ -19152,7 +19152,7 @@ function BaseDropdownMenuItem({ label, imageUrl, icon, labelClassName, onClick,
|
|
|
19152
19152
|
: {
|
|
19153
19153
|
ref: contentRef,
|
|
19154
19154
|
};
|
|
19155
|
-
return (jsxRuntime.jsxs("li", { ref: itemRef, className: "tw-max-h-squid-xl tw-w-full tw-min-w-[160px] tw-px-squid-xxs", children: [jsxRuntime.jsxs(ContentTag, Object.assign({}, contentTagProps, { onClick: onClick, className: cn("tw-
|
|
19155
|
+
return (jsxRuntime.jsxs("li", { ref: itemRef, className: "tw-max-h-squid-xl tw-w-full tw-min-w-[160px] tw-px-squid-xxs", children: [jsxRuntime.jsxs(ContentTag, Object.assign({}, contentTagProps, { onClick: onClick, className: cn("tw-flex tw-h-squid-l tw-w-full tw-cursor-pointer tw-items-center tw-gap-squid-xxs tw-rounded-menu-sm tw-px-squid-xxs hover:tw-bg-material-light-thin", isSelected && "tw-bg-material-light-thin"), children: [jsxRuntime.jsx("div", { className: "tw-flex tw-h-squid-m tw-w-squid-m tw-items-center tw-justify-between tw-rounded-menu-sm", children: imageUrl ? (jsxRuntime.jsx("img", { src: imageUrl, className: "tw-h-full tw-w-full tw-rounded-squid-xxs" })) : (icon) }), jsxRuntime.jsx(CaptionText, { className: cn(labelClassName, "tw-max-w-full tw-flex-1 tw-truncate tw-text-left !tw-leading-[18px]"), children: label }), (control === null || control === void 0 ? void 0 : control.type) === "switch" ? (jsxRuntime.jsx("span", { className: "tw-flex tw-items-center tw-pl-squid-l", children: jsxRuntime.jsx(Switch, Object.assign({ size: "small" }, control)) })) : detail ? (jsxRuntime.jsx("span", { className: "tw-flex tw-items-center tw-gap-squid-xxs", children: detail })) : null] })), children] }));
|
|
19156
19156
|
}
|
|
19157
19157
|
function DropdownMenuItem(props) {
|
|
19158
19158
|
if (props.submenu) {
|
package/dist/esm/index.js
CHANGED
|
@@ -8481,10 +8481,10 @@ const borderRadiusClassMap = {
|
|
|
8481
8481
|
};
|
|
8482
8482
|
function Menu(_a) {
|
|
8483
8483
|
var { children, containerClassName, contentClassName, rounded = "lg", menuRef, contentWrapperProps } = _a, props = __rest$1(_a, ["children", "containerClassName", "contentClassName", "rounded", "menuRef", "contentWrapperProps"]);
|
|
8484
|
-
return (jsx("div", Object.assign({}, props, { className: cn("tw-max-w-[320px]", containerClassName), ref: menuRef, children: jsxs("div", { className: cn("tw-
|
|
8484
|
+
return (jsx("div", Object.assign({}, props, { className: cn("tw-max-w-[320px]", containerClassName), ref: menuRef, children: jsxs("div", { className: cn("tw-relative tw-inline-flex tw-max-w-full tw-flex-col tw-items-center tw-justify-center tw-gap-squid-xs tw-bg-menu-bg tw-p-squid-xs tw-text-center tw-text-menu-text group-data-[squid-theme-type=dark]:tw-shadow-elevation-dark-2 group-data-[squid-theme-type=light]:tw-shadow-elevation-light-2", borderRadiusClassMap[rounded], contentClassName,
|
|
8485
8485
|
// :before element to create a backdrop
|
|
8486
8486
|
// Not applied to the div itself because the backdrop-filter spec does not apply nested backdrop filters
|
|
8487
|
-
"before:tw-absolute before:tw-inset-0 before:-tw-z-[1] before:tw-h-full before:tw-w-full before:tw-backdrop-blur/20 before:tw-backdrop-saturate-150"), children: [typeof children === "string" ? (jsx(CaptionText, { className: "tw-z-20 tw-self-stretch !tw-leading-[10px]", children: children })) : (jsx("div", Object.assign({}, contentWrapperProps, { className: cn("tw-z-20 tw-max-w-full tw-text-caption tw-font-caption", contentWrapperProps === null || contentWrapperProps === void 0 ? void 0 : contentWrapperProps.className), children: children }))), jsx("div", { className: cn("tw-
|
|
8487
|
+
"before:tw-absolute before:tw-inset-0 before:-tw-z-[1] before:tw-h-full before:tw-w-full before:tw-backdrop-blur/20 before:tw-backdrop-saturate-150"), children: [typeof children === "string" ? (jsx(CaptionText, { className: "tw-z-20 tw-self-stretch !tw-leading-[10px]", children: children })) : (jsx("div", Object.assign({}, contentWrapperProps, { className: cn("tw-z-20 tw-max-w-full tw-text-caption tw-font-caption", contentWrapperProps === null || contentWrapperProps === void 0 ? void 0 : contentWrapperProps.className), children: children }))), jsx("div", { className: cn("tw-absolute tw-inset-0 tw-z-10 tw-h-full tw-w-full tw-border tw-border-material-light-thin tw-bg-menu-backdrop", borderRadiusClassMap[rounded]) })] }) })));
|
|
8488
8488
|
}
|
|
8489
8489
|
|
|
8490
8490
|
function Announcement({ message, detail, mainIcon, link, }) {
|
|
@@ -18782,7 +18782,7 @@ function NavigationBar(_a) {
|
|
|
18782
18782
|
// add small spacing on the right when back button is displayed to have the subtitle centered
|
|
18783
18783
|
displayBackButton &&
|
|
18784
18784
|
(!actions || actions.length === 0) &&
|
|
18785
|
-
"tw-mr-squid-xl mobile-lg:tw-mr-squid-m mobile-lg:tw-pr-squid-xxl "), children: jsx(BodyText, { size: "small", children: subtitle }) })) : null] }), title ? (jsx("div", { className: cn("tw-h-squid-xxl tw-w-full tw-
|
|
18785
|
+
"tw-mr-squid-xl mobile-lg:tw-mr-squid-m mobile-lg:tw-pr-squid-xxl "), children: jsx(BodyText, { size: "small", children: subtitle }) })) : null] }), title ? (jsx("div", { className: cn("tw-h-squid-xxl tw-w-full tw-items-center tw-px-squid-m tw-py-squid-xxs mobile-lg:tw-px-squid-l",
|
|
18786
18786
|
// hide the title on small screens when back button is displayed, so it's positioned on the left
|
|
18787
18787
|
displayBackButton
|
|
18788
18788
|
? "tw-hidden mobile-xs-height:tw-flex"
|
|
@@ -18804,7 +18804,7 @@ function ProductCard({ children }) {
|
|
|
18804
18804
|
}, [containerRef]);
|
|
18805
18805
|
return (jsx("div", { style: {
|
|
18806
18806
|
width: `min(100vw, ${MEDIA_QUERIES.MOBILE_LG.value}px)`,
|
|
18807
|
-
}, className: "
|
|
18807
|
+
}, className: "tw-flex tw-min-h-full tw-max-w-[100vw] tw-flex-col tw-justify-center tw-overflow-hidden tw-bg-grey-900 tw-text-grey-300 tw-shadow-container tw-outline tw-outline-1 tw-outline-material-light-thin mobile-lg:tw-max-w-card-large mobile-lg:tw-rounded-container", children: jsx("div", { ref: containerRef, className: "tw-relative tw-flex tw-h-card-small tw-w-full tw-flex-col tw-justify-end mobile-lg:tw-w-card-large mobile-xs-height:tw-h-card-compact mobile-sm-height:tw-h-card-large", children: children }) }));
|
|
18808
18808
|
}
|
|
18809
18809
|
function BorderedContainer({ children, className, }) {
|
|
18810
18810
|
return (jsx("section", { className: cn("tw-border-t tw-border-t-material-light-thin", className), children: children }));
|
|
@@ -19132,7 +19132,7 @@ function BaseDropdownMenuItem({ label, imageUrl, icon, labelClassName, onClick,
|
|
|
19132
19132
|
: {
|
|
19133
19133
|
ref: contentRef,
|
|
19134
19134
|
};
|
|
19135
|
-
return (jsxs("li", { ref: itemRef, className: "tw-max-h-squid-xl tw-w-full tw-min-w-[160px] tw-px-squid-xxs", children: [jsxs(ContentTag, Object.assign({}, contentTagProps, { onClick: onClick, className: cn("tw-
|
|
19135
|
+
return (jsxs("li", { ref: itemRef, className: "tw-max-h-squid-xl tw-w-full tw-min-w-[160px] tw-px-squid-xxs", children: [jsxs(ContentTag, Object.assign({}, contentTagProps, { onClick: onClick, className: cn("tw-flex tw-h-squid-l tw-w-full tw-cursor-pointer tw-items-center tw-gap-squid-xxs tw-rounded-menu-sm tw-px-squid-xxs hover:tw-bg-material-light-thin", isSelected && "tw-bg-material-light-thin"), children: [jsx("div", { className: "tw-flex tw-h-squid-m tw-w-squid-m tw-items-center tw-justify-between tw-rounded-menu-sm", children: imageUrl ? (jsx("img", { src: imageUrl, className: "tw-h-full tw-w-full tw-rounded-squid-xxs" })) : (icon) }), jsx(CaptionText, { className: cn(labelClassName, "tw-max-w-full tw-flex-1 tw-truncate tw-text-left !tw-leading-[18px]"), children: label }), (control === null || control === void 0 ? void 0 : control.type) === "switch" ? (jsx("span", { className: "tw-flex tw-items-center tw-pl-squid-l", children: jsx(Switch, Object.assign({ size: "small" }, control)) })) : detail ? (jsx("span", { className: "tw-flex tw-items-center tw-gap-squid-xxs", children: detail })) : null] })), children] }));
|
|
19136
19136
|
}
|
|
19137
19137
|
function DropdownMenuItem(props) {
|
|
19138
19138
|
if (props.submenu) {
|