@0xsquid/ui 0.7.2 → 0.7.3
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 +8 -6
- package/dist/cjs/types/components/badges/LoadingSkeleton.d.ts +4 -0
- package/dist/cjs/types/components/lists/ListItem.d.ts +4 -1
- package/dist/cjs/types/stories/lists/ListItem.stories.d.ts +3 -0
- package/dist/esm/index.js +8 -6
- package/dist/esm/types/components/badges/LoadingSkeleton.d.ts +4 -0
- package/dist/esm/types/components/lists/ListItem.d.ts +4 -1
- package/dist/esm/types/stories/lists/ListItem.stories.d.ts +3 -0
- package/dist/index.css +17 -0
- package/dist/index.d.ts +4 -1
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -3043,15 +3043,20 @@ function HistoryItem({ firstImageUrl, secondImageUrl, isPending, dateCompleted,
|
|
|
3043
3043
|
] })) : null] }) }));
|
|
3044
3044
|
}
|
|
3045
3045
|
|
|
3046
|
+
function LoadingSkeleton({ className, height = '20', }) {
|
|
3047
|
+
return (jsxRuntime.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "100", height: height, viewBox: "0 0 100 20", fill: "none", className: className, children: [jsxRuntime.jsxs("g", { "clip-path": "url(#clip0_1083_18992)", children: [jsxRuntime.jsx("mask", { id: "mask0_1083_18992", style: { maskType: 'alpha' }, maskUnits: "userSpaceOnUse", x: "0", y: "0", width: "100", height: "20", children: jsxRuntime.jsx("rect", { width: "100", height: "20", fill: "url(#paint0_linear_1083_18992)" }) }), jsxRuntime.jsx("g", { mask: "url(#mask0_1083_18992)", children: jsxRuntime.jsx("rect", { width: "100", height: "20", fill: "currentColor" }) })] }), jsxRuntime.jsxs("defs", { children: [jsxRuntime.jsxs("linearGradient", { id: "paint0_linear_1083_18992", x1: "0", y1: "10", x2: "100", y2: "10", gradientUnits: "userSpaceOnUse", className: "tw-animate-loading-gradient", children: [jsxRuntime.jsx("stop", { "stop-color": "#D9D9D9", "stop-opacity": "0.33" }), jsxRuntime.jsx("stop", { offset: "0.395881", "stop-color": "#737373", "stop-opacity": "0.33" }), jsxRuntime.jsx("stop", { offset: "0.597867", "stop-color": "#737373", "stop-opacity": "0.66" }), jsxRuntime.jsx("stop", { offset: "0.697004", "stop-color": "#737373", "stop-opacity": "0.33" })] }), jsxRuntime.jsx("clipPath", { id: "clip0_1083_18992", children: jsxRuntime.jsx("path", { d: "M0 10C0 4.47715 4.47715 0 10 0H90C95.5228 0 100 4.47715 100 10C100 15.5228 95.5229 20 90 20H10C4.47716 20 0 15.5228 0 10Z", fill: "white" }) })] })] }));
|
|
3048
|
+
}
|
|
3049
|
+
|
|
3046
3050
|
const listItemSizeMap = {
|
|
3047
3051
|
small: 'tw-max-w-list-item-small tw-h-list-item-small tw-px-squid-xs',
|
|
3048
3052
|
large: 'tw-max-w-list-item-large tw-h-list-item-large tw-px-squid-xs',
|
|
3049
3053
|
};
|
|
3050
3054
|
function ListItem(_a) {
|
|
3051
|
-
var { itemTitle, mainImageUrl, subtitle, detail, icon, secondaryImageUrl, size = 'large', mainIcon, className, isSelected, onDetailClick, showDetailOnHoverOnly, rounded = false, detailButtonClassName } = _a, props = __rest(_a, ["itemTitle", "mainImageUrl", "subtitle", "detail", "icon", "secondaryImageUrl", "size", "mainIcon", "className", "isSelected", "onDetailClick", "showDetailOnHoverOnly", "rounded", "detailButtonClassName"]);
|
|
3052
|
-
return (jsxRuntime.jsx("li", Object.assign({}, props, { className: cn('tw-group/list-item tw-flex tw-bg-grey-900 tw-text-grey-300', listItemSizeMap[size], className), children: jsxRuntime.jsxs("div", { className: cn('tw-flex tw-w-full tw-cursor-pointer tw-items-center tw-justify-start tw-gap-squid-xs tw-rounded-squid-s tw-px-squid-xs tw-py-squid-xxs hover:tw-bg-material-light-thin', isSelected && 'tw-bg-material-light-thin'), children: [size === 'large' ? (jsxRuntime.jsx("div", { className: "tw-h-10 tw-w-10", children: mainIcon ? (mainIcon) : (jsxRuntime.jsx(BadgeImage, { extraMarginForBadge: false, imageUrl: mainImageUrl, badgeUrl: secondaryImageUrl, size: "md", rounded: rounded })) })) : (jsxRuntime.jsx("div", { className: "tw-flex tw-min-h-[30px] tw-min-w-[30px] tw-items-center tw-justify-center", children: mainIcon ? (mainIcon) : (jsxRuntime.jsx("img", { src: mainImageUrl, className: "tw-h-[30px] tw-w-[30px] tw-rounded-squid-xs" })) })), jsxRuntime.jsxs("div", { className: cn('tw-flex tw-h-[40px] tw-
|
|
3055
|
+
var { itemTitle, mainImageUrl, subtitle, detail, icon, secondaryImageUrl, size = 'large', mainIcon, className, isSelected, onDetailClick, showDetailOnHoverOnly, rounded = false, detailButtonClassName, loading } = _a, props = __rest(_a, ["itemTitle", "mainImageUrl", "subtitle", "detail", "icon", "secondaryImageUrl", "size", "mainIcon", "className", "isSelected", "onDetailClick", "showDetailOnHoverOnly", "rounded", "detailButtonClassName", "loading"]);
|
|
3056
|
+
return (jsxRuntime.jsx("li", Object.assign({}, props, { className: cn('tw-group/list-item tw-flex tw-max-w-full tw-bg-grey-900 tw-text-grey-300', listItemSizeMap[size], className), children: jsxRuntime.jsxs("div", { className: cn('tw-flex tw-w-full tw-max-w-full tw-cursor-pointer tw-items-center tw-justify-start tw-gap-squid-xs tw-rounded-squid-s tw-px-squid-xs tw-py-squid-xxs hover:tw-bg-material-light-thin', isSelected && 'tw-bg-material-light-thin'), children: [size === 'large' ? (jsxRuntime.jsx("div", { className: "tw-h-10 tw-w-10", children: mainIcon ? (mainIcon) : (jsxRuntime.jsx(BadgeImage, { extraMarginForBadge: false, imageUrl: mainImageUrl, badgeUrl: secondaryImageUrl, size: "md", rounded: rounded })) })) : (jsxRuntime.jsx("div", { className: "tw-flex tw-min-h-[30px] tw-min-w-[30px] tw-items-center tw-justify-center", children: mainIcon ? (mainIcon) : (jsxRuntime.jsx("img", { src: mainImageUrl, className: "tw-h-[30px] tw-w-[30px] tw-rounded-squid-xs" })) })), jsxRuntime.jsxs("div", { className: cn('tw-flex tw-h-[40px] tw-flex-1 tw-flex-col tw-items-start tw-justify-center tw-gap-squid-xs',
|
|
3053
3057
|
// 'large' variant has extra padding
|
|
3054
|
-
size === 'large'
|
|
3058
|
+
size === 'large' ? 'tw-w-[56%] tw-pl-squid-xxs' : 'tw-w-[67%]'), children: [typeof itemTitle === 'string' ? (jsxRuntime.jsx(BodyText, { size: "small", className: "tw-max-w-full tw-truncate !tw-leading-[18px]", children: itemTitle })) : (itemTitle), size === 'large' &&
|
|
3059
|
+
((loading === null || loading === void 0 ? void 0 : loading.subtitle) ? (jsxRuntime.jsx(LoadingSkeleton, { className: "-tw-translate-x-6 tw-text-grey-500", height: "10" })) : subtitle ? (jsxRuntime.jsx(CaptionText, { className: "tw-h-squid-xs !tw-leading-[10px] tw-text-grey-500", children: subtitle })) : null)] }), jsxRuntime.jsxs("button", { onClick: (event) => {
|
|
3055
3060
|
// prevent click event from bubbling up to parent
|
|
3056
3061
|
event.stopPropagation();
|
|
3057
3062
|
onDetailClick === null || onDetailClick === void 0 ? void 0 : onDetailClick();
|
|
@@ -3079,9 +3084,6 @@ function SettingsItem({ icon, label, controls, transparentControls = false, show
|
|
|
3079
3084
|
function SwapDetailListItem({ label, detail, icon, isLoading = false, }) {
|
|
3080
3085
|
return (jsxRuntime.jsx("li", { className: "tw-swap-detail-list-item-gradient tw-h-squid-l tw-w-full tw-bg-grey-800 tw-px-squid-xs tw-text-grey-300", children: jsxRuntime.jsxs("div", { className: "tw-flex tw-h-squid-l tw-items-center tw-justify-between tw-gap-squid-xs tw-rounded-squid-xs tw-px-squid-xs", children: [jsxRuntime.jsx("div", { className: "tw-h-6 tw-w-6 tw-text-grey-500", children: icon }), jsxRuntime.jsx(CaptionText, { className: "tw-flex-1 tw-text-grey-500", children: label }), isLoading ? (jsxRuntime.jsx(LoadingSkeleton, { className: "tw-text-grey-500" })) : typeof detail === 'string' ? (jsxRuntime.jsx(CaptionText, { children: detail })) : (detail)] }) }));
|
|
3081
3086
|
}
|
|
3082
|
-
function LoadingSkeleton({ className }) {
|
|
3083
|
-
return (jsxRuntime.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "100", height: "20", viewBox: "0 0 100 20", fill: "none", className: className, children: [jsxRuntime.jsxs("g", { "clip-path": "url(#clip0_1083_18992)", children: [jsxRuntime.jsx("mask", { id: "mask0_1083_18992", style: { maskType: 'alpha' }, maskUnits: "userSpaceOnUse", x: "0", y: "0", width: "100", height: "20", children: jsxRuntime.jsx("rect", { width: "100", height: "20", fill: "url(#paint0_linear_1083_18992)" }) }), jsxRuntime.jsx("g", { mask: "url(#mask0_1083_18992)", children: jsxRuntime.jsx("rect", { width: "100", height: "20", fill: "currentColor" }) })] }), jsxRuntime.jsxs("defs", { children: [jsxRuntime.jsxs("linearGradient", { id: "paint0_linear_1083_18992", x1: "0", y1: "10", x2: "100", y2: "10", gradientUnits: "userSpaceOnUse", className: "tw-animate-loading-gradient", children: [jsxRuntime.jsx("stop", { "stop-color": "#D9D9D9", "stop-opacity": "0.33" }), jsxRuntime.jsx("stop", { offset: "0.395881", "stop-color": "#737373", "stop-opacity": "0.33" }), jsxRuntime.jsx("stop", { offset: "0.597867", "stop-color": "#737373", "stop-opacity": "0.66" }), jsxRuntime.jsx("stop", { offset: "0.697004", "stop-color": "#737373", "stop-opacity": "0.33" })] }), jsxRuntime.jsx("clipPath", { id: "clip0_1083_18992", children: jsxRuntime.jsx("path", { d: "M0 10C0 4.47715 4.47715 0 10 0H90C95.5228 0 100 4.47715 100 10C100 15.5228 95.5229 20 90 20H10C4.47716 20 0 15.5228 0 10Z", fill: "white" }) })] })] }));
|
|
3084
|
-
}
|
|
3085
3087
|
|
|
3086
3088
|
function SwapStepSeparator() {
|
|
3087
3089
|
return (jsxRuntime.jsx("span", { className: "tw-flex tw-h-squid-m tw-w-squid-xxl tw-items-center tw-justify-center tw-self-stretch tw-py-0.5", children: jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "4", height: "21", viewBox: "0 0 4 21", fill: "none", children: jsxRuntime.jsx("path", { d: "M2 2.5V18.5", stroke: "currentColor", "stroke-width": "4", "stroke-linecap": "round" }) }) }));
|
|
@@ -14,7 +14,10 @@ interface ListItemProps extends React.HTMLAttributes<HTMLLIElement> {
|
|
|
14
14
|
showDetailOnHoverOnly?: boolean;
|
|
15
15
|
rounded?: boolean;
|
|
16
16
|
detailButtonClassName?: string;
|
|
17
|
+
loading?: {
|
|
18
|
+
subtitle?: boolean;
|
|
19
|
+
};
|
|
17
20
|
}
|
|
18
21
|
type ListItemSize = 'small' | 'large';
|
|
19
|
-
export declare function ListItem({ itemTitle, mainImageUrl, subtitle, detail, icon, secondaryImageUrl, size, mainIcon, className, isSelected, onDetailClick, showDetailOnHoverOnly, rounded, detailButtonClassName, ...props }: ListItemProps): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export declare function ListItem({ itemTitle, mainImageUrl, subtitle, detail, icon, secondaryImageUrl, size, mainIcon, className, isSelected, onDetailClick, showDetailOnHoverOnly, rounded, detailButtonClassName, loading, ...props }: ListItemProps): import("react/jsx-runtime").JSX.Element;
|
|
20
23
|
export {};
|
|
@@ -4,6 +4,7 @@ declare const meta: Meta<typeof ListItem>;
|
|
|
4
4
|
export default meta;
|
|
5
5
|
type Story = StoryObj<typeof meta>;
|
|
6
6
|
export declare const Large: Story;
|
|
7
|
+
export declare const LargeWithLongTitle: Story;
|
|
7
8
|
export declare const LargeRoundedFull: Story;
|
|
8
9
|
export declare const LargeWithSubtitle: Story;
|
|
9
10
|
export declare const LargeWithDetail: Story;
|
|
@@ -13,7 +14,9 @@ export declare const LargeShowDetailOnHoverOnly: Story;
|
|
|
13
14
|
export declare const LargeWithSecondaryImage: Story;
|
|
14
15
|
export declare const LargeSelected: Story;
|
|
15
16
|
export declare const LargeWithCustomIconAsImage: Story;
|
|
17
|
+
export declare const LargeLoading: Story;
|
|
16
18
|
export declare const Small: Story;
|
|
19
|
+
export declare const SmallWithLongTitle: Story;
|
|
17
20
|
export declare const SmallWithIcon: Story;
|
|
18
21
|
export declare const SmallShowDetailOnHoverOnly: Story;
|
|
19
22
|
export declare const SmallSelected: Story;
|
package/dist/esm/index.js
CHANGED
|
@@ -3041,15 +3041,20 @@ function HistoryItem({ firstImageUrl, secondImageUrl, isPending, dateCompleted,
|
|
|
3041
3041
|
] })) : null] }) }));
|
|
3042
3042
|
}
|
|
3043
3043
|
|
|
3044
|
+
function LoadingSkeleton({ className, height = '20', }) {
|
|
3045
|
+
return (jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "100", height: height, viewBox: "0 0 100 20", fill: "none", className: className, children: [jsxs("g", { "clip-path": "url(#clip0_1083_18992)", children: [jsx("mask", { id: "mask0_1083_18992", style: { maskType: 'alpha' }, maskUnits: "userSpaceOnUse", x: "0", y: "0", width: "100", height: "20", children: jsx("rect", { width: "100", height: "20", fill: "url(#paint0_linear_1083_18992)" }) }), jsx("g", { mask: "url(#mask0_1083_18992)", children: jsx("rect", { width: "100", height: "20", fill: "currentColor" }) })] }), jsxs("defs", { children: [jsxs("linearGradient", { id: "paint0_linear_1083_18992", x1: "0", y1: "10", x2: "100", y2: "10", gradientUnits: "userSpaceOnUse", className: "tw-animate-loading-gradient", children: [jsx("stop", { "stop-color": "#D9D9D9", "stop-opacity": "0.33" }), jsx("stop", { offset: "0.395881", "stop-color": "#737373", "stop-opacity": "0.33" }), jsx("stop", { offset: "0.597867", "stop-color": "#737373", "stop-opacity": "0.66" }), jsx("stop", { offset: "0.697004", "stop-color": "#737373", "stop-opacity": "0.33" })] }), jsx("clipPath", { id: "clip0_1083_18992", children: jsx("path", { d: "M0 10C0 4.47715 4.47715 0 10 0H90C95.5228 0 100 4.47715 100 10C100 15.5228 95.5229 20 90 20H10C4.47716 20 0 15.5228 0 10Z", fill: "white" }) })] })] }));
|
|
3046
|
+
}
|
|
3047
|
+
|
|
3044
3048
|
const listItemSizeMap = {
|
|
3045
3049
|
small: 'tw-max-w-list-item-small tw-h-list-item-small tw-px-squid-xs',
|
|
3046
3050
|
large: 'tw-max-w-list-item-large tw-h-list-item-large tw-px-squid-xs',
|
|
3047
3051
|
};
|
|
3048
3052
|
function ListItem(_a) {
|
|
3049
|
-
var { itemTitle, mainImageUrl, subtitle, detail, icon, secondaryImageUrl, size = 'large', mainIcon, className, isSelected, onDetailClick, showDetailOnHoverOnly, rounded = false, detailButtonClassName } = _a, props = __rest(_a, ["itemTitle", "mainImageUrl", "subtitle", "detail", "icon", "secondaryImageUrl", "size", "mainIcon", "className", "isSelected", "onDetailClick", "showDetailOnHoverOnly", "rounded", "detailButtonClassName"]);
|
|
3050
|
-
return (jsx("li", Object.assign({}, props, { className: cn('tw-group/list-item tw-flex tw-bg-grey-900 tw-text-grey-300', listItemSizeMap[size], className), children: jsxs("div", { className: cn('tw-flex tw-w-full tw-cursor-pointer tw-items-center tw-justify-start tw-gap-squid-xs tw-rounded-squid-s tw-px-squid-xs tw-py-squid-xxs hover:tw-bg-material-light-thin', isSelected && 'tw-bg-material-light-thin'), children: [size === 'large' ? (jsx("div", { className: "tw-h-10 tw-w-10", children: mainIcon ? (mainIcon) : (jsx(BadgeImage, { extraMarginForBadge: false, imageUrl: mainImageUrl, badgeUrl: secondaryImageUrl, size: "md", rounded: rounded })) })) : (jsx("div", { className: "tw-flex tw-min-h-[30px] tw-min-w-[30px] tw-items-center tw-justify-center", children: mainIcon ? (mainIcon) : (jsx("img", { src: mainImageUrl, className: "tw-h-[30px] tw-w-[30px] tw-rounded-squid-xs" })) })), jsxs("div", { className: cn('tw-flex tw-h-[40px] tw-
|
|
3053
|
+
var { itemTitle, mainImageUrl, subtitle, detail, icon, secondaryImageUrl, size = 'large', mainIcon, className, isSelected, onDetailClick, showDetailOnHoverOnly, rounded = false, detailButtonClassName, loading } = _a, props = __rest(_a, ["itemTitle", "mainImageUrl", "subtitle", "detail", "icon", "secondaryImageUrl", "size", "mainIcon", "className", "isSelected", "onDetailClick", "showDetailOnHoverOnly", "rounded", "detailButtonClassName", "loading"]);
|
|
3054
|
+
return (jsx("li", Object.assign({}, props, { className: cn('tw-group/list-item tw-flex tw-max-w-full tw-bg-grey-900 tw-text-grey-300', listItemSizeMap[size], className), children: jsxs("div", { className: cn('tw-flex tw-w-full tw-max-w-full tw-cursor-pointer tw-items-center tw-justify-start tw-gap-squid-xs tw-rounded-squid-s tw-px-squid-xs tw-py-squid-xxs hover:tw-bg-material-light-thin', isSelected && 'tw-bg-material-light-thin'), children: [size === 'large' ? (jsx("div", { className: "tw-h-10 tw-w-10", children: mainIcon ? (mainIcon) : (jsx(BadgeImage, { extraMarginForBadge: false, imageUrl: mainImageUrl, badgeUrl: secondaryImageUrl, size: "md", rounded: rounded })) })) : (jsx("div", { className: "tw-flex tw-min-h-[30px] tw-min-w-[30px] tw-items-center tw-justify-center", children: mainIcon ? (mainIcon) : (jsx("img", { src: mainImageUrl, className: "tw-h-[30px] tw-w-[30px] tw-rounded-squid-xs" })) })), jsxs("div", { className: cn('tw-flex tw-h-[40px] tw-flex-1 tw-flex-col tw-items-start tw-justify-center tw-gap-squid-xs',
|
|
3051
3055
|
// 'large' variant has extra padding
|
|
3052
|
-
size === 'large'
|
|
3056
|
+
size === 'large' ? 'tw-w-[56%] tw-pl-squid-xxs' : 'tw-w-[67%]'), children: [typeof itemTitle === 'string' ? (jsx(BodyText, { size: "small", className: "tw-max-w-full tw-truncate !tw-leading-[18px]", children: itemTitle })) : (itemTitle), size === 'large' &&
|
|
3057
|
+
((loading === null || loading === void 0 ? void 0 : loading.subtitle) ? (jsx(LoadingSkeleton, { className: "-tw-translate-x-6 tw-text-grey-500", height: "10" })) : subtitle ? (jsx(CaptionText, { className: "tw-h-squid-xs !tw-leading-[10px] tw-text-grey-500", children: subtitle })) : null)] }), jsxs("button", { onClick: (event) => {
|
|
3053
3058
|
// prevent click event from bubbling up to parent
|
|
3054
3059
|
event.stopPropagation();
|
|
3055
3060
|
onDetailClick === null || onDetailClick === void 0 ? void 0 : onDetailClick();
|
|
@@ -3077,9 +3082,6 @@ function SettingsItem({ icon, label, controls, transparentControls = false, show
|
|
|
3077
3082
|
function SwapDetailListItem({ label, detail, icon, isLoading = false, }) {
|
|
3078
3083
|
return (jsx("li", { className: "tw-swap-detail-list-item-gradient tw-h-squid-l tw-w-full tw-bg-grey-800 tw-px-squid-xs tw-text-grey-300", children: jsxs("div", { className: "tw-flex tw-h-squid-l tw-items-center tw-justify-between tw-gap-squid-xs tw-rounded-squid-xs tw-px-squid-xs", children: [jsx("div", { className: "tw-h-6 tw-w-6 tw-text-grey-500", children: icon }), jsx(CaptionText, { className: "tw-flex-1 tw-text-grey-500", children: label }), isLoading ? (jsx(LoadingSkeleton, { className: "tw-text-grey-500" })) : typeof detail === 'string' ? (jsx(CaptionText, { children: detail })) : (detail)] }) }));
|
|
3079
3084
|
}
|
|
3080
|
-
function LoadingSkeleton({ className }) {
|
|
3081
|
-
return (jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "100", height: "20", viewBox: "0 0 100 20", fill: "none", className: className, children: [jsxs("g", { "clip-path": "url(#clip0_1083_18992)", children: [jsx("mask", { id: "mask0_1083_18992", style: { maskType: 'alpha' }, maskUnits: "userSpaceOnUse", x: "0", y: "0", width: "100", height: "20", children: jsx("rect", { width: "100", height: "20", fill: "url(#paint0_linear_1083_18992)" }) }), jsx("g", { mask: "url(#mask0_1083_18992)", children: jsx("rect", { width: "100", height: "20", fill: "currentColor" }) })] }), jsxs("defs", { children: [jsxs("linearGradient", { id: "paint0_linear_1083_18992", x1: "0", y1: "10", x2: "100", y2: "10", gradientUnits: "userSpaceOnUse", className: "tw-animate-loading-gradient", children: [jsx("stop", { "stop-color": "#D9D9D9", "stop-opacity": "0.33" }), jsx("stop", { offset: "0.395881", "stop-color": "#737373", "stop-opacity": "0.33" }), jsx("stop", { offset: "0.597867", "stop-color": "#737373", "stop-opacity": "0.66" }), jsx("stop", { offset: "0.697004", "stop-color": "#737373", "stop-opacity": "0.33" })] }), jsx("clipPath", { id: "clip0_1083_18992", children: jsx("path", { d: "M0 10C0 4.47715 4.47715 0 10 0H90C95.5228 0 100 4.47715 100 10C100 15.5228 95.5229 20 90 20H10C4.47716 20 0 15.5228 0 10Z", fill: "white" }) })] })] }));
|
|
3082
|
-
}
|
|
3083
3085
|
|
|
3084
3086
|
function SwapStepSeparator() {
|
|
3085
3087
|
return (jsx("span", { className: "tw-flex tw-h-squid-m tw-w-squid-xxl tw-items-center tw-justify-center tw-self-stretch tw-py-0.5", children: jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "4", height: "21", viewBox: "0 0 4 21", fill: "none", children: jsx("path", { d: "M2 2.5V18.5", stroke: "currentColor", "stroke-width": "4", "stroke-linecap": "round" }) }) }));
|
|
@@ -14,7 +14,10 @@ interface ListItemProps extends React.HTMLAttributes<HTMLLIElement> {
|
|
|
14
14
|
showDetailOnHoverOnly?: boolean;
|
|
15
15
|
rounded?: boolean;
|
|
16
16
|
detailButtonClassName?: string;
|
|
17
|
+
loading?: {
|
|
18
|
+
subtitle?: boolean;
|
|
19
|
+
};
|
|
17
20
|
}
|
|
18
21
|
type ListItemSize = 'small' | 'large';
|
|
19
|
-
export declare function ListItem({ itemTitle, mainImageUrl, subtitle, detail, icon, secondaryImageUrl, size, mainIcon, className, isSelected, onDetailClick, showDetailOnHoverOnly, rounded, detailButtonClassName, ...props }: ListItemProps): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export declare function ListItem({ itemTitle, mainImageUrl, subtitle, detail, icon, secondaryImageUrl, size, mainIcon, className, isSelected, onDetailClick, showDetailOnHoverOnly, rounded, detailButtonClassName, loading, ...props }: ListItemProps): import("react/jsx-runtime").JSX.Element;
|
|
20
23
|
export {};
|
|
@@ -4,6 +4,7 @@ declare const meta: Meta<typeof ListItem>;
|
|
|
4
4
|
export default meta;
|
|
5
5
|
type Story = StoryObj<typeof meta>;
|
|
6
6
|
export declare const Large: Story;
|
|
7
|
+
export declare const LargeWithLongTitle: Story;
|
|
7
8
|
export declare const LargeRoundedFull: Story;
|
|
8
9
|
export declare const LargeWithSubtitle: Story;
|
|
9
10
|
export declare const LargeWithDetail: Story;
|
|
@@ -13,7 +14,9 @@ export declare const LargeShowDetailOnHoverOnly: Story;
|
|
|
13
14
|
export declare const LargeWithSecondaryImage: Story;
|
|
14
15
|
export declare const LargeSelected: Story;
|
|
15
16
|
export declare const LargeWithCustomIconAsImage: Story;
|
|
17
|
+
export declare const LargeLoading: Story;
|
|
16
18
|
export declare const Small: Story;
|
|
19
|
+
export declare const SmallWithLongTitle: Story;
|
|
17
20
|
export declare const SmallWithIcon: Story;
|
|
18
21
|
export declare const SmallShowDetailOnHoverOnly: Story;
|
|
19
22
|
export declare const SmallSelected: Story;
|
package/dist/index.css
CHANGED
|
@@ -1139,10 +1139,18 @@ video {
|
|
|
1139
1139
|
width: 54px;
|
|
1140
1140
|
}
|
|
1141
1141
|
|
|
1142
|
+
.tw-w-\[56\%\] {
|
|
1143
|
+
width: 56%;
|
|
1144
|
+
}
|
|
1145
|
+
|
|
1142
1146
|
.tw-w-\[60px\] {
|
|
1143
1147
|
width: 60px;
|
|
1144
1148
|
}
|
|
1145
1149
|
|
|
1150
|
+
.tw-w-\[67\%\] {
|
|
1151
|
+
width: 67%;
|
|
1152
|
+
}
|
|
1153
|
+
|
|
1146
1154
|
.tw-w-\[72px\] {
|
|
1147
1155
|
width: 72px;
|
|
1148
1156
|
}
|
|
@@ -1245,6 +1253,10 @@ video {
|
|
|
1245
1253
|
max-width: 72px;
|
|
1246
1254
|
}
|
|
1247
1255
|
|
|
1256
|
+
.tw-max-w-full {
|
|
1257
|
+
max-width: 100%;
|
|
1258
|
+
}
|
|
1259
|
+
|
|
1248
1260
|
.tw-max-w-list-item-large {
|
|
1249
1261
|
max-width: 23.75rem;
|
|
1250
1262
|
}
|
|
@@ -1279,6 +1291,11 @@ video {
|
|
|
1279
1291
|
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
|
1280
1292
|
}
|
|
1281
1293
|
|
|
1294
|
+
.-tw-translate-x-6 {
|
|
1295
|
+
--tw-translate-x: -1.5rem;
|
|
1296
|
+
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
|
1297
|
+
}
|
|
1298
|
+
|
|
1282
1299
|
.-tw-translate-x-\[2px\] {
|
|
1283
1300
|
--tw-translate-x: -2px;
|
|
1284
1301
|
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
package/dist/index.d.ts
CHANGED
|
@@ -197,9 +197,12 @@ interface ListItemProps extends React.HTMLAttributes<HTMLLIElement> {
|
|
|
197
197
|
showDetailOnHoverOnly?: boolean;
|
|
198
198
|
rounded?: boolean;
|
|
199
199
|
detailButtonClassName?: string;
|
|
200
|
+
loading?: {
|
|
201
|
+
subtitle?: boolean;
|
|
202
|
+
};
|
|
200
203
|
}
|
|
201
204
|
type ListItemSize = 'small' | 'large';
|
|
202
|
-
declare function ListItem({ itemTitle, mainImageUrl, subtitle, detail, icon, secondaryImageUrl, size, mainIcon, className, isSelected, onDetailClick, showDetailOnHoverOnly, rounded, detailButtonClassName, ...props }: ListItemProps): react_jsx_runtime.JSX.Element;
|
|
205
|
+
declare function ListItem({ itemTitle, mainImageUrl, subtitle, detail, icon, secondaryImageUrl, size, mainIcon, className, isSelected, onDetailClick, showDetailOnHoverOnly, rounded, detailButtonClassName, loading, ...props }: ListItemProps): react_jsx_runtime.JSX.Element;
|
|
203
206
|
|
|
204
207
|
interface MenuItemProps {
|
|
205
208
|
label: string;
|