@asdp/ferryui 0.1.22-dev.8783 → 0.1.22-dev.8798

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.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { makeStyles, tokens, createLightTheme, createDarkTheme, shorthands, Popover, PopoverTrigger, Input, PopoverSurface, Field, Image, Caption1Strong, Caption2, Button, Dialog, DialogSurface, DialogBody, DialogTitle, DialogTrigger, DialogContent, Body1, Body1Strong, Caption1, Carousel, CarouselButton, CarouselViewport, mergeClasses, CarouselSlider, CarouselNav, CarouselNavButton, CarouselCard, Skeleton, SkeletonItem, Subtitle2, Card, Tooltip, Badge, Title2, Divider, Title3, Label, Text, Checkbox, MessageBar, MessageBarBody, Accordion, AccordionItem, AccordionHeader, AccordionPanel, RadioGroup, Radio, Menu, MenuTrigger, MenuPopover, MenuList, DialogActions, Caption2Strong, Subtitle1, Switch, Body1Stronger, Caption1Stronger, Display, Title1, TabList, Tab, Body2, typographyStyles, Textarea, Link } from '@fluentui/react-components';
1
+ import { makeStyles, tokens, createLightTheme, createDarkTheme, shorthands, Popover, PopoverTrigger, Input, PopoverSurface, Field, Caption1Strong, Caption2, Button, Dialog, DialogSurface, DialogBody, DialogTitle, DialogTrigger, DialogContent, Body1, Body1Strong, Caption1, Carousel, CarouselButton, CarouselViewport, mergeClasses, CarouselSlider, CarouselNav, CarouselNavButton, CarouselCard, Skeleton, SkeletonItem, Subtitle2, Card, Tooltip, Badge, Title2, Divider, Title3, Label, Text, Checkbox, MessageBar, MessageBarBody, Accordion, AccordionItem, AccordionHeader, AccordionPanel, RadioGroup, Radio, Menu, MenuTrigger, MenuPopover, MenuList, DialogActions, Caption2Strong, Subtitle1, Switch, Body1Stronger, Caption1Stronger, Display, Image, Title1, TabList, Tab, Body2, typographyStyles, Textarea, Link } from '@fluentui/react-components';
2
2
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
3
3
  import React5, { forwardRef, useState, useRef, useEffect, useCallback, useMemo, Fragment as Fragment$1 } from 'react';
4
4
  import { Dismiss24Regular, DismissRegular, SubtractRegular, AddRegular, DeleteRegular, InfoRegular } from '@fluentui/react-icons';
@@ -11900,7 +11900,8 @@ var FileUpload = React5.forwardRef(
11900
11900
  placeholder: placeholderProp,
11901
11901
  disabled = false,
11902
11902
  language = "id",
11903
- labels: customLabels
11903
+ labels: customLabels,
11904
+ pdfIcon
11904
11905
  }, ref) => {
11905
11906
  const mergedLabels = { ...DEFAULT_LABELS38[language], ...customLabels };
11906
11907
  const styles = uploadStyles();
@@ -11934,7 +11935,7 @@ var FileUpload = React5.forwardRef(
11934
11935
  const file = files[0];
11935
11936
  setCurrentFile(file);
11936
11937
  if (file.size > maxSize * 1024 * 1024) {
11937
- setSizeError("error");
11938
+ setSizeError(`${mergedLabels.sizeLabel} file melebihi ${maxSize}MB`);
11938
11939
  onChange(void 0);
11939
11940
  return;
11940
11941
  }
@@ -12047,7 +12048,24 @@ var FileUpload = React5.forwardRef(
12047
12048
  alt: "preview",
12048
12049
  className: styles.filePreviewImage
12049
12050
  }
12050
- ) : /* @__PURE__ */ jsx(Image, { src: "/assets/images/icons/pdficon.svg", alt: "PDF Icon", width: 32, height: 32 })
12051
+ ) : pdfIcon ? /* @__PURE__ */ jsx(
12052
+ "img",
12053
+ {
12054
+ src: pdfIcon,
12055
+ alt: "PDF Icon",
12056
+ width: 32,
12057
+ height: 32,
12058
+ style: { flexShrink: 0 }
12059
+ }
12060
+ ) : /* @__PURE__ */ jsx(
12061
+ Icon,
12062
+ {
12063
+ icon: "fluent:document-pdf-32-regular",
12064
+ width: 32,
12065
+ height: 32,
12066
+ style: { flexShrink: 0, color: brandColors2[80] }
12067
+ }
12068
+ )
12051
12069
  }
12052
12070
  ),
12053
12071
  /* @__PURE__ */ jsx(Col, { children: /* @__PURE__ */ jsxs("div", { className: styles.disabledFileInfo, children: [
@@ -12200,7 +12218,24 @@ var FileUpload = React5.forwardRef(
12200
12218
  alt: "preview",
12201
12219
  className: styles.filePreviewImage
12202
12220
  }
12203
- ) : /* @__PURE__ */ jsx(Image, { src: "/assets/images/icons/pdficon.svg", alt: "PDF Icon", width: 32, height: 32 })
12221
+ ) : pdfIcon ? /* @__PURE__ */ jsx(
12222
+ "img",
12223
+ {
12224
+ src: pdfIcon,
12225
+ alt: "PDF Icon",
12226
+ width: 32,
12227
+ height: 32,
12228
+ style: { flexShrink: 0 }
12229
+ }
12230
+ ) : /* @__PURE__ */ jsx(
12231
+ Icon,
12232
+ {
12233
+ icon: "fluent:document-pdf-32-regular",
12234
+ width: 32,
12235
+ height: 32,
12236
+ style: { flexShrink: 0, color: brandColors2[80] }
12237
+ }
12238
+ )
12204
12239
  }
12205
12240
  ),
12206
12241
  /* @__PURE__ */ jsx(Col, { children: /* @__PURE__ */ jsxs(