@0xsquid/ui 0.23.1 → 0.23.2-beta.1
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 +501 -111
- package/dist/cjs/types/components/lists/ListItem.d.ts +2 -1
- package/dist/cjs/types/core/design-system.d.ts +2 -0
- package/dist/cjs/types/core/index.d.ts +2 -0
- package/dist/cjs/types/core/themes.d.ts +1 -0
- package/dist/cjs/types/stories/lists/ListItem.stories.d.ts +2 -0
- package/dist/cjs/types/types/config.d.ts +5 -24
- package/dist/esm/index.js +499 -112
- package/dist/esm/types/components/lists/ListItem.d.ts +2 -1
- package/dist/esm/types/core/design-system.d.ts +2 -0
- package/dist/esm/types/core/index.d.ts +2 -0
- package/dist/esm/types/core/themes.d.ts +1 -0
- package/dist/esm/types/stories/lists/ListItem.stories.d.ts +2 -0
- package/dist/esm/types/types/config.d.ts +5 -24
- package/dist/index.d.ts +11 -2
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -3042,78 +3042,112 @@ function ArrowButton(_a) {
|
|
|
3042
3042
|
'aria-disabled:tw-bg-grey-600 aria-disabled:tw-text-grey-800'), children: jsxRuntime.jsx(ArrowRightIcon, {}) })] })));
|
|
3043
3043
|
}
|
|
3044
3044
|
|
|
3045
|
+
const INTERNAL_SQUID_THEME_KEYS = [
|
|
3046
|
+
'grey-100',
|
|
3047
|
+
'grey-200',
|
|
3048
|
+
'grey-300',
|
|
3049
|
+
'grey-400',
|
|
3050
|
+
'grey-500',
|
|
3051
|
+
'grey-600',
|
|
3052
|
+
'grey-700',
|
|
3053
|
+
'grey-800',
|
|
3054
|
+
'grey-900',
|
|
3055
|
+
'royal-300',
|
|
3056
|
+
'royal-400',
|
|
3057
|
+
'royal-500',
|
|
3058
|
+
'royal-700',
|
|
3059
|
+
'status-positive',
|
|
3060
|
+
'status-negative',
|
|
3061
|
+
'status-partial',
|
|
3062
|
+
'material-light-thin',
|
|
3063
|
+
'material-light-average',
|
|
3064
|
+
'material-light-thick',
|
|
3065
|
+
'material-dark-thin',
|
|
3066
|
+
'material-dark-average',
|
|
3067
|
+
'material-dark-thick',
|
|
3068
|
+
// grey-100 with 0.05 opacity
|
|
3069
|
+
'grey-100-005',
|
|
3070
|
+
// material-light and grey-900 blended color
|
|
3071
|
+
'material-light-blend-grey-900',
|
|
3072
|
+
];
|
|
3045
3073
|
const SQUID_THEME_CSS_VARIABLE_PREFIX = '--squid-theme-';
|
|
3046
3074
|
/**
|
|
3047
3075
|
* Mapping between readable variables name and css variables used TailwindCSS config
|
|
3048
3076
|
*/
|
|
3049
|
-
const themeTypesKeys =
|
|
3050
|
-
|
|
3051
|
-
|
|
3052
|
-
|
|
3053
|
-
'grey-200': {
|
|
3054
|
-
cssVariable: `${SQUID_THEME_CSS_VARIABLE_PREFIX}grey-200`,
|
|
3055
|
-
},
|
|
3056
|
-
'grey-300': {
|
|
3057
|
-
cssVariable: `${SQUID_THEME_CSS_VARIABLE_PREFIX}grey-300`,
|
|
3058
|
-
},
|
|
3059
|
-
'grey-400': {
|
|
3060
|
-
cssVariable: `${SQUID_THEME_CSS_VARIABLE_PREFIX}grey-400`,
|
|
3061
|
-
},
|
|
3062
|
-
'grey-500': {
|
|
3063
|
-
cssVariable: `${SQUID_THEME_CSS_VARIABLE_PREFIX}grey-500`,
|
|
3064
|
-
},
|
|
3065
|
-
'grey-600': {
|
|
3066
|
-
cssVariable: `${SQUID_THEME_CSS_VARIABLE_PREFIX}grey-600`,
|
|
3067
|
-
},
|
|
3068
|
-
'grey-700': {
|
|
3069
|
-
cssVariable: `${SQUID_THEME_CSS_VARIABLE_PREFIX}grey-700`,
|
|
3070
|
-
},
|
|
3071
|
-
'grey-800': {
|
|
3072
|
-
cssVariable: `${SQUID_THEME_CSS_VARIABLE_PREFIX}grey-800`,
|
|
3073
|
-
},
|
|
3074
|
-
'grey-900': {
|
|
3075
|
-
cssVariable: `${SQUID_THEME_CSS_VARIABLE_PREFIX}grey-900`,
|
|
3076
|
-
},
|
|
3077
|
-
'material-dark-average': {
|
|
3078
|
-
cssVariable: `${SQUID_THEME_CSS_VARIABLE_PREFIX}material-dark-average`,
|
|
3079
|
-
},
|
|
3080
|
-
'material-dark-thick': {
|
|
3081
|
-
cssVariable: `${SQUID_THEME_CSS_VARIABLE_PREFIX}material-dark-thick`,
|
|
3082
|
-
},
|
|
3083
|
-
'material-dark-thin': {
|
|
3084
|
-
cssVariable: `${SQUID_THEME_CSS_VARIABLE_PREFIX}material-dark-thin`,
|
|
3085
|
-
},
|
|
3086
|
-
'material-light-average': {
|
|
3087
|
-
cssVariable: `${SQUID_THEME_CSS_VARIABLE_PREFIX}material-light-average`,
|
|
3088
|
-
},
|
|
3089
|
-
'material-light-thick': {
|
|
3090
|
-
cssVariable: `${SQUID_THEME_CSS_VARIABLE_PREFIX}material-light-thick`,
|
|
3091
|
-
},
|
|
3092
|
-
'material-light-thin': {
|
|
3093
|
-
cssVariable: `${SQUID_THEME_CSS_VARIABLE_PREFIX}material-light-thin`,
|
|
3094
|
-
},
|
|
3095
|
-
'royal-400': {
|
|
3096
|
-
cssVariable: `${SQUID_THEME_CSS_VARIABLE_PREFIX}royal-400`,
|
|
3097
|
-
},
|
|
3098
|
-
'royal-500': {
|
|
3099
|
-
cssVariable: `${SQUID_THEME_CSS_VARIABLE_PREFIX}royal-500`,
|
|
3100
|
-
},
|
|
3101
|
-
'status-negative': {
|
|
3102
|
-
cssVariable: `${SQUID_THEME_CSS_VARIABLE_PREFIX}status-negative`,
|
|
3103
|
-
},
|
|
3104
|
-
'status-positive': {
|
|
3105
|
-
cssVariable: `${SQUID_THEME_CSS_VARIABLE_PREFIX}status-positive`,
|
|
3106
|
-
},
|
|
3107
|
-
'status-partial': {
|
|
3108
|
-
cssVariable: `${SQUID_THEME_CSS_VARIABLE_PREFIX}status-partial`,
|
|
3109
|
-
},
|
|
3110
|
-
'grey-100-005': {
|
|
3111
|
-
cssVariable: `${SQUID_THEME_CSS_VARIABLE_PREFIX}grey-100-005`,
|
|
3112
|
-
},
|
|
3113
|
-
'material-light-blend-grey-900': {
|
|
3114
|
-
cssVariable: `${SQUID_THEME_CSS_VARIABLE_PREFIX}material-light-blend-grey-900`,
|
|
3077
|
+
const themeTypesKeys = Object.fromEntries(INTERNAL_SQUID_THEME_KEYS.map((key) => [
|
|
3078
|
+
key,
|
|
3079
|
+
{
|
|
3080
|
+
cssVariable: `${SQUID_THEME_CSS_VARIABLE_PREFIX}${key}`,
|
|
3115
3081
|
},
|
|
3116
|
-
|
|
3082
|
+
]));
|
|
3083
|
+
// {
|
|
3084
|
+
// 'grey-100': {
|
|
3085
|
+
// cssVariable: `${SQUID_THEME_CSS_VARIABLE_PREFIX}grey-100`,
|
|
3086
|
+
// },
|
|
3087
|
+
// 'grey-200': {
|
|
3088
|
+
// cssVariable: `${SQUID_THEME_CSS_VARIABLE_PREFIX}grey-200`,
|
|
3089
|
+
// },
|
|
3090
|
+
// 'grey-300': {
|
|
3091
|
+
// cssVariable: `${SQUID_THEME_CSS_VARIABLE_PREFIX}grey-300`,
|
|
3092
|
+
// },
|
|
3093
|
+
// 'grey-400': {
|
|
3094
|
+
// cssVariable: `${SQUID_THEME_CSS_VARIABLE_PREFIX}grey-400`,
|
|
3095
|
+
// },
|
|
3096
|
+
// 'grey-500': {
|
|
3097
|
+
// cssVariable: `${SQUID_THEME_CSS_VARIABLE_PREFIX}grey-500`,
|
|
3098
|
+
// },
|
|
3099
|
+
// 'grey-600': {
|
|
3100
|
+
// cssVariable: `${SQUID_THEME_CSS_VARIABLE_PREFIX}grey-600`,
|
|
3101
|
+
// },
|
|
3102
|
+
// 'grey-700': {
|
|
3103
|
+
// cssVariable: `${SQUID_THEME_CSS_VARIABLE_PREFIX}grey-700`,
|
|
3104
|
+
// },
|
|
3105
|
+
// 'grey-800': {
|
|
3106
|
+
// cssVariable: `${SQUID_THEME_CSS_VARIABLE_PREFIX}grey-800`,
|
|
3107
|
+
// },
|
|
3108
|
+
// 'grey-900': {
|
|
3109
|
+
// cssVariable: `${SQUID_THEME_CSS_VARIABLE_PREFIX}grey-900`,
|
|
3110
|
+
// },
|
|
3111
|
+
// 'material-dark-average': {
|
|
3112
|
+
// cssVariable: `${SQUID_THEME_CSS_VARIABLE_PREFIX}material-dark-average`,
|
|
3113
|
+
// },
|
|
3114
|
+
// 'material-dark-thick': {
|
|
3115
|
+
// cssVariable: `${SQUID_THEME_CSS_VARIABLE_PREFIX}material-dark-thick`,
|
|
3116
|
+
// },
|
|
3117
|
+
// 'material-dark-thin': {
|
|
3118
|
+
// cssVariable: `${SQUID_THEME_CSS_VARIABLE_PREFIX}material-dark-thin`,
|
|
3119
|
+
// },
|
|
3120
|
+
// 'material-light-average': {
|
|
3121
|
+
// cssVariable: `${SQUID_THEME_CSS_VARIABLE_PREFIX}material-light-average`,
|
|
3122
|
+
// },
|
|
3123
|
+
// 'material-light-thick': {
|
|
3124
|
+
// cssVariable: `${SQUID_THEME_CSS_VARIABLE_PREFIX}material-light-thick`,
|
|
3125
|
+
// },
|
|
3126
|
+
// 'material-light-thin': {
|
|
3127
|
+
// cssVariable: `${SQUID_THEME_CSS_VARIABLE_PREFIX}material-light-thin`,
|
|
3128
|
+
// },
|
|
3129
|
+
// 'royal-400': {
|
|
3130
|
+
// cssVariable: `${SQUID_THEME_CSS_VARIABLE_PREFIX}royal-400`,
|
|
3131
|
+
// },
|
|
3132
|
+
// 'royal-500': {
|
|
3133
|
+
// cssVariable: `${SQUID_THEME_CSS_VARIABLE_PREFIX}royal-500`,
|
|
3134
|
+
// },
|
|
3135
|
+
// 'status-negative': {
|
|
3136
|
+
// cssVariable: `${SQUID_THEME_CSS_VARIABLE_PREFIX}status-negative`,
|
|
3137
|
+
// },
|
|
3138
|
+
// 'status-positive': {
|
|
3139
|
+
// cssVariable: `${SQUID_THEME_CSS_VARIABLE_PREFIX}status-positive`,
|
|
3140
|
+
// },
|
|
3141
|
+
// 'status-partial': {
|
|
3142
|
+
// cssVariable: `${SQUID_THEME_CSS_VARIABLE_PREFIX}status-partial`,
|
|
3143
|
+
// },
|
|
3144
|
+
// 'grey-100-005': {
|
|
3145
|
+
// cssVariable: `${SQUID_THEME_CSS_VARIABLE_PREFIX}grey-100-005`,
|
|
3146
|
+
// },
|
|
3147
|
+
// 'material-light-blend-grey-900': {
|
|
3148
|
+
// cssVariable: `${SQUID_THEME_CSS_VARIABLE_PREFIX}material-light-blend-grey-900`,
|
|
3149
|
+
// },
|
|
3150
|
+
// }
|
|
3117
3151
|
|
|
3118
3152
|
function SearchIcon() {
|
|
3119
3153
|
return (jsxRuntime.jsx("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: jsxRuntime.jsx("path", { d: "M20 20L16.05 16.05M18 11C18 14.866 14.866 18 11 18C7.13401 18 4 14.866 4 11C4 7.13401 7.13401 4 11 4C14.866 4 18 7.13401 18 11Z", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" }) }));
|
|
@@ -16769,7 +16803,7 @@ function Boost({ boostMode, onToggleBoostMode, estimatedTime, canToggleBoostMode
|
|
|
16769
16803
|
onToggleBoostMode === null || onToggleBoostMode === void 0 ? void 0 : onToggleBoostMode({ boostMode: 'normal' });
|
|
16770
16804
|
}
|
|
16771
16805
|
}
|
|
16772
|
-
return (jsxRuntime.jsx(Tooltip, Object.assign({}, tooltip, { tooltipWidth: "max", containerClassName: "mobile-lg:tw-w-[190px] tw-rounded-squid-m", childrenClassName: "tw-rounded-squid-m", children: jsxRuntime.jsxs("button", { onClick: handleToggleBoostMode, disabled: !canToggleBoostMode, className: cn('tw-group/boost-toggle tw-flex tw-h-squid-xl tw-w-full tw-items-center tw-rounded-squid-m tw-bg-grey-900 tw-pr-squid-xs', canToggleBoostMode && 'hover:tw-bg-material-light-thin'), children: [jsxRuntime.jsx(BoostButton, { boostIndicatorRef: boostIndicatorRef, boostMode: boostMode, canToggleBoostMode: canToggleBoostMode }), jsxRuntime.jsx(Chip, { label: estimatedTime, className: cn('
|
|
16806
|
+
return (jsxRuntime.jsx(Tooltip, Object.assign({}, tooltip, { tooltipWidth: "max", containerClassName: "mobile-lg:tw-w-[190px] tw-rounded-squid-m", childrenClassName: "tw-rounded-squid-m", children: jsxRuntime.jsxs("button", { onClick: handleToggleBoostMode, disabled: !canToggleBoostMode, className: cn('tw-group/boost-toggle tw-flex tw-h-squid-xl tw-w-full tw-items-center tw-rounded-squid-m tw-bg-grey-900 tw-pr-squid-xs', canToggleBoostMode && 'hover:tw-bg-material-light-thin'), children: [jsxRuntime.jsx(BoostButton, { boostIndicatorRef: boostIndicatorRef, boostMode: boostMode, canToggleBoostMode: canToggleBoostMode }), jsxRuntime.jsx(Chip, { label: estimatedTime, className: cn('tw-hidden tw-text-grey-900 tw-transition-colors mobile-xs:tw-flex', boostMode === 'normal' || !canToggleBoostMode
|
|
16773
16807
|
? 'tw-bg-grey-300'
|
|
16774
16808
|
: 'tw-bg-status-positive') })] }) })));
|
|
16775
16809
|
}
|
|
@@ -16884,7 +16918,7 @@ function EthereumIcon() {
|
|
|
16884
16918
|
|
|
16885
16919
|
function FeeButton(_a) {
|
|
16886
16920
|
var { feeInUsd = '0', chipLabel = 'Fee', className, tooltip } = _a, props = __rest$1(_a, ["feeInUsd", "chipLabel", "className", "tooltip"]);
|
|
16887
|
-
return (jsxRuntime.jsx(Tooltip, Object.assign({}, tooltip, { tooltipWidth: "max", containerClassName: "tw-rounded-squid-m tw-w-full", childrenClassName: "tw-rounded-squid-m", children: jsxRuntime.jsxs("button", Object.assign({}, props, { className: cn('tw-flex tw-h-squid-xl tw-w-full tw-items-center tw-gap-x-squid-xs tw-rounded-squid-m tw-px-squid-xs hover:tw-bg-material-light-thin', className), children: [jsxRuntime.jsx(Chip, { label: chipLabel, className: "mobile-xs:tw-flex
|
|
16921
|
+
return (jsxRuntime.jsx(Tooltip, Object.assign({}, tooltip, { tooltipWidth: "max", containerClassName: "tw-rounded-squid-m tw-w-full", childrenClassName: "tw-rounded-squid-m", children: jsxRuntime.jsxs("button", Object.assign({}, props, { className: cn('tw-flex tw-h-squid-xl tw-w-full tw-items-center tw-gap-x-squid-xs tw-rounded-squid-m tw-px-squid-xs hover:tw-bg-material-light-thin', className), children: [jsxRuntime.jsx(Chip, { label: chipLabel, className: "tw-hidden mobile-xs:tw-flex" }), jsxRuntime.jsxs("span", { className: "tw-flex tw-items-center tw-gap-squid-xxs", children: [jsxRuntime.jsx(Chip, { icon: jsxRuntime.jsx(EthereumIcon, {}) }), jsxRuntime.jsx(UsdAmount, { usdAmount: feeInUsd })] })] })) })));
|
|
16888
16922
|
}
|
|
16889
16923
|
|
|
16890
16924
|
function EmojiSadIcon({ className, size = '20', }) {
|
|
@@ -17111,15 +17145,15 @@ function HistoryItem({ firstImageUrl, secondImageUrl, dateCompleted, fromAmount,
|
|
|
17111
17145
|
}
|
|
17112
17146
|
|
|
17113
17147
|
const listItemSizeMap = {
|
|
17114
|
-
small: 'tw-h-list-item-small
|
|
17115
|
-
large: 'tw-h-list-item-large
|
|
17148
|
+
small: 'tw-h-list-item-small',
|
|
17149
|
+
large: 'tw-h-list-item-large',
|
|
17116
17150
|
};
|
|
17117
17151
|
const collapsedListItemClassMap = {
|
|
17118
17152
|
small: 'tw-w-[70px]',
|
|
17119
17153
|
large: 'tw-w-[80px]',
|
|
17120
17154
|
};
|
|
17121
17155
|
function ListItem(_a) {
|
|
17122
|
-
var { itemTitle, mainImageUrl, subtitle, subtitleOnHover, detail, icon, secondaryImageUrl, placeholderImageUrl, size = 'large', mainIcon, className, isSelected, onDetailClick, showDetailOnHoverOnly, rounded = false, detailButtonClassName, loading, containerProps, compactOnMobile } = _a, props = __rest$1(_a, ["itemTitle", "mainImageUrl", "subtitle", "subtitleOnHover", "detail", "icon", "secondaryImageUrl", "placeholderImageUrl", "size", "mainIcon", "className", "isSelected", "onDetailClick", "showDetailOnHoverOnly", "rounded", "detailButtonClassName", "loading", "containerProps", "compactOnMobile"]);
|
|
17156
|
+
var { itemTitle, mainImageUrl, subtitle, subtitleOnHover, detail, icon, secondaryImageUrl, placeholderImageUrl, size = 'large', mainIcon, className, isSelected, onDetailClick, showDetailOnHoverOnly, rounded = false, detailButtonClassName, loading, containerProps, compactOnMobile, extraPadding = true } = _a, props = __rest$1(_a, ["itemTitle", "mainImageUrl", "subtitle", "subtitleOnHover", "detail", "icon", "secondaryImageUrl", "placeholderImageUrl", "size", "mainIcon", "className", "isSelected", "onDetailClick", "showDetailOnHoverOnly", "rounded", "detailButtonClassName", "loading", "containerProps", "compactOnMobile", "extraPadding"]);
|
|
17123
17157
|
const subtitleClassName = cn('tw-h-[14px] tw-max-w-full tw-truncate !tw-leading-[16px] tw-text-grey-500', compactOnMobile ? 'tw-hidden mobile-lg:tw-block' : 'tw-block');
|
|
17124
17158
|
// 'small' variant does not have detail
|
|
17125
17159
|
const showDetail = size === 'large' && (!!detail || !!icon || showDetailOnHoverOnly);
|
|
@@ -17150,7 +17184,7 @@ function ListItem(_a) {
|
|
|
17150
17184
|
const isInteractive = !!props.onClick;
|
|
17151
17185
|
const ItemTag = isInteractive ? 'button' : 'div';
|
|
17152
17186
|
const itemProps = isInteractive ? props : {};
|
|
17153
|
-
return (jsxRuntime.jsx("li", Object.assign({}, containerProps, { className: cn('tw-flex tw-max-w-full tw-bg-grey-900 tw-text-grey-300', listItemSizeMap[size], compactOnMobile
|
|
17187
|
+
return (jsxRuntime.jsx("li", Object.assign({}, containerProps, { className: cn('tw-flex tw-max-w-full tw-bg-grey-900 tw-text-grey-300', listItemSizeMap[size], extraPadding && 'tw-px-squid-xs', compactOnMobile
|
|
17154
17188
|
? `${collapsedListItemClassMap[size]} mobile-lg:tw-w-full`
|
|
17155
17189
|
: 'tw-w-full', className), children: jsxRuntime.jsxs(ItemTag, Object.assign({}, itemProps, { className: cn('tw-group/list-item tw-flex tw-w-full tw-max-w-full tw-items-center tw-justify-start tw-gap-squid-xs tw-rounded-squid-s tw-px-squid-xs tw-py-squid-xxs', isSelected && 'tw-bg-material-light-thin', isInteractive && 'hover: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, placeholderImageUrl: placeholderImageUrl, 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-xxs',
|
|
17156
17190
|
// 'large' variant has extra padding
|
|
@@ -17522,7 +17556,7 @@ function Modal({ children, className, onBackdropClick, isOpen: _isOpen = true, m
|
|
|
17522
17556
|
}, className: cn('tw-absolute tw-inset-0 tw-z-40 tw-flex tw-items-start tw-justify-center tw-px-squid-xs tw-py-squid-xl tw-pb-squid-m', _isOpen ? 'tw-animate-blur-in' : 'tw-animate-blur-out'), children: jsxRuntime.jsx("div", { style: {
|
|
17523
17557
|
[CSS_VARS.SLIDE_TO_TOP_DURATION]: `${ANIMATION_DURATIONS.SHOW_MODAL}ms`,
|
|
17524
17558
|
[CSS_VARS.SLIDE_TO_BOTTOM_DURATION]: `${ANIMATION_DURATIONS.HIDE_MODAL}ms`,
|
|
17525
|
-
}, className: cn('tw-relative tw-flex tw-max-h-modal-compact tw-max-w-full tw-flex-col tw-items-start tw-justify-end tw-gap-squid-xxs tw-self-end mobile-
|
|
17559
|
+
}, className: cn('tw-relative tw-flex tw-max-h-modal-compact tw-max-w-full tw-flex-col tw-items-start tw-justify-end tw-gap-squid-xxs tw-self-end mobile-xs:tw-w-modal-compact mobile-lg:tw-max-h-modal-large', className, _isOpen ? 'tw-animate-slide-to-top' : 'tw-animate-slide-to-bottom', maxHeight && 'tw-h-full', modalWidthClassMap[width]), children: children }) })));
|
|
17526
17560
|
}
|
|
17527
17561
|
|
|
17528
17562
|
const borderTypeClassMap = {
|
|
@@ -17554,6 +17588,366 @@ function NavigationBar(_a) {
|
|
|
17554
17588
|
: 'tw-flex'), children: jsxRuntime.jsx(HeadingText, { size: "small", children: title }) })) : null] })));
|
|
17555
17589
|
}
|
|
17556
17590
|
|
|
17591
|
+
const lightTheme = {
|
|
17592
|
+
// content
|
|
17593
|
+
'content-100': '#17191C',
|
|
17594
|
+
'content-200': '#292C32',
|
|
17595
|
+
'content-300': '#292C32',
|
|
17596
|
+
'content-400': '#676B7E',
|
|
17597
|
+
'content-500': '#8A8FA8',
|
|
17598
|
+
'content-600': '#A7ABBE',
|
|
17599
|
+
'content-700': '#D1D6E0',
|
|
17600
|
+
'content-800': '#EDEEF3',
|
|
17601
|
+
'content-900': '#FBFBFD',
|
|
17602
|
+
// accent
|
|
17603
|
+
'accent-300': '#8C53C5',
|
|
17604
|
+
'accent-400': '#9E79D2',
|
|
17605
|
+
'accent-500': '#B893EC',
|
|
17606
|
+
'accent-700': '#E3D0FD',
|
|
17607
|
+
// status
|
|
17608
|
+
'status-positive': '#17CF26',
|
|
17609
|
+
'status-negative': '#FF5B4D',
|
|
17610
|
+
'status-warning': '#EC9213',
|
|
17611
|
+
};
|
|
17612
|
+
const darkTheme = {
|
|
17613
|
+
// content
|
|
17614
|
+
'content-100': '#FBFBFD',
|
|
17615
|
+
'content-200': '#EDEFF3',
|
|
17616
|
+
'content-300': '#D1D6E0',
|
|
17617
|
+
'content-400': '#A7ABBE',
|
|
17618
|
+
'content-500': '#8A8FA8',
|
|
17619
|
+
'content-600': '#676B7E',
|
|
17620
|
+
'content-700': '#4C515D',
|
|
17621
|
+
'content-800': '#292C32',
|
|
17622
|
+
'content-900': '#17191C',
|
|
17623
|
+
// accent
|
|
17624
|
+
'accent-300': '#D9BEF4',
|
|
17625
|
+
'accent-400': '#B893EC',
|
|
17626
|
+
'accent-500': '#9E79D2',
|
|
17627
|
+
'accent-700': '#6B45A1',
|
|
17628
|
+
// status
|
|
17629
|
+
'status-positive': '#7AE870',
|
|
17630
|
+
'status-negative': '#FF4D5B',
|
|
17631
|
+
'status-warning': '#F3AF25',
|
|
17632
|
+
};
|
|
17633
|
+
|
|
17634
|
+
const spacing = {
|
|
17635
|
+
'squid-xxs': '0.3125rem', // 5px
|
|
17636
|
+
'squid-xs': '0.625rem', // 10px
|
|
17637
|
+
'squid-s': '0.9375rem', // 15px
|
|
17638
|
+
'squid-m': '1.25rem', // 20px
|
|
17639
|
+
'squid-l': '1.875rem', // 30px
|
|
17640
|
+
'squid-xl': '2.5rem', // 40px
|
|
17641
|
+
'squid-xxl': '3.75rem', // 60px
|
|
17642
|
+
};
|
|
17643
|
+
const backdropBlur = {
|
|
17644
|
+
'/10': '10px',
|
|
17645
|
+
'/20': '20px',
|
|
17646
|
+
};
|
|
17647
|
+
const widths = {
|
|
17648
|
+
button: '9.5625rem', // 153px
|
|
17649
|
+
'list-item-compact': '22.0625rem', // 353px
|
|
17650
|
+
'list-item-small': '21.25rem', // 340px
|
|
17651
|
+
'card-large': '480px',
|
|
17652
|
+
'card-compact': '393px',
|
|
17653
|
+
'modal-extra-large': '440px',
|
|
17654
|
+
'modal-large': '400px',
|
|
17655
|
+
'modal-compact': '373px',
|
|
17656
|
+
};
|
|
17657
|
+
const heights = {
|
|
17658
|
+
button: '3.75rem', // 60px
|
|
17659
|
+
'list-item-large': '3.125rem', // 50px
|
|
17660
|
+
'list-item-small': '2.5rem', // 40px
|
|
17661
|
+
'card-large': '660px',
|
|
17662
|
+
'card-compact': '640px',
|
|
17663
|
+
'card-small': '580px',
|
|
17664
|
+
'modal-large': '600px',
|
|
17665
|
+
'modal-compact': '631px',
|
|
17666
|
+
};
|
|
17667
|
+
// tw-shadow-*
|
|
17668
|
+
const boxShadow = {
|
|
17669
|
+
'elevation-dark-3': '0px 2px 4px 0px rgba(0, 0, 0, 0.20), 0px 5px 50px -1px rgba(0, 0, 0, 0.33)',
|
|
17670
|
+
'elevation-light-3': '0px 2px 4px 0px rgba(0, 0, 0, 0.10), 0px 5px 50px -1px rgba(0, 0, 0, 0.20)',
|
|
17671
|
+
'elevation-dark-2': '0px 2px 5px 1px rgba(0, 0, 0, 0.20), 0px 5px 20px -1px rgba(0, 0, 0, 0.33)',
|
|
17672
|
+
'elevation-light-1': '0px 1px 2px 0px #0000001A',
|
|
17673
|
+
'elevation-light-2': '0px 2px 5px 1px rgba(0, 0, 0, 0.10), 0px 5px 20px -1px rgba(0, 0, 0, 0.10)',
|
|
17674
|
+
'inset-royal': '0px 0px 50px 0px #876FE2 inset',
|
|
17675
|
+
};
|
|
17676
|
+
// tw-bg-*
|
|
17677
|
+
const backgrounds = {
|
|
17678
|
+
'royal-light': 'linear-gradient(180deg, #A577D8 0%, #BF91F2 100%)',
|
|
17679
|
+
'royal-dark': 'linear-gradient(180deg, #BF91F2 0%, #A577D8 100%)',
|
|
17680
|
+
'dark-cover': 'linear-gradient(90deg, var(--squid-theme-material-dark-thick) 45.4%, transparent 50.85%, var(--squid-theme-material-dark-thick) 55.61%)',
|
|
17681
|
+
};
|
|
17682
|
+
const baseTailwindConfig = {
|
|
17683
|
+
prefix: 'tw-',
|
|
17684
|
+
content: ['./src/**/*.{ts,tsx,js,jsx}', '.storybook/**/*.{ts,tsx,js,jsx}'],
|
|
17685
|
+
theme: {
|
|
17686
|
+
extend: {
|
|
17687
|
+
screens: Object.values(MEDIA_QUERIES).reduce((acc, curr) => {
|
|
17688
|
+
// 'raw' means that we want to use the raw media query value
|
|
17689
|
+
// https://tailwindcss.com/docs/screens#custom-media-queries
|
|
17690
|
+
acc[curr.key] = { raw: curr.media };
|
|
17691
|
+
return acc;
|
|
17692
|
+
}, {}),
|
|
17693
|
+
keyframes: {
|
|
17694
|
+
'move-to-right-with-spring-bounce': {
|
|
17695
|
+
'0%': {
|
|
17696
|
+
transform: 'translateX(-25%)',
|
|
17697
|
+
},
|
|
17698
|
+
'50%': {
|
|
17699
|
+
transform: 'translateX(27%)',
|
|
17700
|
+
},
|
|
17701
|
+
'80%': {
|
|
17702
|
+
transform: 'translateX(24%)',
|
|
17703
|
+
},
|
|
17704
|
+
'100%': {
|
|
17705
|
+
transform: 'translateX(25%)',
|
|
17706
|
+
},
|
|
17707
|
+
},
|
|
17708
|
+
'move-to-left-with-spring-bounce': {
|
|
17709
|
+
'0%': {
|
|
17710
|
+
transform: 'translateX(25%)',
|
|
17711
|
+
},
|
|
17712
|
+
'50%': {
|
|
17713
|
+
transform: 'translateX(-27%)',
|
|
17714
|
+
},
|
|
17715
|
+
'80%': {
|
|
17716
|
+
transform: 'translateX(-24%)',
|
|
17717
|
+
},
|
|
17718
|
+
'100%': {
|
|
17719
|
+
transform: 'translateX(-25%)',
|
|
17720
|
+
},
|
|
17721
|
+
},
|
|
17722
|
+
'slide-to-top': {
|
|
17723
|
+
'0%': {
|
|
17724
|
+
transform: 'translate3d(0, 650px, 0)',
|
|
17725
|
+
},
|
|
17726
|
+
'100%': {
|
|
17727
|
+
transform: 'translate3d(0, 0, 0)',
|
|
17728
|
+
},
|
|
17729
|
+
},
|
|
17730
|
+
'slide-to-bottom': {
|
|
17731
|
+
'0%': {
|
|
17732
|
+
transform: 'translate3d(0, 0, 0)',
|
|
17733
|
+
},
|
|
17734
|
+
'100%': {
|
|
17735
|
+
transform: 'translate3d(0, 650px, 0)',
|
|
17736
|
+
},
|
|
17737
|
+
},
|
|
17738
|
+
'expand-route': {
|
|
17739
|
+
'0%': {
|
|
17740
|
+
height: '60px',
|
|
17741
|
+
},
|
|
17742
|
+
'100%': {
|
|
17743
|
+
height: '100%',
|
|
17744
|
+
},
|
|
17745
|
+
},
|
|
17746
|
+
'collapse-route': {
|
|
17747
|
+
'0%': {
|
|
17748
|
+
height: '100%',
|
|
17749
|
+
},
|
|
17750
|
+
'100%': {
|
|
17751
|
+
height: '60px',
|
|
17752
|
+
},
|
|
17753
|
+
},
|
|
17754
|
+
'fade-in': {
|
|
17755
|
+
'0%': {
|
|
17756
|
+
opacity: '0',
|
|
17757
|
+
},
|
|
17758
|
+
'100%': {
|
|
17759
|
+
opacity: '1',
|
|
17760
|
+
},
|
|
17761
|
+
},
|
|
17762
|
+
'fade-out': {
|
|
17763
|
+
'0%': {
|
|
17764
|
+
opacity: '1',
|
|
17765
|
+
},
|
|
17766
|
+
'100%': {
|
|
17767
|
+
opacity: '0',
|
|
17768
|
+
},
|
|
17769
|
+
},
|
|
17770
|
+
'loading-gradient': {
|
|
17771
|
+
'0%': {
|
|
17772
|
+
transform: 'translateX(-70%)',
|
|
17773
|
+
opacity: '0',
|
|
17774
|
+
},
|
|
17775
|
+
'50%': {
|
|
17776
|
+
opacity: '1',
|
|
17777
|
+
},
|
|
17778
|
+
'100%': {
|
|
17779
|
+
opacity: '0',
|
|
17780
|
+
transform: 'translateX(70%)',
|
|
17781
|
+
},
|
|
17782
|
+
},
|
|
17783
|
+
'translate-to-bottom': {
|
|
17784
|
+
'0%': {
|
|
17785
|
+
transform: 'translateY(0)',
|
|
17786
|
+
},
|
|
17787
|
+
'100%': {
|
|
17788
|
+
transform: 'translateY(100%)',
|
|
17789
|
+
},
|
|
17790
|
+
},
|
|
17791
|
+
'translate-to-top': {
|
|
17792
|
+
'0%': {
|
|
17793
|
+
transform: 'translateY(0)',
|
|
17794
|
+
},
|
|
17795
|
+
'100%': {
|
|
17796
|
+
transform: 'translateY(-100%)',
|
|
17797
|
+
},
|
|
17798
|
+
},
|
|
17799
|
+
'blur-in': {
|
|
17800
|
+
'0%': {
|
|
17801
|
+
'backdrop-filter': 'blur(0px)',
|
|
17802
|
+
},
|
|
17803
|
+
'100%': {
|
|
17804
|
+
'backdrop-filter': 'blur(20px) saturate(150%)',
|
|
17805
|
+
'background-color': `var(${themeTypesKeys['material-dark-average'].cssVariable})`,
|
|
17806
|
+
},
|
|
17807
|
+
},
|
|
17808
|
+
'blur-out': {
|
|
17809
|
+
'0%': {
|
|
17810
|
+
'backdrop-filter': 'blur(20px) saturate(150%)',
|
|
17811
|
+
'background-color': `var(${themeTypesKeys['material-dark-average'].cssVariable})`,
|
|
17812
|
+
},
|
|
17813
|
+
'100%': {
|
|
17814
|
+
'backdrop-filter': 'blur(0px)',
|
|
17815
|
+
},
|
|
17816
|
+
},
|
|
17817
|
+
display: {
|
|
17818
|
+
'0%': {
|
|
17819
|
+
display: 'none',
|
|
17820
|
+
},
|
|
17821
|
+
'100%': {
|
|
17822
|
+
display: 'block',
|
|
17823
|
+
},
|
|
17824
|
+
},
|
|
17825
|
+
hide: {
|
|
17826
|
+
'0%': {
|
|
17827
|
+
display: 'block',
|
|
17828
|
+
},
|
|
17829
|
+
'100%': {
|
|
17830
|
+
display: 'none',
|
|
17831
|
+
},
|
|
17832
|
+
},
|
|
17833
|
+
'move-loading-cover-to-right': {
|
|
17834
|
+
'0%': {
|
|
17835
|
+
transform: 'translateX(-64%)',
|
|
17836
|
+
},
|
|
17837
|
+
'100%': {
|
|
17838
|
+
transform: 'translateX(0%)',
|
|
17839
|
+
},
|
|
17840
|
+
},
|
|
17841
|
+
'scale-and-fade-down': {
|
|
17842
|
+
'0%': {
|
|
17843
|
+
transform: 'scale(1)',
|
|
17844
|
+
opacity: '1',
|
|
17845
|
+
},
|
|
17846
|
+
'100%': {
|
|
17847
|
+
transform: 'scale(0.9)',
|
|
17848
|
+
opacity: '0.5',
|
|
17849
|
+
},
|
|
17850
|
+
},
|
|
17851
|
+
'scale-and-fade-up': {
|
|
17852
|
+
'0%': {
|
|
17853
|
+
transform: 'scale(0.9)',
|
|
17854
|
+
opacity: '0.5',
|
|
17855
|
+
},
|
|
17856
|
+
'100%': {
|
|
17857
|
+
transform: 'scale(1)',
|
|
17858
|
+
opacity: '1',
|
|
17859
|
+
},
|
|
17860
|
+
},
|
|
17861
|
+
},
|
|
17862
|
+
animation: {
|
|
17863
|
+
'move-to-right-with-spring-bounce': `move-to-right-with-spring-bounce var(${CSS_VARS.MOVE_WITH_SPRING_BOUNCE_DURATION}, 0s) ease-out both`,
|
|
17864
|
+
'move-to-left-with-spring-bounce': `move-to-left-with-spring-bounce var(${CSS_VARS.MOVE_WITH_SPRING_BOUNCE_DURATION}, 0s) ease-out both`,
|
|
17865
|
+
'slide-to-top': `slide-to-top var(${CSS_VARS.SLIDE_TO_TOP_DURATION}, 0s) ${ANIMATION_TIMINGS.SHOW_ROUTE} both`,
|
|
17866
|
+
'slide-to-bottom': `slide-to-bottom var(${CSS_VARS.SLIDE_TO_BOTTOM_DURATION}, 0s) ${ANIMATION_TIMINGS.HIDE_ROUTE} both`,
|
|
17867
|
+
'expand-route': `expand-route var(${CSS_VARS.EXPAND_ROUTE_DURATION}, 0s) ${ANIMATION_TIMINGS.EXPAND_ROUTE} both`,
|
|
17868
|
+
'collapse-route': `collapse-route var(${CSS_VARS.COLLAPSE_ROUTE_DURATION}, 0s) ${ANIMATION_TIMINGS.COLLAPSE_ROUTE} both`,
|
|
17869
|
+
'fade-in': `fade-in var(${CSS_VARS.FADE_IN_DURATION}, 0s) ease-out both`,
|
|
17870
|
+
'fade-out': `fade-out var(${CSS_VARS.FADE_OUT_DURATION}, 0s) ease-out both`,
|
|
17871
|
+
'scale-and-fade-down': `scale-and-fade-down var(${CSS_VARS.SCALE_AND_FADE_DOWN_DURATION}, 0s) ${ANIMATION_TIMINGS.EXPAND_ROUTE} both`,
|
|
17872
|
+
'scale-and-fade-up': `scale-and-fade-up var(${CSS_VARS.SCALE_AND_FADE_UP_DURATION}, 0s) ${ANIMATION_TIMINGS.COLLAPSE_ROUTE} both`,
|
|
17873
|
+
'loading-gradient': 'loading-gradient 1s ease-in-out both infinite',
|
|
17874
|
+
'translate-to-bottom': `translate-to-bottom var(${CSS_VARS.TRANSLATE_TOP_OR_BOTTOM}, 0s) ${ANIMATION_TIMINGS.EXPAND_ROUTE} both`,
|
|
17875
|
+
'translate-to-top': `translate-to-top var(${CSS_VARS.TRANSLATE_TOP_OR_BOTTOM}, 0s) ${ANIMATION_TIMINGS.COLLAPSE_ROUTE} both`,
|
|
17876
|
+
'blur-in': `blur-in var(${CSS_VARS.BLUR_IN_DURATION}, 0s) ${ANIMATION_TIMINGS.SHOW_ROUTE} both`,
|
|
17877
|
+
'blur-out': `blur-out var(${CSS_VARS.BLUR_OUT_DURATION}, 0s) ${ANIMATION_TIMINGS.HIDE_ROUTE} both`,
|
|
17878
|
+
'display-delayed': `display 0s var(${CSS_VARS.DISPLAY_DELAYED_DURATION}, 0s) ease-out both`,
|
|
17879
|
+
hide: `hide 0s ease-out forwards`,
|
|
17880
|
+
'move-loading-cover-to-right': 'move-loading-cover-to-right 1.4s linear infinite',
|
|
17881
|
+
},
|
|
17882
|
+
opacity: {
|
|
17883
|
+
33: '0.33',
|
|
17884
|
+
66: '0.66',
|
|
17885
|
+
},
|
|
17886
|
+
fontFamily: {
|
|
17887
|
+
geist: ['Geist', 'sans-serif'],
|
|
17888
|
+
},
|
|
17889
|
+
letterSpacing: {
|
|
17890
|
+
// body text
|
|
17891
|
+
'body-small': '-0.366px',
|
|
17892
|
+
'body-medium': '-0.675px',
|
|
17893
|
+
'body-large': '-0.843px',
|
|
17894
|
+
// heading letter
|
|
17895
|
+
'heading-small': '-1.05px',
|
|
17896
|
+
'heading-medium': '-2.465px',
|
|
17897
|
+
'heading-large': '-3.525px',
|
|
17898
|
+
},
|
|
17899
|
+
fontSize: {
|
|
17900
|
+
// caption text
|
|
17901
|
+
caption: '0.875rem', // 14px
|
|
17902
|
+
// body text
|
|
17903
|
+
'body-small': '1.14375rem', // 18.5px
|
|
17904
|
+
'body-medium': '1.40625rem', // 22.5px
|
|
17905
|
+
'body-large': '1.75625rem', // 28.1px
|
|
17906
|
+
// heading
|
|
17907
|
+
'heading-small': '2.1875rem', // 35px
|
|
17908
|
+
'heading-medium': '3.08125rem', // 49.3px
|
|
17909
|
+
'heading-large': '4.40625rem', // 70.5px
|
|
17910
|
+
},
|
|
17911
|
+
fontWeight: {
|
|
17912
|
+
// body text and caption text
|
|
17913
|
+
'typography-regular': '400',
|
|
17914
|
+
'typography-bold': '600',
|
|
17915
|
+
// headings
|
|
17916
|
+
'heading-regular': '400',
|
|
17917
|
+
'heading-bold': '600',
|
|
17918
|
+
},
|
|
17919
|
+
lineHeight: {
|
|
17920
|
+
// caption text
|
|
17921
|
+
caption: '19.6px',
|
|
17922
|
+
// body text
|
|
17923
|
+
'body-small': '25.62px',
|
|
17924
|
+
'body-medium': '31.5px',
|
|
17925
|
+
'body-large': '39.34px',
|
|
17926
|
+
// headings
|
|
17927
|
+
'heading-small': '38.5px',
|
|
17928
|
+
'heading-medium': '49.3px',
|
|
17929
|
+
'heading-large': '66.97px',
|
|
17930
|
+
},
|
|
17931
|
+
width: widths,
|
|
17932
|
+
height: heights,
|
|
17933
|
+
minWidth: widths,
|
|
17934
|
+
minHeight: heights,
|
|
17935
|
+
maxWidth: widths,
|
|
17936
|
+
maxHeight: heights,
|
|
17937
|
+
spacing,
|
|
17938
|
+
borderRadius: spacing,
|
|
17939
|
+
boxShadow,
|
|
17940
|
+
backgroundImage: backgrounds,
|
|
17941
|
+
backdropBlur,
|
|
17942
|
+
colors: Object.assign({}, Object.entries(themeTypesKeys).reduce((acc, [key, { cssVariable }]) => {
|
|
17943
|
+
acc[key] = `var(${cssVariable})`;
|
|
17944
|
+
return acc;
|
|
17945
|
+
}, {})),
|
|
17946
|
+
},
|
|
17947
|
+
},
|
|
17948
|
+
plugins: [],
|
|
17949
|
+
};
|
|
17950
|
+
|
|
17557
17951
|
const createStoreImpl = (createState) => {
|
|
17558
17952
|
let state;
|
|
17559
17953
|
const listeners = /* @__PURE__ */ new Set();
|
|
@@ -61400,26 +61794,6 @@ function WalletsView() {
|
|
|
61400
61794
|
return (jsxRuntime.jsxs(Modal, { maxHeight: true, children: [jsxRuntime.jsxs(ModalContent, { addGap: true, children: [jsxRuntime.jsx("div", { className: "tw-px-squid-xs tw-py-squid-xxs", children: jsxRuntime.jsx(Input, { placeholder: "Select your wallet" }) }), jsxRuntime.jsxs("ul", { className: "tw-flex tw-flex-col tw-gap-squid-xxs tw-overflow-auto tw-py-squid-xxs", children: [jsxRuntime.jsx(ListItem, { icon: jsxRuntime.jsx("span", { className: "tw-text-material-light-average", children: jsxRuntime.jsx(ChevronLargeRightIcon, {}) }), className: "tw-bg-transparent tw-text-royal-400", detail: "Installed", itemTitle: jsxRuntime.jsx(BodyText, { size: "small", className: "!tw-leading-[13px] tw-text-grey-300", children: "Rainbow" }), mainImageUrl: "/assets/images/avatar.png" }), jsxRuntime.jsx(ListItem, { icon: jsxRuntime.jsx("span", { className: "tw-text-material-light-average", children: jsxRuntime.jsx(ChevronLargeRightIcon, {}) }), className: "tw-bg-transparent tw-text-royal-400", detail: "Installed", itemTitle: jsxRuntime.jsx(BodyText, { size: "small", className: "!tw-leading-[13px] tw-text-grey-300", children: "Metamask" }), mainImageUrl: "/assets/images/punks.png" }), jsxRuntime.jsx("span", { className: "tw-text-material-light-thin", children: jsxRuntime.jsx(ModalContentDivider, {}) }), jsxRuntime.jsx(ListItem, { icon: jsxRuntime.jsx("span", { className: "tw-text-material-light-average", children: jsxRuntime.jsx(ChevronLargeRightIcon, {}) }), className: "tw-bg-transparent tw-text-royal-400", subtitle: "Connect with an Injected Wallet", itemTitle: jsxRuntime.jsx(BodyText, { size: "small", className: "!tw-leading-[13px] tw-text-grey-300", children: "Browser Extension" }), mainImageUrl: "/assets/images/avatar.png" }), jsxRuntime.jsx(ListItem, { icon: jsxRuntime.jsx("span", { className: "tw-text-material-light-average", children: jsxRuntime.jsx(ChevronLargeRightIcon, {}) }), className: "tw-bg-transparent tw-text-royal-400", itemTitle: jsxRuntime.jsx(BodyText, { size: "small", className: "!tw-leading-[13px] tw-text-grey-300", children: "Metamask" }), mainImageUrl: "/assets/images/punks.png" }), ' ', jsxRuntime.jsx(ListItem, { icon: jsxRuntime.jsx("span", { className: "tw-text-material-light-average", children: jsxRuntime.jsx(ChevronLargeRightIcon, {}) }), className: "tw-bg-transparent tw-text-royal-400", itemTitle: jsxRuntime.jsx(BodyText, { size: "small", className: "!tw-leading-[13px] tw-text-grey-300", children: "Rainbow" }), mainImageUrl: "/assets/images/avatar.png" }), jsxRuntime.jsx(ListItem, { icon: jsxRuntime.jsx("span", { className: "tw-text-material-light-average", children: jsxRuntime.jsx(ChevronLargeRightIcon, {}) }), className: "tw-bg-transparent tw-text-royal-400", itemTitle: jsxRuntime.jsx(BodyText, { size: "small", className: "!tw-leading-[13px] tw-text-grey-300", children: "Metamask" }), mainImageUrl: "/assets/images/punks.png" }), ' ', jsxRuntime.jsx(ListItem, { icon: jsxRuntime.jsx("span", { className: "tw-text-material-light-average", children: jsxRuntime.jsx(ChevronLargeRightIcon, {}) }), className: "tw-bg-transparent tw-text-royal-400", itemTitle: jsxRuntime.jsx(BodyText, { size: "small", className: "!tw-leading-[13px] tw-text-grey-300", children: "Rainbow" }), mainImageUrl: "/assets/images/avatar.png" }), jsxRuntime.jsx(ListItem, { icon: jsxRuntime.jsx("span", { className: "tw-text-material-light-average", children: jsxRuntime.jsx(ChevronLargeRightIcon, {}) }), className: "tw-bg-transparent tw-text-royal-400", itemTitle: jsxRuntime.jsx(BodyText, { size: "small", className: "!tw-leading-[13px] tw-text-grey-300", children: "Metamask" }), mainImageUrl: "/assets/images/punks.png" }), ' ', jsxRuntime.jsx(ListItem, { icon: jsxRuntime.jsx("span", { className: "tw-text-material-light-average", children: jsxRuntime.jsx(ChevronLargeRightIcon, {}) }), className: "tw-bg-transparent tw-text-royal-400", itemTitle: jsxRuntime.jsx(BodyText, { size: "small", className: "!tw-leading-[13px] tw-text-grey-300", children: "Rainbow" }), mainImageUrl: "/assets/images/avatar.png" }), jsxRuntime.jsx(ListItem, { icon: jsxRuntime.jsx("span", { className: "tw-text-material-light-average", children: jsxRuntime.jsx(ChevronLargeRightIcon, {}) }), className: "tw-bg-transparent tw-text-royal-400", itemTitle: jsxRuntime.jsx(BodyText, { size: "small", className: "!tw-leading-[13px] tw-text-grey-300", children: "Metamask" }), mainImageUrl: "/assets/images/punks.png" })] })] }), jsxRuntime.jsx(Button$1, { size: "lg", variant: "secondary", label: "Cancel" })] }));
|
|
61401
61795
|
}
|
|
61402
61796
|
|
|
61403
|
-
const lightTheme = {
|
|
61404
|
-
// content
|
|
61405
|
-
'content-100': '#17191C',
|
|
61406
|
-
'content-200': '#292C32',
|
|
61407
|
-
'content-300': '#292C32',
|
|
61408
|
-
'content-400': '#676B7E',
|
|
61409
|
-
'content-500': '#8A8FA8',
|
|
61410
|
-
'content-600': '#A7ABBE',
|
|
61411
|
-
'content-700': '#D1D6E0',
|
|
61412
|
-
'content-800': '#EDEEF3',
|
|
61413
|
-
'content-900': '#FBFBFD',
|
|
61414
|
-
// accent
|
|
61415
|
-
'accent-400': '#9E79D2',
|
|
61416
|
-
'accent-500': '#B893EC',
|
|
61417
|
-
// status
|
|
61418
|
-
'status-positive': '#17CF26',
|
|
61419
|
-
'status-negative': '#FF5B4D',
|
|
61420
|
-
'status-warning': '#EC9213',
|
|
61421
|
-
};
|
|
61422
|
-
|
|
61423
61797
|
// list of the theme variables that need to be replaced
|
|
61424
61798
|
// from the user readable theme config
|
|
61425
61799
|
// to the internal theme config
|
|
@@ -61481,23 +61855,30 @@ const parseSquidTheme = (userTheme) => {
|
|
|
61481
61855
|
// material-dark-thin -> grey-900 + 10% opacity
|
|
61482
61856
|
// material-dark-average -> grey-900 + 33% opacity
|
|
61483
61857
|
// material-dark-thick -> grey-900 + 66% opacity
|
|
61484
|
-
|
|
61485
|
-
|
|
61486
|
-
|
|
61487
|
-
|
|
61488
|
-
|
|
61489
|
-
|
|
61490
|
-
|
|
61491
|
-
|
|
61858
|
+
let materialVariants = {};
|
|
61859
|
+
if (squidTheme['grey-100'] && squidTheme['grey-900']) {
|
|
61860
|
+
materialVariants = {
|
|
61861
|
+
'material-light-thin': getHexColorFromOpacityPercentage(squidTheme['grey-100'], 0.1),
|
|
61862
|
+
'material-light-average': getHexColorFromOpacityPercentage(squidTheme['grey-100'], 0.33),
|
|
61863
|
+
'material-light-thick': getHexColorFromOpacityPercentage(squidTheme['grey-100'], 0.66),
|
|
61864
|
+
'material-dark-thin': getHexColorFromOpacityPercentage(squidTheme['grey-900'], 0.1),
|
|
61865
|
+
'material-dark-average': getHexColorFromOpacityPercentage(squidTheme['grey-900'], 0.33),
|
|
61866
|
+
'material-dark-thick': getHexColorFromOpacityPercentage(squidTheme['grey-900'], 0.66),
|
|
61867
|
+
};
|
|
61868
|
+
}
|
|
61492
61869
|
squidTheme = Object.assign(Object.assign({}, squidTheme), materialVariants);
|
|
61493
61870
|
const styleKeys = Object.keys(themeTypesKeys);
|
|
61494
|
-
const parsed = styleKeys
|
|
61871
|
+
const parsed = styleKeys
|
|
61872
|
+
.map((sk) => {
|
|
61495
61873
|
const themeItem = themeTypesKeys[sk];
|
|
61874
|
+
if (!themeItem)
|
|
61875
|
+
return {};
|
|
61496
61876
|
let userValue = squidTheme[sk];
|
|
61497
61877
|
return {
|
|
61498
61878
|
[themeItem.cssVariable]: userValue,
|
|
61499
61879
|
};
|
|
61500
|
-
})
|
|
61880
|
+
})
|
|
61881
|
+
.filter((obj) => Object.keys(obj).length > 0);
|
|
61501
61882
|
// adds a variant with 0.05 opacity for each color
|
|
61502
61883
|
// will result in variables like this:
|
|
61503
61884
|
// var(--squid-theme-grey-100-005) --> grey-100 with 0.05 opacity
|
|
@@ -61512,13 +61893,19 @@ const parseSquidTheme = (userTheme) => {
|
|
|
61512
61893
|
// [`${themeItem.cssVariable}-005`]: valueWith005Opacity,
|
|
61513
61894
|
// })
|
|
61514
61895
|
// })
|
|
61515
|
-
|
|
61516
|
-
|
|
61517
|
-
|
|
61518
|
-
|
|
61519
|
-
|
|
61520
|
-
|
|
61521
|
-
|
|
61896
|
+
if (themeTypesKeys['grey-100-005'] && squidTheme['grey-100']) {
|
|
61897
|
+
parsed.push({
|
|
61898
|
+
[themeTypesKeys['grey-100-005'].cssVariable]: getHexColorFromOpacityPercentage(squidTheme['grey-100'], 0.05),
|
|
61899
|
+
});
|
|
61900
|
+
}
|
|
61901
|
+
if (themeTypesKeys['material-light-blend-grey-900'] &&
|
|
61902
|
+
squidTheme['material-light-thin'] &&
|
|
61903
|
+
squidTheme['grey-900']) {
|
|
61904
|
+
// color representing the blend of material-light and grey-900
|
|
61905
|
+
parsed.push({
|
|
61906
|
+
[themeTypesKeys['material-light-blend-grey-900'].cssVariable]: (_a = blendColors(squidTheme['material-light-thin'], squidTheme['grey-900'])) !== null && _a !== void 0 ? _a : '',
|
|
61907
|
+
});
|
|
61908
|
+
}
|
|
61522
61909
|
return parsed.reduce((a, v) => {
|
|
61523
61910
|
const key = Object.keys(v)[0];
|
|
61524
61911
|
return Object.assign(Object.assign({}, a), { [key]: v[key] });
|
|
@@ -61800,6 +62187,9 @@ exports.WalletLink = WalletLink;
|
|
|
61800
62187
|
exports.WalletsView = WalletsView;
|
|
61801
62188
|
exports.WrapAction = WrapAction;
|
|
61802
62189
|
exports.XSocial = XSocial;
|
|
62190
|
+
exports.baseTailwindConfig = baseTailwindConfig;
|
|
62191
|
+
exports.darkTheme = darkTheme;
|
|
62192
|
+
exports.lightTheme = lightTheme;
|
|
61803
62193
|
exports.linkActionTimelineProps = linkActionTimelineProps;
|
|
61804
62194
|
exports.statusBgClassMap = statusBgClassMap$1;
|
|
61805
62195
|
exports.statusColorClassMap = statusColorClassMap;
|