@asdp/ferryui 0.1.15 → 0.1.16
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.d.mts +8 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +35 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +36 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { makeStyles, tokens, shorthands, Popover, PopoverTrigger, Input, PopoverSurface, Dialog, DialogSurface, DialogBody, DialogTitle, DialogContent, Body1, Button, Carousel, mergeClasses, CarouselViewport, CarouselSlider, CarouselNav, CarouselNavButton, CarouselCard, Subtitle2, Card, Tooltip, Badge, Caption1, Title2, Caption2, Divider, Title3, Caption1Strong, Field, Label, Text, Body1Strong, Checkbox, MessageBar, MessageBarBody, Accordion, AccordionItem, AccordionHeader, AccordionPanel, RadioGroup, Radio, typographyStyles, Switch, Textarea } from '@fluentui/react-components';
|
|
1
|
+
import { makeStyles, tokens, shorthands, Popover, PopoverTrigger, Input, PopoverSurface, Dialog, DialogSurface, DialogBody, DialogTitle, DialogContent, Body1, Button, Carousel, mergeClasses, CarouselViewport, CarouselSlider, CarouselNav, CarouselNavButton, CarouselCard, Skeleton, SkeletonItem, Subtitle2, Card, Tooltip, Badge, Caption1, Title2, Caption2, Divider, Title3, Caption1Strong, Field, Label, Text, Body1Strong, Checkbox, MessageBar, MessageBarBody, Accordion, AccordionItem, AccordionHeader, AccordionPanel, RadioGroup, Radio, typographyStyles, Switch, Textarea } from '@fluentui/react-components';
|
|
2
2
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
3
3
|
import React2, { forwardRef, useState, useCallback, useRef, useEffect, useMemo } from 'react';
|
|
4
4
|
import { Row, Col } from 'react-grid-system';
|
|
@@ -343,10 +343,29 @@ var CardPromo = ({
|
|
|
343
343
|
buttonText = "Lihat Detail",
|
|
344
344
|
className,
|
|
345
345
|
imageClassName,
|
|
346
|
-
descriptionClassName
|
|
346
|
+
descriptionClassName,
|
|
347
|
+
isLoading = false
|
|
347
348
|
}) => {
|
|
348
349
|
const classes = useStyles3();
|
|
349
350
|
const ariaLabel = totalCards ? `Card ${index + 1} of ${totalCards}` : `Promo card ${index + 1}`;
|
|
351
|
+
if (isLoading) {
|
|
352
|
+
return /* @__PURE__ */ jsx(
|
|
353
|
+
CarouselCard,
|
|
354
|
+
{
|
|
355
|
+
autoSize: true,
|
|
356
|
+
className: mergeClasses(classes.actionCard, className),
|
|
357
|
+
style: { cursor: "default" },
|
|
358
|
+
children: /* @__PURE__ */ jsxs(Skeleton, { "aria-label": "Loading content", children: [
|
|
359
|
+
/* @__PURE__ */ jsx("div", { className: mergeClasses(classes.imageContainer, imageClassName), children: /* @__PURE__ */ jsx(SkeletonItem, { shape: "rectangle", style: { width: "100%", height: "100%" } }) }),
|
|
360
|
+
/* @__PURE__ */ jsx(Row, { className: classes.infoWrapper, children: /* @__PURE__ */ jsxs(Col, { className: classes.info, xs: 12, children: [
|
|
361
|
+
/* @__PURE__ */ jsx(SkeletonItem, { style: { width: "70%", height: "20px" } }),
|
|
362
|
+
/* @__PURE__ */ jsx(SkeletonItem, { style: { width: "90%", height: "16px" } }),
|
|
363
|
+
/* @__PURE__ */ jsx(SkeletonItem, { style: { width: "80%", height: "16px" } })
|
|
364
|
+
] }) })
|
|
365
|
+
] })
|
|
366
|
+
}
|
|
367
|
+
);
|
|
368
|
+
}
|
|
350
369
|
return /* @__PURE__ */ jsxs(
|
|
351
370
|
CarouselCard,
|
|
352
371
|
{
|
|
@@ -412,10 +431,24 @@ var CardBanner = ({
|
|
|
412
431
|
alt,
|
|
413
432
|
index = 0,
|
|
414
433
|
totalBanners,
|
|
415
|
-
onClick
|
|
434
|
+
onClick,
|
|
435
|
+
isLoading = false
|
|
416
436
|
}) => {
|
|
417
437
|
const classes = useStyles4();
|
|
418
438
|
const ariaLabel = totalBanners ? `Banner ${index + 1} of ${totalBanners}` : `Banner ${index + 1}`;
|
|
439
|
+
if (isLoading) {
|
|
440
|
+
return /* @__PURE__ */ jsx(CarouselCard, { className: classes.bannerCard, children: /* @__PURE__ */ jsx(Skeleton, { "aria-label": "Loading banner", style: { width: "100%", height: "100%" }, children: /* @__PURE__ */ jsx(
|
|
441
|
+
SkeletonItem,
|
|
442
|
+
{
|
|
443
|
+
shape: "rectangle",
|
|
444
|
+
style: {
|
|
445
|
+
width: "100%",
|
|
446
|
+
height: "100%",
|
|
447
|
+
borderRadius: tokens.borderRadiusXLarge
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
) }) });
|
|
451
|
+
}
|
|
419
452
|
return /* @__PURE__ */ jsx(
|
|
420
453
|
CarouselCard,
|
|
421
454
|
{
|