@sendoutcards/quantum-design-ui 1.7.24 → 1.7.25
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/index.es.js
CHANGED
|
@@ -5,7 +5,6 @@ import Color$1 from 'color';
|
|
|
5
5
|
import { motion, useMotionValue, useTransform, animate, AnimatePresence, useElementScroll, AnimateSharedLayout } from 'framer-motion';
|
|
6
6
|
import ReactDOM from 'react-dom';
|
|
7
7
|
import fastDeepEqual from 'fast-deep-equal';
|
|
8
|
-
import LazyLoad from 'react-lazyload';
|
|
9
8
|
import useResizeObserver from 'use-resize-observer';
|
|
10
9
|
import ContentLoader from 'react-content-loader';
|
|
11
10
|
import InfiniteScroll from 'react-infinite-scroller';
|
|
@@ -7702,7 +7701,7 @@ var UserSuccess = function (_a) {
|
|
|
7702
7701
|
}));
|
|
7703
7702
|
};
|
|
7704
7703
|
|
|
7705
|
-
var Image$
|
|
7704
|
+
var Image$2 = function (_a) {
|
|
7706
7705
|
var primaryColor = _a.primaryColor,
|
|
7707
7706
|
onClick = _a.onClick,
|
|
7708
7707
|
size = _a.size,
|
|
@@ -10525,7 +10524,7 @@ var Icon = function (_a) {
|
|
|
10525
10524
|
return jsx(UserSuccess, props);
|
|
10526
10525
|
|
|
10527
10526
|
case 'image':
|
|
10528
|
-
return jsx(Image$
|
|
10527
|
+
return jsx(Image$2, props);
|
|
10529
10528
|
|
|
10530
10529
|
case 'imageSwap':
|
|
10531
10530
|
return jsx(ImageSwap, props);
|
|
@@ -14375,7 +14374,23 @@ var ImageLoader = function (_a) {
|
|
|
14375
14374
|
}));
|
|
14376
14375
|
};
|
|
14377
14376
|
|
|
14378
|
-
var
|
|
14377
|
+
var useProgressiveImage = function (src) {
|
|
14378
|
+
var _a = React.useState(null),
|
|
14379
|
+
source = _a[0],
|
|
14380
|
+
setSource = _a[1];
|
|
14381
|
+
|
|
14382
|
+
useEffect(function () {
|
|
14383
|
+
var img = new Image();
|
|
14384
|
+
img.src = src;
|
|
14385
|
+
|
|
14386
|
+
img.onload = function () {
|
|
14387
|
+
return setSource(src);
|
|
14388
|
+
};
|
|
14389
|
+
}, [src]);
|
|
14390
|
+
return source;
|
|
14391
|
+
};
|
|
14392
|
+
|
|
14393
|
+
var Image$1 = function (_a) {
|
|
14379
14394
|
var image = _a.image,
|
|
14380
14395
|
_b = _a.activeFilter,
|
|
14381
14396
|
activeFilter = _b === void 0 ? {
|
|
@@ -14390,37 +14405,20 @@ var Image = function (_a) {
|
|
|
14390
14405
|
_c = _a.borderRadius,
|
|
14391
14406
|
borderRadius = _c === void 0 ? 'default' : _c,
|
|
14392
14407
|
onClick = _a.onClick,
|
|
14393
|
-
|
|
14394
|
-
|
|
14395
|
-
|
|
14396
|
-
|
|
14397
|
-
|
|
14398
|
-
|
|
14399
|
-
|
|
14400
|
-
var _f = useResizeObserver(),
|
|
14401
|
-
ref = _f.ref,
|
|
14402
|
-
width = _f.width,
|
|
14403
|
-
height = _f.height;
|
|
14408
|
+
_d = _a.backgroundSize,
|
|
14409
|
+
backgroundSize = _d === void 0 ? 'cover' : _d;
|
|
14410
|
+
|
|
14411
|
+
var _e = useResizeObserver(),
|
|
14412
|
+
ref = _e.ref,
|
|
14413
|
+
width = _e.width,
|
|
14414
|
+
height = _e.height;
|
|
14404
14415
|
|
|
14405
14416
|
var loaderRadius = isBorderRadiusDirectionType(borderRadius) ? 'default' : borderRadius;
|
|
14417
|
+
var src = useProgressiveImage(image.url);
|
|
14406
14418
|
return jsx(Div, {
|
|
14407
14419
|
css: styles$p.imageContainer(isActive, imageWidth, imageHeight),
|
|
14408
14420
|
ref: ref
|
|
14409
|
-
}, typeof
|
|
14410
|
-
style: {
|
|
14411
|
-
width: '100%',
|
|
14412
|
-
height: '100%'
|
|
14413
|
-
},
|
|
14414
|
-
offset: lazyLoadOffset,
|
|
14415
|
-
once: shouldLoadOnce,
|
|
14416
|
-
overflow: lazyLoadOverflow,
|
|
14417
|
-
placeholder: jsx(ImageLoader, {
|
|
14418
|
-
width: width,
|
|
14419
|
-
height: height,
|
|
14420
|
-
isActive: isActive,
|
|
14421
|
-
borderRadius: loaderRadius
|
|
14422
|
-
})
|
|
14423
|
-
}, jsx(Div, {
|
|
14421
|
+
}, typeof src === 'string' ? jsx(Div, {
|
|
14424
14422
|
css: styles$p.imageCss(isActive),
|
|
14425
14423
|
onClick: onClick && function () {
|
|
14426
14424
|
return onClick();
|
|
@@ -14431,7 +14429,12 @@ var Image = function (_a) {
|
|
|
14431
14429
|
}, jsx(Div, {
|
|
14432
14430
|
backgroundSize: backgroundSize,
|
|
14433
14431
|
css: styles$p.image(image.url)
|
|
14434
|
-
})))
|
|
14432
|
+
}))) : typeof width === 'number' && typeof height === 'number' && jsx(ImageLoader, {
|
|
14433
|
+
width: width,
|
|
14434
|
+
height: height,
|
|
14435
|
+
isActive: isActive,
|
|
14436
|
+
borderRadius: loaderRadius
|
|
14437
|
+
}), jsx(Text, {
|
|
14435
14438
|
type: "body"
|
|
14436
14439
|
}, title));
|
|
14437
14440
|
};
|
|
@@ -17142,7 +17145,7 @@ var AwardCard = function (_a) {
|
|
|
17142
17145
|
display: "flex",
|
|
17143
17146
|
justifyContent: "center",
|
|
17144
17147
|
alignItems: "center"
|
|
17145
|
-
}, jsx(Image, {
|
|
17148
|
+
}, jsx(Image$1, {
|
|
17146
17149
|
isActive: true,
|
|
17147
17150
|
image: {
|
|
17148
17151
|
url: image
|
|
@@ -17276,7 +17279,7 @@ var ExpandedAwardCard = function (_a) {
|
|
|
17276
17279
|
xSmall: typeof progress === 'number' ? progress === 100 ? '147px' : '145px' : progress.count > 0 ? '147px' : '145px',
|
|
17277
17280
|
small: typeof progress === 'number' ? progress === 100 ? '207px' : '145px' : progress.count > 0 ? '207px' : '145px'
|
|
17278
17281
|
}
|
|
17279
|
-
}, jsx(Image, {
|
|
17282
|
+
}, jsx(Image$1, {
|
|
17280
17283
|
isActive: true,
|
|
17281
17284
|
image: {
|
|
17282
17285
|
url: image
|
|
@@ -19261,7 +19264,7 @@ var AnimatedGrid = function (_a) {
|
|
|
19261
19264
|
height: "100%",
|
|
19262
19265
|
width: "100%",
|
|
19263
19266
|
borderRadius: "default"
|
|
19264
|
-
}, jsx(Image, {
|
|
19267
|
+
}, jsx(Image$1, {
|
|
19265
19268
|
height: "100%",
|
|
19266
19269
|
width: "100%",
|
|
19267
19270
|
image: {
|
|
@@ -20683,7 +20686,7 @@ var FeatureAnnouncement = function (_a) {
|
|
|
20683
20686
|
}), jsx(Card, {
|
|
20684
20687
|
outset: "x1_5",
|
|
20685
20688
|
backgroundColor: backgroundColor
|
|
20686
|
-
}, jsx(Image, {
|
|
20689
|
+
}, jsx(Image$1, {
|
|
20687
20690
|
isActive: true,
|
|
20688
20691
|
image: {
|
|
20689
20692
|
url: imageURL
|
|
@@ -21160,7 +21163,7 @@ var ImageUploadWidget = function (_a) {
|
|
|
21160
21163
|
}, jsx(Div, {
|
|
21161
21164
|
width: "100%",
|
|
21162
21165
|
height: "100%"
|
|
21163
|
-
}, jsx(Image, {
|
|
21166
|
+
}, jsx(Image$1, {
|
|
21164
21167
|
onClick: image.onClick,
|
|
21165
21168
|
isActive: true,
|
|
21166
21169
|
height: "100%",
|
|
@@ -21405,7 +21408,7 @@ var ImageThumbnail = function (_a) {
|
|
|
21405
21408
|
}, jsx(CloseButton, {
|
|
21406
21409
|
onClose: onRemove,
|
|
21407
21410
|
size: "xSmall"
|
|
21408
|
-
})), jsx(React.Fragment, null, jsx(Image, {
|
|
21411
|
+
})), jsx(React.Fragment, null, jsx(Image$1, {
|
|
21409
21412
|
isActive: true,
|
|
21410
21413
|
width: '100%',
|
|
21411
21414
|
height: '100%',
|
|
@@ -22259,7 +22262,7 @@ var PaperTypeModal = function (_a) {
|
|
|
22259
22262
|
key: index,
|
|
22260
22263
|
title: option.title,
|
|
22261
22264
|
description: option.description
|
|
22262
|
-
}, jsx(Image, {
|
|
22265
|
+
}, jsx(Image$1, {
|
|
22263
22266
|
width: '100%',
|
|
22264
22267
|
height: '100%',
|
|
22265
22268
|
isActive: true,
|
|
@@ -22294,4 +22297,4 @@ var useColorSwatch = function () {
|
|
|
22294
22297
|
};
|
|
22295
22298
|
};
|
|
22296
22299
|
|
|
22297
|
-
export { Accordion, AccordionBody, AccordionHeading, AccountMenu, AffiliateShareWidget, AffiliateUpsalePromotionWidget, Anchor, AnimatedCheckMark, AnimatedGrid, ArticleCard, Aside, Avatar, AwardCard, AwardGroupLabel, Badge, Banner, Bar, BlockQuote, BulkSend, Button, ButtonWithMenu, Capsule, Card, CardEntryDialog, CardQuantitySlider, Checkbox, Circle, CircleMenu, Clipboard, CloseButton, ColorOption, ConfigurationCard, ConfirmDialog, Content, ContentPusher, ContextBar, CountdownTimer, Dialog, DisplayCard, Div, DownloadButton, DragBar, DragBox, Drawer, DropDownMenu, ExpandedAwardCard, FeatureAnnouncement, FeatureBadge, Flex, Grid, GridItem, HStack, Icon, IconLink, Image, ImageThumbnail, ImageUploadWidget, ImageUploader, IncrementSetting, InfiniteScroller, InfoBlock, Input, InviteCard, LinkColumn, List, ListItem, Loader, LoadingSpinner, Logo, MasonryGrid, Menu, MenuItem, MenuSection, Navigation, NavigationPill, Option, OrderCard, Overlay, Page, PaperTypeModal, PhoneInput, Pill, PinInput, PricingTile, Progress, PromotionWidget, QDSChrome, QuantitySlider, QuantumColorPicker, QuantumThemeWrapper, QuickLink, RadioOptionCard, RadioOptionList, ReleaseNote, ReleaseNoteDialog, RevealingContent, RowItem, Scrollable, ScrollingIndicator, Section, Select, SelectableCard, SelectableList, Separator, SettingInput, Sheet, Sidebar, Slider, SnapPoint, Spacer, Span, Sphere, StackedCards, StaticNavigation, Stepper, Stoplight, SubNavigation, Tab, Table, TableRow, Tabs, Text, TitledList, Todo, Toggle, Tooltip, Transition, UpsaleSheet, UserCard, UserCardLoader, VStack, VideoPlayer, Zoom, entities$5 as bellaCadaeuxTheme, entities$4 as blue42Theme, getSize, entities$6 as greenerStillTheme, entities$3 as promptingUTheme, entities as sendOutCardsTheme, entities$7 as sendogoTheme, entities$2 as streamMarketingTheme, entities$1 as streamVATheme, useColorSwatch };
|
|
22300
|
+
export { Accordion, AccordionBody, AccordionHeading, AccountMenu, AffiliateShareWidget, AffiliateUpsalePromotionWidget, Anchor, AnimatedCheckMark, AnimatedGrid, ArticleCard, Aside, Avatar, AwardCard, AwardGroupLabel, Badge, Banner, Bar, BlockQuote, BulkSend, Button, ButtonWithMenu, Capsule, Card, CardEntryDialog, CardQuantitySlider, Checkbox, Circle, CircleMenu, Clipboard, CloseButton, ColorOption, ConfigurationCard, ConfirmDialog, Content, ContentPusher, ContextBar, CountdownTimer, Dialog, DisplayCard, Div, DownloadButton, DragBar, DragBox, Drawer, DropDownMenu, ExpandedAwardCard, FeatureAnnouncement, FeatureBadge, Flex, Grid, GridItem, HStack, Icon, IconLink, Image$1 as Image, ImageThumbnail, ImageUploadWidget, ImageUploader, IncrementSetting, InfiniteScroller, InfoBlock, Input, InviteCard, LinkColumn, List, ListItem, Loader, LoadingSpinner, Logo, MasonryGrid, Menu, MenuItem, MenuSection, Navigation, NavigationPill, Option, OrderCard, Overlay, Page, PaperTypeModal, PhoneInput, Pill, PinInput, PricingTile, Progress, PromotionWidget, QDSChrome, QuantitySlider, QuantumColorPicker, QuantumThemeWrapper, QuickLink, RadioOptionCard, RadioOptionList, ReleaseNote, ReleaseNoteDialog, RevealingContent, RowItem, Scrollable, ScrollingIndicator, Section, Select, SelectableCard, SelectableList, Separator, SettingInput, Sheet, Sidebar, Slider, SnapPoint, Spacer, Span, Sphere, StackedCards, StaticNavigation, Stepper, Stoplight, SubNavigation, Tab, Table, TableRow, Tabs, Text, TitledList, Todo, Toggle, Tooltip, Transition, UpsaleSheet, UserCard, UserCardLoader, VStack, VideoPlayer, Zoom, entities$5 as bellaCadaeuxTheme, entities$4 as blue42Theme, getSize, entities$6 as greenerStillTheme, entities$3 as promptingUTheme, entities as sendOutCardsTheme, entities$7 as sendogoTheme, entities$2 as streamMarketingTheme, entities$1 as streamVATheme, useColorSwatch };
|
|
@@ -447,6 +447,16 @@ export declare const useEntities: () => {
|
|
|
447
447
|
hoverBoxShadow: string;
|
|
448
448
|
hoverBottomDirectionShadow: string;
|
|
449
449
|
defaultInset: string;
|
|
450
|
+
tab: {
|
|
451
|
+
dark: {
|
|
452
|
+
backgroundColor: string | undefined;
|
|
453
|
+
arrowColor: string;
|
|
454
|
+
};
|
|
455
|
+
light: {
|
|
456
|
+
backgroundColor: string;
|
|
457
|
+
arrowColor: string | undefined;
|
|
458
|
+
};
|
|
459
|
+
};
|
|
450
460
|
};
|
|
451
461
|
sheet: {
|
|
452
462
|
mobileBorderRadius: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useProgressiveImage: (src: string) => string | null;
|
|
@@ -14,9 +14,6 @@ export declare type ImageProps = {
|
|
|
14
14
|
title?: string;
|
|
15
15
|
borderRadius?: BorderRadiusDirection | LiteralUnion<HOCBorderRadiusKeys>;
|
|
16
16
|
onClick?: () => void;
|
|
17
|
-
lazyLoadOffset?: number | number[];
|
|
18
|
-
lazyLoadOverflow?: boolean;
|
|
19
|
-
shouldLoadOnce?: boolean;
|
|
20
17
|
backgroundSize?: Responsive<BackgroundSize> | BackgroundSize;
|
|
21
18
|
};
|
|
22
19
|
export declare const Image: FC<ImageProps>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sendoutcards/quantum-design-ui",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.25",
|
|
4
4
|
"description": "UI component library for Quantum Design System",
|
|
5
5
|
"module": "dist/index.es.js",
|
|
6
6
|
"jsnext:main": "dist/index.es.js",
|
|
@@ -61,7 +61,6 @@
|
|
|
61
61
|
"react-eyedrop": "^5.1.3",
|
|
62
62
|
"react-infinite-scroll-component": "^6.1.0",
|
|
63
63
|
"react-infinite-scroller": "^1.2.4",
|
|
64
|
-
"react-lazyload": "^3.1.1",
|
|
65
64
|
"react-use-dimensions": "^1.2.1",
|
|
66
65
|
"ttypescript": "^1.5.12",
|
|
67
66
|
"use-callback-ref": "^1.2.4",
|