@asdp/ferryui 0.1.22-dev.9610 → 0.1.22-dev.9698

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, Caption1Strong, Caption2, Button, Body1, Body1Strong, Caption1, Dialog, DialogSurface, DialogBody, DialogTitle, DialogTrigger, DialogContent, Carousel, CarouselButton, CarouselViewport, mergeClasses, CarouselSlider, CarouselNav, CarouselNavButton, CarouselCard, Skeleton, SkeletonItem, Subtitle2, Card, Tooltip, Badge, Title2, Divider, Title3, Label, Text, Subtitle1, Checkbox, MessageBar, MessageBarBody, Accordion, AccordionItem, AccordionHeader, AccordionPanel, RadioGroup, Menu, MenuTrigger, MenuPopover, MenuList, Radio, DialogActions, Caption2Strong, Body2, Body1Stronger, Caption1Stronger, Display, Image, Title1, TabList, Tab, typographyStyles, Switch, Textarea, Link } from '@fluentui/react-components';
1
+ import { makeStyles, tokens, createLightTheme, createDarkTheme, shorthands, Popover, PopoverTrigger, Input, PopoverSurface, Field, Caption1Strong, Caption2, Button, InfoLabel, Body1, Body1Strong, Caption1, Dialog, DialogSurface, DialogBody, DialogTitle, DialogTrigger, DialogContent, Carousel, CarouselButton, CarouselViewport, mergeClasses, CarouselSlider, CarouselNav, CarouselNavButton, CarouselCard, Skeleton, SkeletonItem, Subtitle2, Card, Tooltip, Badge, Title2, Divider, Title3, Label, Text, Subtitle1, Checkbox, MessageBar, MessageBarBody, Accordion, AccordionItem, AccordionHeader, AccordionPanel, RadioGroup, Menu, MenuTrigger, MenuPopover, MenuList, Radio, DialogActions, Caption2Strong, Body2, Body1Stronger, Caption1Stronger, Display, Image, Title1, TabList, Tab, typographyStyles, Switch, Textarea, Link } from '@fluentui/react-components';
2
2
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
3
3
  import React, { forwardRef, useState, useRef, useEffect, useCallback, useMemo, Fragment as Fragment$1 } from 'react';
4
4
  import { ArrowDownloadRegular, Dismiss24Regular, DismissRegular, SubtractRegular, AddRegular, DeleteRegular, InfoRegular, SearchRegular } from '@fluentui/react-icons';
@@ -4233,7 +4233,8 @@ var InputDynamic = ({
4233
4233
  ...provided,
4234
4234
  minHeight: "40px",
4235
4235
  // fontSize: tokens.fontSizeBase400,
4236
- transition: "all 0.2s ease"
4236
+ transition: "all 0.2s ease",
4237
+ cursor: disabled ? "not-allowed" : "pointer"
4237
4238
  };
4238
4239
  if (currentAppearance === "outline") {
4239
4240
  return {
@@ -12785,6 +12786,7 @@ var CardVehicleOwnerForm = ({
12785
12786
  onUpdateOwner(owner.id, {
12786
12787
  cargoItems: updatedCargoItems
12787
12788
  });
12789
+ setValue(`owners.${index}.cargo.${cargoIndex}.cargoType`, "");
12788
12790
  },
12789
12791
  options: commodityOptions,
12790
12792
  placeholder: mergedLabels.selectPlaceholder,
@@ -12835,7 +12837,12 @@ var CardVehicleOwnerForm = ({
12835
12837
  cargoItems: updatedCargoItems
12836
12838
  });
12837
12839
  },
12838
- options: loadTypeOptions,
12840
+ options: loadTypeOptions.filter((lt) => lt.commodityId === (getValues(
12841
+ `owners.${index}.cargo.${cargoIndex}.commodity`
12842
+ ) || "")).map((lt) => ({
12843
+ value: lt.id.toString(),
12844
+ label: `${lt.name} (${lt.unit?.name})`
12845
+ })),
12839
12846
  placeholder: mergedLabels.selectPlaceholder,
12840
12847
  required: true,
12841
12848
  size: "large",
@@ -15883,8 +15890,8 @@ var uploadStyles = makeStyles({
15883
15890
  pointerEvents: "none"
15884
15891
  },
15885
15892
  filePreviewImage: {
15886
- width: "48px",
15887
- height: "48px",
15893
+ width: "32px",
15894
+ height: "32px",
15888
15895
  borderRadius: tokens.borderRadiusSmall,
15889
15896
  objectFit: "cover"
15890
15897
  },
@@ -15892,6 +15899,18 @@ var uploadStyles = makeStyles({
15892
15899
  maxWidth: "100%",
15893
15900
  maxHeight: "70vh",
15894
15901
  objectFit: "contain"
15902
+ },
15903
+ infoLabel: {
15904
+ '& [role="note"]': {
15905
+ backgroundColor: "black",
15906
+ color: "white"
15907
+ }
15908
+ },
15909
+ label: {
15910
+ whiteSpace: "nowrap",
15911
+ overflow: "hidden",
15912
+ textOverflow: "ellipsis",
15913
+ display: "block"
15895
15914
  }
15896
15915
  });
15897
15916
  var FileUpload = React.forwardRef(
@@ -15907,7 +15926,8 @@ var FileUpload = React.forwardRef(
15907
15926
  language = "id",
15908
15927
  labels: customLabels,
15909
15928
  pdfIcon,
15910
- downloadTemplateDocument = false
15929
+ downloadTemplateDocument = false,
15930
+ infoLabel
15911
15931
  }, ref) => {
15912
15932
  const mergedLabels = { ...DEFAULT_LABELS39[language], ...customLabels };
15913
15933
  const styles = uploadStyles();
@@ -16040,8 +16060,11 @@ var FileUpload = React.forwardRef(
16040
16060
  return /* @__PURE__ */ jsxs(
16041
16061
  Field,
16042
16062
  {
16063
+ ref,
16043
16064
  required,
16044
- label: /* @__PURE__ */ jsx(Body1, { children: label }),
16065
+ label: {
16066
+ children: (_, slotProps) => infoLabel ? /* @__PURE__ */ jsx(InfoLabel, { ...slotProps, info: infoLabel, className: styles.infoLabel, children: /* @__PURE__ */ jsx(Body1, { className: styles.label, children: label }) }) : /* @__PURE__ */ jsx(Body1, { className: styles.label, children: label })
16067
+ },
16045
16068
  className: styles.fieldContainer,
16046
16069
  children: [
16047
16070
  /* @__PURE__ */ jsx(
@@ -16121,8 +16144,10 @@ var FileUpload = React.forwardRef(
16121
16144
  {
16122
16145
  ref,
16123
16146
  required,
16124
- label: /* @__PURE__ */ jsx(Body1, { children: label }),
16125
16147
  className: styles.fieldContainer,
16148
+ label: {
16149
+ children: (_, slotProps) => infoLabel ? /* @__PURE__ */ jsx(InfoLabel, { ...slotProps, info: infoLabel, className: styles.infoLabel, children: /* @__PURE__ */ jsx(Body1, { className: styles.label, children: label }) }) : /* @__PURE__ */ jsx(Body1, { className: styles.label, children: label })
16150
+ },
16126
16151
  children: [
16127
16152
  /* @__PURE__ */ jsxs(
16128
16153
  Container,