@asdp/ferryui 0.1.22-dev.8826 → 0.1.22-dev.8882

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.js CHANGED
@@ -2237,6 +2237,15 @@ var useStyles7 = reactComponents.makeStyles({
2237
2237
  },
2238
2238
  labelLarge: {
2239
2239
  fontSize: reactComponents.tokens.fontSizeBase300
2240
+ },
2241
+ valueSmall: {
2242
+ fontSize: reactComponents.tokens.fontSizeBase200
2243
+ },
2244
+ valueMedium: {
2245
+ fontSize: reactComponents.tokens.fontSizeBase300
2246
+ },
2247
+ valueLarge: {
2248
+ fontSize: reactComponents.tokens.fontSizeBase400
2240
2249
  }
2241
2250
  });
2242
2251
  var detectIdentityType = (value) => {
@@ -2512,6 +2521,8 @@ var InputDynamic = ({
2512
2521
  };
2513
2522
  const otpMatch = /^otp(\d+)$/.exec(String(name));
2514
2523
  const otpIndex2 = otpMatch ? parseInt(otpMatch[1], 10) : null;
2524
+ const classNameSize = size === "small" ? styles.valueSmall : size === "medium" ? styles.valueMedium : styles.valueLarge;
2525
+ const fontSizeValuePhoneInput = size == "small" ? reactComponents.tokens.fontSizeBase200 : size === "medium" ? reactComponents.tokens.fontSizeBase300 : reactComponents.tokens.fontSizeBase400;
2515
2526
  if (type === "emailOrPhone") {
2516
2527
  updateEmailOrPhoneType(field.value);
2517
2528
  const stringValue = typeof field.value === "string" ? field.value : "";
@@ -2551,6 +2562,9 @@ var InputDynamic = ({
2551
2562
  children: /* @__PURE__ */ jsxRuntime.jsx(
2552
2563
  PhoneInput,
2553
2564
  {
2565
+ inputStyle: {
2566
+ fontSize: fontSizeValuePhoneInput
2567
+ },
2554
2568
  country: defaultCountry.toLowerCase(),
2555
2569
  value: stringValue.startsWith("+") ? stringValue.substring(1) : stringValue,
2556
2570
  onChange: (value, data) => {
@@ -2610,6 +2624,7 @@ var InputDynamic = ({
2610
2624
  field.onChange(normalizedValue);
2611
2625
  updateEmailOrPhoneType(normalizedValue);
2612
2626
  },
2627
+ className: classNameSize,
2613
2628
  placeholder: inputPlaceholder,
2614
2629
  disabled,
2615
2630
  appearance,
@@ -2689,7 +2704,10 @@ var InputDynamic = ({
2689
2704
  placeholder: inputPlaceholder,
2690
2705
  disabled,
2691
2706
  enableSearch: true,
2692
- disableSearchIcon: true
2707
+ disableSearchIcon: true,
2708
+ inputStyle: {
2709
+ fontSize: fontSizeValuePhoneInput
2710
+ }
2693
2711
  }
2694
2712
  )
2695
2713
  }
@@ -2712,13 +2730,22 @@ var InputDynamic = ({
2712
2730
  appearance,
2713
2731
  size,
2714
2732
  type: inputType,
2715
- style: { width: "100%" }
2733
+ style: { width: "100%" },
2734
+ className: classNameSize
2716
2735
  }
2717
2736
  ) });
2718
2737
  }
2719
2738
  switch (type) {
2720
2739
  case "textarea":
2721
- return /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Textarea, { ...commonProps, rows, resize: "vertical" });
2740
+ return /* @__PURE__ */ jsxRuntime.jsx(
2741
+ reactComponents.Textarea,
2742
+ {
2743
+ ...commonProps,
2744
+ rows,
2745
+ resize: "vertical",
2746
+ className: classNameSize
2747
+ }
2748
+ );
2722
2749
  case "select":
2723
2750
  return /* @__PURE__ */ jsxRuntime.jsx(
2724
2751
  Select__default.default,
@@ -2729,7 +2756,7 @@ var InputDynamic = ({
2729
2756
  placeholder,
2730
2757
  options,
2731
2758
  styles: getSelectStyles(!!error),
2732
- className: styles.reactSelect,
2759
+ className: reactComponents.mergeClasses(styles.reactSelect, classNameSize),
2733
2760
  classNamePrefix: "react-select",
2734
2761
  isMulti: isMultiSelect,
2735
2762
  inputProps: {
@@ -2765,7 +2792,7 @@ var InputDynamic = ({
2765
2792
  placeholder: placeholder || "Select country",
2766
2793
  options: COUNTRIES,
2767
2794
  styles: getSelectStyles(!!error),
2768
- className: styles.reactSelect,
2795
+ className: reactComponents.mergeClasses(styles.reactSelect, classNameSize),
2769
2796
  classNamePrefix: "react-select",
2770
2797
  inputProps: {
2771
2798
  autoComplete: "new-password",
@@ -2782,10 +2809,16 @@ var InputDynamic = ({
2782
2809
  },
2783
2810
  getOptionLabel: (option) => option.label,
2784
2811
  getOptionValue: (option) => option.value,
2785
- formatOptionLabel: (option) => /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
2786
- /* @__PURE__ */ jsxRuntime.jsx(react.Icon, { icon: option.flag, width: 20, height: 20 }),
2787
- /* @__PURE__ */ jsxRuntime.jsx("span", { children: option.label })
2788
- ] }),
2812
+ formatOptionLabel: (option) => /* @__PURE__ */ jsxRuntime.jsxs(
2813
+ "div",
2814
+ {
2815
+ style: { display: "flex", alignItems: "center", gap: "8px" },
2816
+ children: [
2817
+ /* @__PURE__ */ jsxRuntime.jsx(react.Icon, { icon: option.flag, width: 20, height: 20 }),
2818
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: option.label })
2819
+ ]
2820
+ }
2821
+ ),
2789
2822
  menuPlacement
2790
2823
  }
2791
2824
  );
@@ -2816,7 +2849,10 @@ var InputDynamic = ({
2816
2849
  placeholder: placeholder || mergedLabels.phoneDefaultPlaceholder,
2817
2850
  disabled,
2818
2851
  enableSearch: true,
2819
- disableSearchIcon: true
2852
+ disableSearchIcon: true,
2853
+ inputStyle: {
2854
+ fontSize: fontSizeValuePhoneInput
2855
+ }
2820
2856
  }
2821
2857
  )
2822
2858
  }
@@ -2922,7 +2958,10 @@ var InputDynamic = ({
2922
2958
  min,
2923
2959
  max,
2924
2960
  step,
2925
- className: styles.inputWithAutocomplete
2961
+ className: reactComponents.mergeClasses(
2962
+ styles.inputWithAutocomplete,
2963
+ classNameSize
2964
+ )
2926
2965
  }
2927
2966
  );
2928
2967
  case "time":
@@ -2934,7 +2973,10 @@ var InputDynamic = ({
2934
2973
  type,
2935
2974
  min,
2936
2975
  max,
2937
- className: styles.inputWithAutocomplete
2976
+ className: reactComponents.mergeClasses(
2977
+ styles.inputWithAutocomplete,
2978
+ classNameSize
2979
+ )
2938
2980
  }
2939
2981
  );
2940
2982
  case "password":
@@ -2943,7 +2985,10 @@ var InputDynamic = ({
2943
2985
  {
2944
2986
  ...commonProps,
2945
2987
  type: showPassword ? "text" : "password",
2946
- className: styles.inputWithAutocomplete,
2988
+ className: reactComponents.mergeClasses(
2989
+ styles.inputWithAutocomplete,
2990
+ classNameSize
2991
+ ),
2947
2992
  contentAfter: /* @__PURE__ */ jsxRuntime.jsx(
2948
2993
  reactComponents.Button,
2949
2994
  {
@@ -3106,7 +3151,10 @@ var InputDynamic = ({
3106
3151
  ...commonProps,
3107
3152
  type,
3108
3153
  onInput,
3109
- className: styles.inputWithAutocomplete
3154
+ className: reactComponents.mergeClasses(
3155
+ styles.inputWithAutocomplete,
3156
+ classNameSize
3157
+ )
3110
3158
  }
3111
3159
  );
3112
3160
  }
@@ -11282,14 +11330,11 @@ var CardPaymentInfo = ({
11282
11330
  {
11283
11331
  size: "large",
11284
11332
  label: /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Subtitle2, { style: { color: reactComponents.tokens.colorNeutralForeground1 }, children: mergedLabels.totalPayment }),
11285
- children: /* @__PURE__ */ jsxRuntime.jsx(
11286
- reactComponents.Input,
11287
- {
11288
- disabled: true,
11289
- value: `${mergedLabels.currencySymbol} ${totalAmount.toLocaleString(language === "id" ? "id-ID" : "en-US")}`,
11290
- className: styles.input
11291
- }
11292
- )
11333
+ children: /* @__PURE__ */ jsxRuntime.jsxs(reactComponents.Title2, { children: [
11334
+ mergedLabels.currencySymbol,
11335
+ " ",
11336
+ totalAmount.toLocaleString(language === "id" ? "id-ID" : "en-US")
11337
+ ] })
11293
11338
  }
11294
11339
  )
11295
11340
  ] }),