@asdp/ferryui 0.1.22-dev.9630 → 0.1.22-dev.9700

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';
@@ -238,6 +238,8 @@ var fontWeight = {
238
238
  var sharedColors = {
239
239
  "Shared_Cranberry_Primary": "#c50f1f",
240
240
  "Shared_Red_Primary": "#d13438",
241
+ "Shared_Orange_Shade_20": "#bc4b09",
242
+ "Shared_Orange_Tint_60": "#fff9f5",
241
243
  "Shared_Green_Primary": "#107c10"};
242
244
  var lightModeColors = {
243
245
  "Neutral_Foreground_Disabled_Rest": "#bdbdbd",
@@ -11849,6 +11851,25 @@ var useStyles25 = makeStyles({
11849
11851
  height: "32px",
11850
11852
  zIndex: 1,
11851
11853
  filter: "drop-shadow(0px 2px 2px rgba(0, 0, 0, 0.1))"
11854
+ },
11855
+ warningBanner: {
11856
+ display: "flex",
11857
+ alignItems: "center",
11858
+ gap: "0.75rem",
11859
+ backgroundColor: sharedColors.Shared_Orange_Tint_60,
11860
+ border: `1px solid ${sharedColors.Shared_Orange_Shade_20}`,
11861
+ borderRadius: tokens.borderRadiusLarge,
11862
+ padding: "0.75rem 1rem",
11863
+ marginBottom: "1.5rem"
11864
+ },
11865
+ warningIcon: {
11866
+ color: sharedColors.Shared_Orange_Shade_20,
11867
+ flexShrink: 0,
11868
+ display: "flex"
11869
+ },
11870
+ warningText: {
11871
+ color: sharedColors.Shared_Orange_Shade_20,
11872
+ fontSize: tokens.fontSizeBase300
11852
11873
  }
11853
11874
  });
11854
11875
  var CardPassengerList = ({
@@ -11867,6 +11888,10 @@ var CardPassengerList = ({
11867
11888
  /* @__PURE__ */ jsx(Title3, { className: styles.headerTitle, children: displayTitle }),
11868
11889
  /* @__PURE__ */ jsx("div", { className: styles.headerLine })
11869
11890
  ] }),
11891
+ passengers.filter((p) => p.id).length !== passengers.length && /* @__PURE__ */ jsxs("div", { className: styles.warningBanner, children: [
11892
+ /* @__PURE__ */ jsx("div", { className: styles.warningIcon, children: /* @__PURE__ */ jsx(Icon, { icon: "fluent:warning-20-filled", width: 24, height: 24 }) }),
11893
+ /* @__PURE__ */ jsx("div", { className: styles.warningText, children: "Harap isi data penumpang dibawah ini untuk bisa melanjutkan pembelian tiket." })
11894
+ ] }),
11870
11895
  /* @__PURE__ */ jsx("div", { className: styles.passengerList, children: passengers.map((passenger, index) => {
11871
11896
  const badgeConfig = getBadgeConfig(passenger.serviceName);
11872
11897
  return /* @__PURE__ */ jsxs(
@@ -11884,7 +11909,7 @@ var CardPassengerList = ({
11884
11909
  },
11885
11910
  children: [
11886
11911
  /* @__PURE__ */ jsx("div", { className: styles.passengerInfo, children: /* @__PURE__ */ jsxs(Subtitle2, { className: styles.passengerText, children: [
11887
- passenger.name || `${mergedLabels.passengerPrefix} ${index + 1}`,
11912
+ passenger.fullName || `${mergedLabels.passengerPrefix} ${index + 1}`,
11888
11913
  " ",
11889
11914
  "(",
11890
11915
  passenger.passengerType,
@@ -11916,7 +11941,7 @@ var CardPassengerList = ({
11916
11941
  /* @__PURE__ */ jsx(
11917
11942
  Icon,
11918
11943
  {
11919
- icon: passenger.name && passenger.serviceName ? "fluent:edit-24-regular" : "fluent:chevron-right-24-regular",
11944
+ icon: passenger.id && passenger.serviceName ? "fluent:edit-24-regular" : "fluent:chevron-right-24-regular",
11920
11945
  width: 20,
11921
11946
  height: 20
11922
11947
  }
@@ -15890,8 +15915,8 @@ var uploadStyles = makeStyles({
15890
15915
  pointerEvents: "none"
15891
15916
  },
15892
15917
  filePreviewImage: {
15893
- width: "48px",
15894
- height: "48px",
15918
+ width: "32px",
15919
+ height: "32px",
15895
15920
  borderRadius: tokens.borderRadiusSmall,
15896
15921
  objectFit: "cover"
15897
15922
  },
@@ -15899,6 +15924,18 @@ var uploadStyles = makeStyles({
15899
15924
  maxWidth: "100%",
15900
15925
  maxHeight: "70vh",
15901
15926
  objectFit: "contain"
15927
+ },
15928
+ infoLabel: {
15929
+ '& [role="note"]': {
15930
+ backgroundColor: "black",
15931
+ color: "white"
15932
+ }
15933
+ },
15934
+ label: {
15935
+ whiteSpace: "nowrap",
15936
+ overflow: "hidden",
15937
+ textOverflow: "ellipsis",
15938
+ display: "block"
15902
15939
  }
15903
15940
  });
15904
15941
  var FileUpload = React.forwardRef(
@@ -15914,7 +15951,8 @@ var FileUpload = React.forwardRef(
15914
15951
  language = "id",
15915
15952
  labels: customLabels,
15916
15953
  pdfIcon,
15917
- downloadTemplateDocument = false
15954
+ downloadTemplateDocument = false,
15955
+ infoLabel
15918
15956
  }, ref) => {
15919
15957
  const mergedLabels = { ...DEFAULT_LABELS39[language], ...customLabels };
15920
15958
  const styles = uploadStyles();
@@ -16047,8 +16085,11 @@ var FileUpload = React.forwardRef(
16047
16085
  return /* @__PURE__ */ jsxs(
16048
16086
  Field,
16049
16087
  {
16088
+ ref,
16050
16089
  required,
16051
- label: /* @__PURE__ */ jsx(Body1, { children: label }),
16090
+ label: {
16091
+ 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 })
16092
+ },
16052
16093
  className: styles.fieldContainer,
16053
16094
  children: [
16054
16095
  /* @__PURE__ */ jsx(
@@ -16128,8 +16169,10 @@ var FileUpload = React.forwardRef(
16128
16169
  {
16129
16170
  ref,
16130
16171
  required,
16131
- label: /* @__PURE__ */ jsx(Body1, { children: label }),
16132
16172
  className: styles.fieldContainer,
16173
+ label: {
16174
+ 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 })
16175
+ },
16133
16176
  children: [
16134
16177
  /* @__PURE__ */ jsxs(
16135
16178
  Container,