@matbea-ui/matbea-ui 0.2.0-dev.185572 → 0.2.0-dev.204926

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.
@@ -167,6 +167,7 @@ const StyledButton = styled.button `
167
167
  const IconSlot = styled.span `
168
168
  display: inline-flex;
169
169
  align-items: center;
170
+ width: max-content;
170
171
  justify-content: center;
171
172
  line-height: 0;
172
173
  ${({ $iconOnly }) => $iconOnly &&
@@ -575,7 +576,10 @@ const StyledTypography = styled.styled.span `
575
576
  const Typography = ({ as = "span", forwardedAs, variant = "body-m-semibold", color, align, uppercase = false, truncate = false, inline = false, children, ...rest }) => (jsxRuntime.jsx(StyledTypography, { as: as, forwardedAs: forwardedAs, "$variant": variant, "$color": color, "$align": align, "$uppercase": uppercase, "$truncate": truncate, "$inline": inline, ...rest, children: children }));
576
577
 
577
578
  const Icon = ({ size = 24, children, ...rest }) => {
578
- return (jsxRuntime.jsx("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...rest, children: children }));
579
+ return (jsxRuntime.jsx("svg", { style: {
580
+ width: size,
581
+ height: size,
582
+ }, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...rest, children: children }));
579
583
  };
580
584
 
581
585
  const LogoAbankIcon = (props) => (jsxRuntime.jsxs(Icon, { ...props, children: [jsxRuntime.jsxs("g", { "clip-path": "url(#clip0_348_2416)", children: [jsxRuntime.jsx("circle", { cx: "12", cy: "12", r: "12", fill: "#F5F5F5" }), jsxRuntime.jsx("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M11.2589 7.98674C7.53128 8.31962 6.81257 6.30884 6.3125 3.00224C10.4015 2.97341 12.2754 3.18291 12.1754 5.99132C12.1172 6.06513 12.0622 6.1397 12.0098 6.2162C11.4594 5.19946 10.2518 4.30843 7.75728 3.83024C9.57266 4.44681 10.9399 5.69495 11.3993 7.37362C11.3396 7.57351 11.2938 7.77724 11.2589 7.98674ZM11.6388 9.04691C11.7904 7.71881 12.2529 6.60021 13.4042 5.75569C13.9803 5.33323 14.7726 5.87101 13.9469 6.35919C12.9495 6.94771 11.9955 8.32385 11.8459 9.03922C11.7783 9.05701 11.7076 9.05963 11.6388 9.04691Z", fill: "#007F2D" }), jsxRuntime.jsx("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M11.1018 9.30787C11.3545 9.34554 11.565 9.36169 11.7693 9.35131C11.9775 9.33977 12.1888 9.30057 12.4427 9.2283C13.9274 8.80469 15.8889 9.07146 17.153 9.96942C18.7727 11.1192 19.2064 13.078 18.9161 15.0273C18.5672 17.3706 16.2785 21.9634 13.3339 20.8202C12.9703 20.6795 12.6144 20.5638 12.2178 20.5773C11.803 20.5911 11.6383 20.7249 11.0328 20.8717C7.71099 21.6751 5.31607 17.1969 5.0389 14.5514C4.86058 12.8447 5.28079 11.1964 6.6023 10.1797C7.7513 9.2948 9.69848 8.96729 11.1018 9.30787Z", fill: "#65B32E" })] }), jsxRuntime.jsx("defs", { children: jsxRuntime.jsx("clipPath", { id: "clip0_348_2416", children: jsxRuntime.jsx("rect", { width: "24", height: "24", fill: "white" }) }) })] }));
@@ -928,14 +932,13 @@ const Informer = ({ label, description, type, icon, }) => {
928
932
  const Wrapper$1 = styled.styled.div `
929
933
  display: flex;
930
934
  flex-direction: column;
931
- gap: 4px;
935
+ gap: 12px;
932
936
  width: 100%;
933
937
  `;
934
938
  const Label$2 = styled.styled(Typography).attrs({
935
- variant: "form-input",
936
939
  forwardedAs: "label",
937
940
  }) `
938
- color: ${({ theme }) => theme.colors.primary.darkBlue};
941
+ color: ${({ theme, $color }) => $color || theme.colors.primary.darkBlue};
939
942
  `;
940
943
  const FieldContainer$1 = styled.styled.div `
941
944
  display: flex;
@@ -1008,7 +1011,7 @@ const ErrorText$1 = styled.styled.span `
1008
1011
  color: ${({ theme }) => theme.colors.accent.red};
1009
1012
  `;
1010
1013
 
1011
- const TextField = react.forwardRef(({ value, defaultValue, placeholder = "Text", label, error, disabled = false, icon, action, name, type = "text", onChange, onFocus, onBlur, className, }, ref) => {
1014
+ const TextField = react.forwardRef(({ value, defaultValue, placeholder = "Text", label, error, disabled = false, icon, action, name, type = "text", onChange, onFocus, onBlur, className, labelVariant, labelColor, }, ref) => {
1012
1015
  const [focused, setFocused] = react.useState(false);
1013
1016
  const hasError = Boolean(error);
1014
1017
  const handleFocus = (evt) => {
@@ -1019,7 +1022,7 @@ const TextField = react.forwardRef(({ value, defaultValue, placeholder = "Text",
1019
1022
  setFocused(false);
1020
1023
  onBlur?.(evt);
1021
1024
  };
1022
- return (jsxRuntime.jsxs(Wrapper$1, { className: className, children: [label && jsxRuntime.jsx(Label$2, { children: label }), jsxRuntime.jsxs(FieldContainer$1, { "$hasError": hasError, "$disabled": disabled, "data-state": hasError ? "error" : focused ? "active" : undefined, children: [icon && jsxRuntime.jsx(LeadingIcon$1, { children: icon }), jsxRuntime.jsx(Input, { ref: ref, type: type, name: name, value: value, defaultValue: defaultValue, placeholder: placeholder, disabled: disabled, onChange: onChange, onFocus: handleFocus, onBlur: handleBlur }), action && jsxRuntime.jsx(ActionSlot, { children: action })] }), error && jsxRuntime.jsx(ErrorText$1, { children: error })] }));
1025
+ return (jsxRuntime.jsxs(Wrapper$1, { className: className, children: [label && (jsxRuntime.jsx(Label$2, { variant: labelVariant || "form-input", "$color": labelColor, children: label })), jsxRuntime.jsxs(FieldContainer$1, { "$hasError": hasError, "$disabled": disabled, "data-state": hasError ? "error" : focused ? "active" : undefined, children: [icon && jsxRuntime.jsx(LeadingIcon$1, { children: icon }), jsxRuntime.jsx(Input, { ref: ref, type: type, name: name, value: value, defaultValue: defaultValue, placeholder: placeholder, disabled: disabled, onChange: onChange, onFocus: handleFocus, onBlur: handleBlur }), action && jsxRuntime.jsx(ActionSlot, { children: action })] }), error && jsxRuntime.jsx(ErrorText$1, { children: error })] }));
1023
1026
  });
1024
1027
  TextField.displayName = "TextField";
1025
1028
 
@@ -2698,46 +2701,197 @@ const StyledProvider = ({ children }) => {
2698
2701
  return (jsxRuntime.jsx(styled.StyleSheetManager, { stylisPlugins: [adaptiveScalePlugin], children: children }));
2699
2702
  };
2700
2703
 
2701
- const breakpoints = {
2702
- mobile: { max: 576, scale: 0.7 },
2703
- tablet: { min: 576, max: 1024, scale: 0.85 },
2704
- desktop: { min: 1024, max: 1920, scale: 1 },
2705
- wide: { min: 1920, scale: 1.15 },
2706
- };
2707
2704
  const GlobalStyles = styled.createGlobalStyle `
2708
2705
  :root {
2709
2706
  --adaptive-scale: 1;
2710
2707
  --adaptive-vh: 1vh;
2711
2708
  }
2712
2709
 
2713
- /* Mobile */
2714
- @media (max-width: ${breakpoints.mobile.max}px) {
2710
+ /* ============ MOBILE ============ */
2711
+
2712
+ /* Ultra small (iPhone SE 1st gen, старые Android) */
2713
+ @media (max-width: 320px) {
2714
+ :root {
2715
+ --adaptive-scale: 0.75;
2716
+ }
2717
+ }
2718
+
2719
+ /* Small mobile */
2720
+ @media (min-width: 321px) and (max-width: 359px) {
2721
+ :root {
2722
+ --adaptive-scale: 0.82;
2723
+ }
2724
+ }
2725
+
2726
+ /* Medium mobile */
2727
+ @media (min-width: 360px) and (max-width: 374px) {
2715
2728
  :root {
2716
- --adaptive-scale: ${breakpoints.mobile.scale};
2729
+ --adaptive-scale: 0.9;
2717
2730
  }
2718
2731
  }
2719
2732
 
2720
- /* Tablet */
2721
- @media (min-width: ${breakpoints.tablet.min}px) and (max-width: ${breakpoints.tablet.max}px) {
2733
+ /* Mobile base (iPhone X/11/12/13 mini) */
2734
+ @media (min-width: 375px) and (max-width: 389px) {
2722
2735
  :root {
2723
- --adaptive-scale: ${breakpoints.tablet.scale};
2736
+ --adaptive-scale: 1;
2724
2737
  }
2725
2738
  }
2726
2739
 
2727
- /* Desktop */
2728
- @media (min-width: ${breakpoints.desktop.min}px) and (max-width: ${breakpoints.desktop.max}px) {
2740
+ /* Large mobile (iPhone 12/13/14/15) */
2741
+ @media (min-width: 390px) and (max-width: 429px) {
2729
2742
  :root {
2730
- --adaptive-scale: ${breakpoints.desktop.scale};
2743
+ --adaptive-scale: 1;
2731
2744
  }
2732
2745
  }
2733
2746
 
2734
- /* Wide */
2735
- @media (min-width: ${breakpoints.wide.min}px) {
2747
+ /* Extra large mobile (iPhone 14 Plus/Max) */
2748
+ @media (min-width: 430px) and (max-width: 576px) {
2736
2749
  :root {
2737
- --adaptive-scale: ${breakpoints.wide.scale};
2750
+ --adaptive-scale: 1;
2738
2751
  }
2739
2752
  }
2740
2753
 
2754
+ /* ============ TABLET ============ */
2755
+
2756
+ /* Small tablet / Large phone landscape */
2757
+ @media (min-width: 577px) and (max-width: 639px) {
2758
+ :root {
2759
+ --adaptive-scale: 0.75;
2760
+ }
2761
+ }
2762
+
2763
+ /* Medium small tablet */
2764
+ @media (min-width: 640px) and (max-width: 719px) {
2765
+ :root {
2766
+ --adaptive-scale: 0.83;
2767
+ }
2768
+ }
2769
+
2770
+ /* Medium tablet */
2771
+ @media (min-width: 720px) and (max-width: 767px) {
2772
+ :root {
2773
+ --adaptive-scale: 0.9;
2774
+ }
2775
+ }
2776
+
2777
+ /* Tablet base (iPad Mini/Air portrait) */
2778
+ @media (min-width: 768px) and (max-width: 833px) {
2779
+ :root {
2780
+ --adaptive-scale: 1;
2781
+ }
2782
+ }
2783
+
2784
+ /* Large tablet (iPad Pro 11" portrait) */
2785
+ @media (min-width: 834px) and (max-width: 899px) {
2786
+ :root {
2787
+ --adaptive-scale: 1;
2788
+ }
2789
+ }
2790
+
2791
+ /* Extra large tablet */
2792
+ @media (min-width: 900px) and (max-width: 1023px) {
2793
+ :root {
2794
+ --adaptive-scale: 1;
2795
+ }
2796
+ }
2797
+
2798
+ /* Tablet landscape (iPad Pro landscape) */
2799
+ @media (min-width: 1024px) and (max-width: 1100px) {
2800
+ :root {
2801
+ --adaptive-scale: 0.71;
2802
+ }
2803
+ }
2804
+
2805
+ /* ============ DESKTOP ============ */
2806
+
2807
+ /* Small desktop / Laptop 13" */
2808
+ @media (min-width: 1101px) and (max-width: 1279px) {
2809
+ :root {
2810
+ --adaptive-scale: 0.77;
2811
+ }
2812
+ }
2813
+
2814
+ /* Medium desktop / Laptop 14" */
2815
+ @media (min-width: 1280px) and (max-width: 1365px) {
2816
+ :root {
2817
+ --adaptive-scale: 0.85;
2818
+ }
2819
+ }
2820
+
2821
+ /* Large laptop 15" */
2822
+ @media (min-width: 1366px) and (max-width: 1439px) {
2823
+ :root {
2824
+ --adaptive-scale: 0.92;
2825
+ }
2826
+ }
2827
+
2828
+ /* Desktop base (MacBook Pro 16", gaming monitors) */
2829
+ @media (min-width: 1440px) and (max-width: 1599px) {
2830
+ :root {
2831
+ --adaptive-scale: 1;
2832
+ }
2833
+ }
2834
+
2835
+ /* Large desktop */
2836
+ @media (min-width: 1600px) and (max-width: 1799px) {
2837
+ :root {
2838
+ --adaptive-scale: 1;
2839
+ }
2840
+ }
2841
+
2842
+ /* Extra large desktop */
2843
+ @media (min-width: 1800px) and (max-width: 1919px) {
2844
+ :root {
2845
+ --adaptive-scale: 1;
2846
+ }
2847
+ }
2848
+
2849
+ /* ============ WIDE (с увеличением) ============ */
2850
+
2851
+ /* Full HD base (1920x1080) */
2852
+ @media (min-width: 1920px) and (max-width: 2047px) {
2853
+ :root {
2854
+ --adaptive-scale: 1;
2855
+ }
2856
+ }
2857
+
2858
+ /* 2K */
2859
+ @media (min-width: 2048px) and (max-width: 2559px) {
2860
+ :root {
2861
+ --adaptive-scale: 1.1;
2862
+ }
2863
+ }
2864
+
2865
+ /* QHD / 2.5K */
2866
+ @media (min-width: 2560px) and (max-width: 3199px) {
2867
+ :root {
2868
+ --adaptive-scale: 1.25;
2869
+ }
2870
+ }
2871
+
2872
+ /* 3K */
2873
+ @media (min-width: 3200px) and (max-width: 3839px) {
2874
+ :root {
2875
+ --adaptive-scale: 1.4;
2876
+ }
2877
+ }
2878
+
2879
+ /* 4K (3840x2160) */
2880
+ @media (min-width: 3840px) and (max-width: 5119px) {
2881
+ :root {
2882
+ --adaptive-scale: 1.6;
2883
+ }
2884
+ }
2885
+
2886
+ /* 5K и выше */
2887
+ @media (min-width: 5120px) {
2888
+ :root {
2889
+ --adaptive-scale: 2;
2890
+ }
2891
+ }
2892
+
2893
+ /* ============ ДОПОЛНИТЕЛЬНО ============ */
2894
+
2741
2895
  /* Фикс для мобильных браузеров (100vh с учетом адресной строки) */
2742
2896
  @supports (-webkit-touch-callout: none) {
2743
2897
  :root {
@@ -2946,7 +3100,6 @@ exports.ZcashSmallIcon = ZcashSmallIcon;
2946
3100
  exports.ZilliqaIcon = ZilliqaIcon;
2947
3101
  exports.ZrxIcon = ZrxIcon;
2948
3102
  exports.adaptiveScalePlugin = adaptiveScalePlugin;
2949
- exports.breakpoints = breakpoints;
2950
3103
  exports.copyToClipboard = copyToClipboard;
2951
3104
  exports.createAdaptiveScalePlugin = createAdaptiveScalePlugin;
2952
3105
  exports.formatCardNumber = formatCardNumber;