@asdp/ferryui 0.1.22-dev.10850 → 0.1.22-dev.10923

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 CHANGED
@@ -3826,6 +3826,16 @@ interface CardPaymentMethodListProps {
3826
3826
  methods: PaymentMethodCategory[];
3827
3827
  selectedValue?: string;
3828
3828
  onSelect: (value: string) => void;
3829
+ /**
3830
+ * Loading state for skeleton display
3831
+ * @default false
3832
+ */
3833
+ isLoading?: boolean;
3834
+ /**
3835
+ * Number of skeleton categories to display while loading
3836
+ * @default 3
3837
+ */
3838
+ skeletonCount?: number;
3829
3839
  }
3830
3840
 
3831
3841
  declare const CardPaymentMethodList: React$1.FC<CardPaymentMethodListProps>;
@@ -3882,6 +3892,16 @@ interface CardPaymentMethodFavoriteProps {
3882
3892
  * @default true
3883
3893
  */
3884
3894
  showViewAllButton?: boolean;
3895
+ /**
3896
+ * Loading state for skeleton display
3897
+ * @default false
3898
+ */
3899
+ isLoading?: boolean;
3900
+ /**
3901
+ * Number of skeleton payment methods to display while loading
3902
+ * @default 3
3903
+ */
3904
+ skeletonCount?: number;
3885
3905
  }
3886
3906
 
3887
3907
  declare const CardPaymentMethodFavorite: React$1.FC<CardPaymentMethodFavoriteProps>;
@@ -3942,6 +3962,11 @@ interface CardPaymentInfoProps {
3942
3962
  onCopyVA?: () => void;
3943
3963
  onCheckStatus?: () => void;
3944
3964
  onChangePayment?: () => void;
3965
+ /**
3966
+ * Loading state for skeleton display
3967
+ * @default false
3968
+ */
3969
+ isLoading?: boolean;
3945
3970
  }
3946
3971
 
3947
3972
  declare const CardPaymentInfo: React$1.FC<CardPaymentInfoProps>;
package/dist/index.d.ts CHANGED
@@ -3826,6 +3826,16 @@ interface CardPaymentMethodListProps {
3826
3826
  methods: PaymentMethodCategory[];
3827
3827
  selectedValue?: string;
3828
3828
  onSelect: (value: string) => void;
3829
+ /**
3830
+ * Loading state for skeleton display
3831
+ * @default false
3832
+ */
3833
+ isLoading?: boolean;
3834
+ /**
3835
+ * Number of skeleton categories to display while loading
3836
+ * @default 3
3837
+ */
3838
+ skeletonCount?: number;
3829
3839
  }
3830
3840
 
3831
3841
  declare const CardPaymentMethodList: React$1.FC<CardPaymentMethodListProps>;
@@ -3882,6 +3892,16 @@ interface CardPaymentMethodFavoriteProps {
3882
3892
  * @default true
3883
3893
  */
3884
3894
  showViewAllButton?: boolean;
3895
+ /**
3896
+ * Loading state for skeleton display
3897
+ * @default false
3898
+ */
3899
+ isLoading?: boolean;
3900
+ /**
3901
+ * Number of skeleton payment methods to display while loading
3902
+ * @default 3
3903
+ */
3904
+ skeletonCount?: number;
3885
3905
  }
3886
3906
 
3887
3907
  declare const CardPaymentMethodFavorite: React$1.FC<CardPaymentMethodFavoriteProps>;
@@ -3942,6 +3962,11 @@ interface CardPaymentInfoProps {
3942
3962
  onCopyVA?: () => void;
3943
3963
  onCheckStatus?: () => void;
3944
3964
  onChangePayment?: () => void;
3965
+ /**
3966
+ * Loading state for skeleton display
3967
+ * @default false
3968
+ */
3969
+ isLoading?: boolean;
3945
3970
  }
3946
3971
 
3947
3972
  declare const CardPaymentInfo: React$1.FC<CardPaymentInfoProps>;
package/dist/index.js CHANGED
@@ -16542,6 +16542,17 @@ var useStyles38 = reactComponents.makeStyles({
16542
16542
  height: "40px",
16543
16543
  objectFit: "contain"
16544
16544
  },
16545
+ skeletonOption: {
16546
+ display: "flex",
16547
+ alignItems: "center",
16548
+ justifyContent: "space-between",
16549
+ width: "100%"
16550
+ },
16551
+ skeletonOptionLeft: {
16552
+ display: "flex",
16553
+ alignItems: "center",
16554
+ gap: reactComponents.tokens.spacingHorizontalL
16555
+ },
16545
16556
  card: {
16546
16557
  position: "relative",
16547
16558
  borderRadius: reactComponents.tokens.borderRadiusXLarge,
@@ -16558,13 +16569,53 @@ var CardPaymentMethodList = ({
16558
16569
  labels,
16559
16570
  methods,
16560
16571
  selectedValue,
16561
- onSelect
16572
+ onSelect,
16573
+ isLoading = false,
16574
+ skeletonCount = 3
16562
16575
  }) => {
16563
16576
  const styles = useStyles38();
16564
16577
  const mergedLabels = { ...DEFAULT_LABELS36[language], ...labels };
16565
16578
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles.card, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `${styles.container}`, children: [
16566
16579
  /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Subtitle1, { children: mergedLabels.method }),
16567
- methods.map((category, index) => /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
16580
+ isLoading ? Array.from({ length: skeletonCount }).map((_, index) => /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
16581
+ index > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles.dividerContainer, children: /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Divider, {}) }),
16582
+ /* @__PURE__ */ jsxRuntime.jsxs(reactComponents.Skeleton, { children: [
16583
+ /* @__PURE__ */ jsxRuntime.jsx(
16584
+ reactComponents.SkeletonItem,
16585
+ {
16586
+ style: {
16587
+ width: "60%",
16588
+ height: "20px",
16589
+ marginBottom: reactComponents.tokens.spacingVerticalXXL
16590
+ }
16591
+ }
16592
+ ),
16593
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.skeletonOption, children: [
16594
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.skeletonOptionLeft, children: [
16595
+ /* @__PURE__ */ jsxRuntime.jsx(
16596
+ reactComponents.SkeletonItem,
16597
+ {
16598
+ shape: "circle",
16599
+ style: { width: "40px", height: "40px" }
16600
+ }
16601
+ ),
16602
+ /* @__PURE__ */ jsxRuntime.jsx(
16603
+ reactComponents.SkeletonItem,
16604
+ {
16605
+ style: { width: "140px", height: "18px" }
16606
+ }
16607
+ )
16608
+ ] }),
16609
+ /* @__PURE__ */ jsxRuntime.jsx(
16610
+ reactComponents.SkeletonItem,
16611
+ {
16612
+ shape: "circle",
16613
+ style: { width: "20px", height: "20px" }
16614
+ }
16615
+ )
16616
+ ] })
16617
+ ] })
16618
+ ] }, `payment-method-skeleton-${index}`)) : methods.map((category, index) => /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
16568
16619
  index > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles.dividerContainer, children: /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Divider, {}) }),
16569
16620
  /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Accordion, { multiple: true, collapsible: true, children: /* @__PURE__ */ jsxRuntime.jsxs(reactComponents.AccordionItem, { value: category.value, children: [
16570
16621
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -16648,6 +16699,17 @@ var useStyles39 = reactComponents.makeStyles({
16648
16699
  ),
16649
16700
  backgroundColor: reactComponents.tokens.colorNeutralBackground1,
16650
16701
  zIndex: 3
16702
+ },
16703
+ skeletonRow: {
16704
+ display: "flex",
16705
+ alignItems: "center",
16706
+ justifyContent: "space-between",
16707
+ width: "100%"
16708
+ },
16709
+ skeletonLeft: {
16710
+ display: "flex",
16711
+ alignItems: "center",
16712
+ gap: reactComponents.tokens.spacingHorizontalL
16651
16713
  }
16652
16714
  });
16653
16715
  var CardPaymentMethodFavorite = ({
@@ -16658,7 +16720,9 @@ var CardPaymentMethodFavorite = ({
16658
16720
  onSelect,
16659
16721
  onViewAllMethods,
16660
16722
  showWarning = true,
16661
- showViewAllButton = true
16723
+ showViewAllButton = true,
16724
+ isLoading = false,
16725
+ skeletonCount = 3
16662
16726
  }) => {
16663
16727
  const styles = useStyles39();
16664
16728
  const mergedLabels = { ...DEFAULT_LABELS37[language], ...labels };
@@ -16678,29 +16742,61 @@ var CardPaymentMethodFavorite = ({
16678
16742
  )
16679
16743
  }
16680
16744
  ),
16681
- /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Row, { nogutter: true, style: { gap: reactComponents.tokens.spacingVerticalL }, children: methods.map((option) => /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { xs: 12, onClick: () => onSelect(option.value), style: { cursor: "pointer" }, children: /* @__PURE__ */ jsxRuntime.jsxs(reactGridSystem.Row, { justify: "between", children: [
16682
- /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { xs: "content", children: /* @__PURE__ */ jsxRuntime.jsx(
16683
- "img",
16684
- {
16685
- src: option.image,
16686
- alt: option.label,
16687
- className: styles.image
16688
- }
16689
- ) }),
16690
- /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { children: /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Subtitle2, { children: option.label }) }),
16691
- /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { xs: "content", children: /* @__PURE__ */ jsxRuntime.jsx(
16692
- reactComponents.Radio,
16745
+ isLoading ? /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Skeleton, { children: /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Row, { nogutter: true, style: { gap: reactComponents.tokens.spacingVerticalL }, children: Array.from({ length: skeletonCount }).map((_, index) => /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { xs: 12, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.skeletonRow, children: [
16746
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.skeletonLeft, children: [
16747
+ /* @__PURE__ */ jsxRuntime.jsx(
16748
+ reactComponents.SkeletonItem,
16749
+ {
16750
+ shape: "circle",
16751
+ style: { width: "40px", height: "40px" }
16752
+ }
16753
+ ),
16754
+ /* @__PURE__ */ jsxRuntime.jsx(
16755
+ reactComponents.SkeletonItem,
16756
+ {
16757
+ style: { width: "140px", height: "18px" }
16758
+ }
16759
+ )
16760
+ ] }),
16761
+ /* @__PURE__ */ jsxRuntime.jsx(
16762
+ reactComponents.SkeletonItem,
16693
16763
  {
16694
- checked: selectedValue === option.value,
16695
- onChange: () => onSelect(option.value),
16696
- value: option.value,
16697
- name: "payment-method-favorite",
16698
- disabled: option.disabled,
16699
- "aria-label": `${mergedLabels.selectAriaLabel} ${option.label}`
16764
+ shape: "circle",
16765
+ style: { width: "20px", height: "20px" }
16700
16766
  }
16701
- ) })
16702
- ] }) }, option.value)) }),
16703
- showViewAllButton && /* @__PURE__ */ jsxRuntime.jsx(
16767
+ )
16768
+ ] }) }, `payment-favorite-skeleton-${index}`)) }) }) : /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Row, { nogutter: true, style: { gap: reactComponents.tokens.spacingVerticalL }, children: methods.map((option) => /* @__PURE__ */ jsxRuntime.jsx(
16769
+ reactGridSystem.Col,
16770
+ {
16771
+ xs: 12,
16772
+ onClick: () => onSelect(option.value),
16773
+ style: { cursor: "pointer" },
16774
+ children: /* @__PURE__ */ jsxRuntime.jsxs(reactGridSystem.Row, { justify: "between", children: [
16775
+ /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { xs: "content", children: /* @__PURE__ */ jsxRuntime.jsx(
16776
+ "img",
16777
+ {
16778
+ src: option.image,
16779
+ alt: option.label,
16780
+ className: styles.image
16781
+ }
16782
+ ) }),
16783
+ /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { children: /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Subtitle2, { children: option.label }) }),
16784
+ /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { xs: "content", children: /* @__PURE__ */ jsxRuntime.jsx(
16785
+ reactComponents.Radio,
16786
+ {
16787
+ checked: selectedValue === option.value,
16788
+ onChange: () => onSelect(option.value),
16789
+ value: option.value,
16790
+ name: "payment-method-favorite",
16791
+ disabled: option.disabled,
16792
+ "aria-label": `${mergedLabels.selectAriaLabel} ${option.label}`
16793
+ }
16794
+ ) })
16795
+ ] })
16796
+ },
16797
+ option.value
16798
+ )) }),
16799
+ showViewAllButton && !isLoading && /* @__PURE__ */ jsxRuntime.jsx(
16704
16800
  reactComponents.Button,
16705
16801
  {
16706
16802
  style: { width: "100%" },
@@ -16877,6 +16973,18 @@ var useStyles41 = reactComponents.makeStyles({
16877
16973
  reactComponents.tokens.spacingHorizontalM
16878
16974
  ),
16879
16975
  color: reactComponents.tokens.colorNeutralForeground4
16976
+ },
16977
+ skeletonCenter: {
16978
+ display: "flex",
16979
+ flexDirection: "column",
16980
+ alignItems: "center",
16981
+ gap: reactComponents.tokens.spacingHorizontalM
16982
+ },
16983
+ skeletonRow: {
16984
+ display: "flex",
16985
+ alignItems: "center",
16986
+ justifyContent: "center",
16987
+ gap: reactComponents.tokens.spacingHorizontalM
16880
16988
  }
16881
16989
  });
16882
16990
  var CardPaymentInfo = ({
@@ -16889,11 +16997,103 @@ var CardPaymentInfo = ({
16889
16997
  guides,
16890
16998
  onCopyVA,
16891
16999
  onCheckStatus,
16892
- onChangePayment
17000
+ onChangePayment,
17001
+ isLoading = false
16893
17002
  }) => {
16894
17003
  const styles = useStyles41();
16895
17004
  const mergedLabels = { ...DEFAULT_LABELS39[language], ...labels };
16896
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles.card, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.container, children: [
17005
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles.card, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles.container, children: isLoading ? /* @__PURE__ */ jsxRuntime.jsxs(reactComponents.Skeleton, { children: [
17006
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.headerRow, children: [
17007
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.SkeletonItem, { style: { width: "180px", height: "20px" } }),
17008
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.SkeletonItem, { style: { width: "260px", height: "28px" } })
17009
+ ] }),
17010
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.infoCard, children: [
17011
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.codeCard, children: [
17012
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.skeletonRow, children: [
17013
+ /* @__PURE__ */ jsxRuntime.jsx(
17014
+ reactComponents.SkeletonItem,
17015
+ {
17016
+ shape: "circle",
17017
+ style: { width: "40px", height: "40px" }
17018
+ }
17019
+ ),
17020
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.SkeletonItem, { style: { width: "160px", height: "20px" } })
17021
+ ] }),
17022
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.skeletonCenter, children: [
17023
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.SkeletonItem, { style: { width: "260px", height: "36px" } }),
17024
+ /* @__PURE__ */ jsxRuntime.jsx(
17025
+ reactComponents.SkeletonItem,
17026
+ {
17027
+ style: {
17028
+ width: "80%",
17029
+ height: "40px",
17030
+ borderRadius: reactComponents.tokens.borderRadiusCircular
17031
+ }
17032
+ }
17033
+ )
17034
+ ] })
17035
+ ] }),
17036
+ /* @__PURE__ */ jsxRuntime.jsx(
17037
+ reactComponents.SkeletonItem,
17038
+ {
17039
+ style: {
17040
+ width: "100%",
17041
+ height: "40px",
17042
+ borderRadius: reactComponents.tokens.borderRadiusCircular
17043
+ }
17044
+ }
17045
+ ),
17046
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
17047
+ /* @__PURE__ */ jsxRuntime.jsx(
17048
+ reactComponents.SkeletonItem,
17049
+ {
17050
+ style: {
17051
+ width: "120px",
17052
+ height: "18px",
17053
+ marginBottom: "8px"
17054
+ }
17055
+ }
17056
+ ),
17057
+ /* @__PURE__ */ jsxRuntime.jsx(
17058
+ reactComponents.SkeletonItem,
17059
+ {
17060
+ style: {
17061
+ width: "100%",
17062
+ height: "36px",
17063
+ borderRadius: reactComponents.tokens.borderRadius2XLarge
17064
+ }
17065
+ }
17066
+ )
17067
+ ] })
17068
+ ] }),
17069
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
17070
+ /* @__PURE__ */ jsxRuntime.jsx(
17071
+ reactComponents.SkeletonItem,
17072
+ {
17073
+ style: {
17074
+ width: "75%",
17075
+ height: "18px",
17076
+ marginBottom: reactComponents.tokens.spacingVerticalM
17077
+ }
17078
+ }
17079
+ ),
17080
+ /* @__PURE__ */ jsxRuntime.jsx(
17081
+ reactComponents.SkeletonItem,
17082
+ {
17083
+ style: {
17084
+ width: "100%",
17085
+ height: "40px",
17086
+ borderRadius: reactComponents.tokens.borderRadiusCircular
17087
+ }
17088
+ }
17089
+ )
17090
+ ] }),
17091
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.infoCard, children: [
17092
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.SkeletonItem, { style: { width: "55%", height: "20px" } }),
17093
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.SkeletonItem, { style: { width: "100%", height: "16px" } }),
17094
+ /* @__PURE__ */ jsxRuntime.jsx(reactComponents.SkeletonItem, { style: { width: "85%", height: "16px" } })
17095
+ ] })
17096
+ ] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
16897
17097
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.headerRow, children: [
16898
17098
  /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Subtitle1, { children: mergedLabels.expiryPrefix }),
16899
17099
  /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Title2, { className: styles.expiryTitle, children: expiryDate })
@@ -16946,7 +17146,16 @@ var CardPaymentInfo = ({
16946
17146
  )
16947
17147
  ] }),
16948
17148
  /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
16949
- /* @__PURE__ */ jsxRuntime.jsx("div", { style: { marginBottom: reactComponents.tokens.spacingVerticalM }, children: /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Subtitle2, { style: { color: reactComponents.tokens.colorNeutralStrokeAccessible, fontWeight: fontWeight.Medium }, children: mergedLabels.checkStatusInfo }) }),
17149
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { marginBottom: reactComponents.tokens.spacingVerticalM }, children: /* @__PURE__ */ jsxRuntime.jsx(
17150
+ reactComponents.Subtitle2,
17151
+ {
17152
+ style: {
17153
+ color: reactComponents.tokens.colorNeutralStrokeAccessible,
17154
+ fontWeight: fontWeight.Medium
17155
+ },
17156
+ children: mergedLabels.checkStatusInfo
17157
+ }
17158
+ ) }),
16950
17159
  /* @__PURE__ */ jsxRuntime.jsx(
16951
17160
  reactComponents.Button,
16952
17161
  {
@@ -16960,7 +17169,7 @@ var CardPaymentInfo = ({
16960
17169
  )
16961
17170
  ] }),
16962
17171
  /* @__PURE__ */ jsxRuntime.jsx(CardPaymentGuide, { guides, language })
16963
- ] }) });
17172
+ ] }) }) });
16964
17173
  };
16965
17174
 
16966
17175
  // src/components/CardStatusOrder/CardStatusOrder.constants.ts