@egov3/system-design 1.0.29 → 1.0.31

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.
Files changed (31) hide show
  1. package/dist/cjs/components/Accordion/index.d.ts +8 -0
  2. package/dist/cjs/components/Button/index.d.ts +13 -1
  3. package/dist/cjs/components/InputField/index.d.ts +19 -0
  4. package/dist/cjs/components/RadioGroup/index.d.ts +18 -0
  5. package/dist/cjs/components/RadioToggle/index.d.ts +6 -0
  6. package/dist/cjs/components/index.d.ts +7 -2
  7. package/dist/cjs/index.d.ts +12 -1
  8. package/dist/cjs/index.js +163 -8
  9. package/dist/cjs/index.js.map +1 -1
  10. package/dist/cjs/svg/ClearIcon.d.ts +4 -0
  11. package/dist/cjs/svg/index.d.ts +2 -0
  12. package/dist/cjs/utils/ClassNamesFn.d.ts +1 -0
  13. package/dist/esm/components/Accordion/index.d.ts +8 -0
  14. package/dist/esm/components/Button/index.d.ts +13 -1
  15. package/dist/esm/components/InputField/index.d.ts +19 -0
  16. package/dist/esm/components/RadioGroup/index.d.ts +18 -0
  17. package/dist/esm/components/RadioToggle/index.d.ts +6 -0
  18. package/dist/esm/components/index.d.ts +7 -2
  19. package/dist/esm/index.d.ts +65 -4
  20. package/dist/esm/index.js +163 -6
  21. package/dist/esm/index.js.map +1 -1
  22. package/dist/esm/svg/ClearIcon.d.ts +4 -0
  23. package/dist/esm/svg/index.d.ts +2 -0
  24. package/dist/esm/utils/ClassNamesFn.d.ts +1 -0
  25. package/package.json +1 -1
  26. package/dist/cjs/components/Button/Button.d.ts +0 -6
  27. package/dist/cjs/components/Button/Button.stories.d.ts +0 -6
  28. package/dist/cjs/components/Button/Button.test.d.ts +0 -1
  29. package/dist/esm/components/Button/Button.d.ts +0 -6
  30. package/dist/esm/components/Button/Button.stories.d.ts +0 -6
  31. package/dist/esm/components/Button/Button.test.d.ts +0 -1
@@ -0,0 +1,4 @@
1
+ import React from "react";
2
+ export declare const ClearIcon: ({ fill, pathFill, width, height, ...props }: React.SVGProps<SVGSVGElement> & {
3
+ pathFill?: string | undefined;
4
+ }) => React.JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { ClearIcon } from "./ClearIcon";
2
+ export { ClearIcon };
@@ -0,0 +1 @@
1
+ export declare const ClassNamesFn: (...args: unknown[]) => string;
@@ -0,0 +1,8 @@
1
+ import React, { Dispatch } from "react";
2
+ export interface IAccordionProps {
3
+ open: boolean;
4
+ setOpen: Dispatch<React.SetStateAction<boolean>>;
5
+ children: React.ReactNode;
6
+ title: React.JSX.Element;
7
+ }
8
+ export declare const Accordion: ({ open, setOpen, children, title, }: IAccordionProps) => React.JSX.Element;
@@ -1 +1,13 @@
1
- export { Button } from "./Button";
1
+ import React from 'react';
2
+ export interface IButtonProps {
3
+ ariaLabel?: string;
4
+ onClick?: () => void;
5
+ children: React.ReactNode;
6
+ className?: string;
7
+ isRounded?: boolean;
8
+ disabled?: boolean;
9
+ variant?: 'default' | 'tinted' | 'secondary';
10
+ size?: 'mini' | 'small' | 'medium' | 'large';
11
+ style?: React.CSSProperties;
12
+ }
13
+ export declare const Button: ({ onClick, children, style, className, isRounded, disabled, variant, size, ariaLabel, }: IButtonProps) => React.JSX.Element;
@@ -0,0 +1,19 @@
1
+ import React, { HTMLInputTypeAttribute } from "react";
2
+ export type TOtpType = "OTP" | "TEXT";
3
+ export interface IInputFieldProps {
4
+ onFocus?: () => void;
5
+ onBlur?: () => void;
6
+ onEnterPress?: (event: React.KeyboardEvent<HTMLInputElement>) => void;
7
+ onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
8
+ value?: string;
9
+ placeholder?: string;
10
+ className?: string;
11
+ style?: React.CSSProperties;
12
+ isClearable?: boolean;
13
+ inputLeftIcon?: JSX.Element;
14
+ type?: HTMLInputTypeAttribute;
15
+ id: string;
16
+ labelText?: string;
17
+ ariaLabel: string;
18
+ }
19
+ export declare const InputField: ({ onFocus, onBlur, onChange, onEnterPress, value, inputLeftIcon, placeholder, className, style, isClearable, type, id, labelText, ariaLabel, }: IInputFieldProps) => React.ReactNode;
@@ -0,0 +1,18 @@
1
+ import React from "react";
2
+ export interface RadioGroupItem {
3
+ label: string;
4
+ value: string;
5
+ }
6
+ export interface ICustomRadioButtonProps {
7
+ label: string;
8
+ name: string;
9
+ checked: boolean;
10
+ onChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
11
+ value: string;
12
+ }
13
+ export interface IRadioGroupProps {
14
+ RadioGroupItems: RadioGroupItem[];
15
+ invokeCustomOnChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
16
+ }
17
+ export declare const CustomRadioButton: ({ label, name, checked, onChange, value, }: ICustomRadioButtonProps) => React.JSX.Element;
18
+ export declare const RadioGroup: ({ RadioGroupItems, invokeCustomOnChange, }: IRadioGroupProps) => React.JSX.Element;
@@ -0,0 +1,6 @@
1
+ import React, { Dispatch, SetStateAction } from "react";
2
+ export interface IRadioToggleProps {
3
+ lock: boolean;
4
+ setLock: Dispatch<SetStateAction<boolean>>;
5
+ }
6
+ export declare const RadioToggle: ({ lock, setLock }: IRadioToggleProps) => React.JSX.Element;
@@ -1,4 +1,9 @@
1
1
  /// <reference types="react" />
2
- export declare const components: {
3
- Button: (props: import("./Button/Button").ButtonProps) => import("react").JSX.Element;
2
+ export declare const Сomponents: {
3
+ Button: ({ onClick, children, style, className, isRounded, disabled, variant, size, ariaLabel, }: import("./Button").IButtonProps) => import("react").JSX.Element;
4
+ InputField: ({ onFocus, onBlur, onChange, onEnterPress, value, inputLeftIcon, placeholder, className, style, isClearable, type, id, labelText, ariaLabel, }: import("./InputField").IInputFieldProps) => import("react").ReactNode;
5
+ RadioGroup: ({ RadioGroupItems, invokeCustomOnChange, }: import("./RadioGroup").IRadioGroupProps) => import("react").JSX.Element;
6
+ CustomRadioButton: ({ label, name, checked, onChange, value, }: import("./RadioGroup").ICustomRadioButtonProps) => import("react").JSX.Element;
7
+ Accordion: ({ open, setOpen, children, title, }: import("./Accordion").IAccordionProps) => import("react").JSX.Element;
8
+ RadioToggle: ({ lock, setLock }: import("./RadioToggle").IRadioToggleProps) => import("react").JSX.Element;
4
9
  };
@@ -1,12 +1,73 @@
1
1
  /// <reference types="react" />
2
2
  import * as React from 'react';
3
+ import React__default, { Dispatch, SetStateAction, HTMLInputTypeAttribute } from 'react';
3
4
 
4
- interface ButtonProps {
5
+ interface IRadioToggleProps {
6
+ lock: boolean;
7
+ setLock: Dispatch<SetStateAction<boolean>>;
8
+ }
9
+
10
+ interface IAccordionProps {
11
+ open: boolean;
12
+ setOpen: Dispatch<React__default.SetStateAction<boolean>>;
13
+ children: React__default.ReactNode;
14
+ title: React__default.JSX.Element;
15
+ }
16
+
17
+ interface RadioGroupItem {
18
+ label: string;
19
+ value: string;
20
+ }
21
+ interface ICustomRadioButtonProps {
5
22
  label: string;
23
+ name: string;
24
+ checked: boolean;
25
+ onChange: (event: React__default.ChangeEvent<HTMLInputElement>) => void;
26
+ value: string;
27
+ }
28
+ interface IRadioGroupProps {
29
+ RadioGroupItems: RadioGroupItem[];
30
+ invokeCustomOnChange: (event: React__default.ChangeEvent<HTMLInputElement>) => void;
31
+ }
32
+
33
+ interface IInputFieldProps {
34
+ onFocus?: () => void;
35
+ onBlur?: () => void;
36
+ onEnterPress?: (event: React__default.KeyboardEvent<HTMLInputElement>) => void;
37
+ onChange?: (event: React__default.ChangeEvent<HTMLInputElement>) => void;
38
+ value?: string;
39
+ placeholder?: string;
40
+ className?: string;
41
+ style?: React__default.CSSProperties;
42
+ isClearable?: boolean;
43
+ inputLeftIcon?: JSX.Element;
44
+ type?: HTMLInputTypeAttribute;
45
+ id: string;
46
+ labelText?: string;
47
+ ariaLabel: string;
48
+ }
49
+
50
+ interface IButtonProps {
51
+ ariaLabel?: string;
52
+ onClick?: () => void;
53
+ children: React__default.ReactNode;
54
+ className?: string;
55
+ isRounded?: boolean;
56
+ disabled?: boolean;
57
+ variant?: 'default' | 'tinted' | 'secondary';
58
+ size?: 'mini' | 'small' | 'medium' | 'large';
59
+ style?: React__default.CSSProperties;
6
60
  }
7
61
 
8
- declare const components: {
9
- Button: (props: ButtonProps) => React.JSX.Element;
62
+ declare const SystemDesign: {
63
+ Сomponents: {
64
+ Button: ({ onClick, children, style, className, isRounded, disabled, variant, size, ariaLabel, }: IButtonProps) => React.JSX.Element;
65
+ InputField: ({ onFocus, onBlur, onChange, onEnterPress, value, inputLeftIcon, placeholder, className, style, isClearable, type, id, labelText, ariaLabel, }: IInputFieldProps) => React.ReactNode;
66
+ RadioGroup: ({ RadioGroupItems, invokeCustomOnChange, }: IRadioGroupProps) => React.JSX.Element;
67
+ CustomRadioButton: ({ label, name, checked, onChange, value, }: ICustomRadioButtonProps) => React.JSX.Element;
68
+ Accordion: ({ open, setOpen, children, title, }: IAccordionProps) => React.JSX.Element;
69
+ RadioToggle: ({ lock, setLock }: IRadioToggleProps) => React.JSX.Element;
70
+ };
10
71
  };
11
72
 
12
- export { components };
73
+ export { SystemDesign as default };
package/dist/esm/index.js CHANGED
@@ -2779,6 +2779,14 @@ if (process.env.NODE_ENV === 'production') {
2779
2779
 
2780
2780
  var React = react.exports;
2781
2781
 
2782
+ var ClassNamesFn = function () {
2783
+ var args = [];
2784
+ for (var _i = 0; _i < arguments.length; _i++) {
2785
+ args[_i] = arguments[_i];
2786
+ }
2787
+ return args.filter(function (item) { return !!item; }).join(" ");
2788
+ };
2789
+
2782
2790
  function styleInject(css, ref) {
2783
2791
  if ( ref === void 0 ) ref = {};
2784
2792
  var insertAt = ref.insertAt;
@@ -2806,16 +2814,165 @@ function styleInject(css, ref) {
2806
2814
  }
2807
2815
  }
2808
2816
 
2809
- var css_248z = "button {\n font-size: 60px;\n}";
2817
+ var css_248z$4 = "/* Headings/Heading 1 */\n/* Headings/Heading 3 */\n/* Subtitles/Subtitle 3 */\n/* Body/Body 1, Medium */\n/* Body/Body 1, Regular */\n/* Body/Body 2, Medium */\n/* Body/Body 2, Regular */\n/* Body/Body 3, Regular */\n/* Caption/Caption 1, Medium */\n/* Caption/Caption 1, Regular */\n/* Caption/Caption 1, Semibold */\n/* Caption/Caption 2, Medium */\n/* Caption/Caption 2, Regular */\n.Accordion-module_accordionBtn__LQdRX {\n padding: 12px 16px;\n border-radius: inherit;\n width: 100%;\n text-align: left;\n display: flex;\n justify-content: space-between;\n cursor: pointer;\n}\n\n.Accordion-module_accordionContent__sarnp {\n max-height: 1000px;\n overflow: hidden;\n transition: all 0.3s ease-in-out;\n}\n\n.Accordion-module_accordionContent--hidden__6kNQ2 {\n max-height: 0;\n}";
2818
+ var styles$4 = {"accordionBtn":"Accordion-module_accordionBtn__LQdRX","accordionContent":"Accordion-module_accordionContent__sarnp","accordionContent--hidden":"Accordion-module_accordionContent--hidden__6kNQ2"};
2819
+ styleInject(css_248z$4);
2820
+
2821
+ var Accordion = function (_a) {
2822
+ var open = _a.open, setOpen = _a.setOpen, children = _a.children, title = _a.title;
2823
+ return (React.createElement(React.Fragment, null,
2824
+ React.createElement("button", { "data-testid": "Accordion_BUTTON", className: styles$4.accordionBtn, onClick: function () {
2825
+ setOpen(!open);
2826
+ } },
2827
+ title,
2828
+ React.createElement("svg", { "data-testid": "Accordion_DIRECTION", xmlns: "http://www.w3.org/2000/svg", width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", style: {
2829
+ transform: !open ? "rotate(0.5turn)" : "none",
2830
+ } },
2831
+ React.createElement("path", { d: "M15.8346 7.5L10.0013 13.3333L4.16797 7.5", stroke: "#758393" }))),
2832
+ React.createElement("div", { "data-testid": "Accordion_CONTENT", className: ClassNamesFn(styles$4.accordionContent, !open && styles$4["accordionContent--hidden"]) }, children)));
2833
+ };
2834
+
2835
+ var css_248z$3 = "/* Headings/Heading 1 */\n/* Headings/Heading 3 */\n/* Subtitles/Subtitle 3 */\n/* Body/Body 1, Medium */\n/* Body/Body 1, Regular */\n/* Body/Body 2, Medium */\n/* Body/Body 2, Regular */\n/* Body/Body 3, Regular */\n/* Caption/Caption 1, Medium */\n/* Caption/Caption 1, Regular */\n/* Caption/Caption 1, Semibold */\n/* Caption/Caption 2, Medium */\n/* Caption/Caption 2, Regular */\n.button-module_button__WDVlB {\n border: none;\n transition: background-color 0.2s ease;\n display: inline-flex;\n justify-content: center;\n align-items: center;\n cursor: pointer;\n}\n\n.button-module_btn-default__upnYC {\n color: #fff;\n background-color: #0581da;\n}\n\n.button-module_btn-default--disabled__tlBX8 {\n color: #929daa;\n background-color: #c5ccd3;\n}\n\n.button-module_btn-tinted__hE7vU {\n color: #0581da;\n background-color: #e1f0fb;\n}\n\n.button-module_btn-tinted--disabled__KYbnK {\n color: #9bcdf0;\n background-color: #e1f0fb;\n}\n\n.button-module_btn-secondary__C8isQ {\n color: #000;\n background-color: #e3e7eb;\n}\n\n.button-module_btn-secondary--disabled__2Y-Q3 {\n color: #758393;\n background-color: #e3e7eb;\n}\n\n.button-module_btn-default__upnYC:hover {\n background-color: #1a9cfa;\n}\n\n.button-module_btn-tinted__hE7vU:hover {\n background-color: #b2d9f5;\n}\n\n.button-module_btn-secondary__C8isQ:hover {\n background-color: #c5ccd3;\n}\n\n.button-module_btn--mini__7zJ2M {\n gap: 4px;\n padding: 6px 12px;\n font-family: Inter;\n font-size: 10px;\n font-style: normal;\n font-weight: 500;\n line-height: 12px; /* 120% */\n}\n\n.button-module_btn--small__IGPOx {\n gap: 8px;\n padding: 8px 16px;\n font-family: Inter;\n font-size: 12px;\n font-style: normal;\n font-weight: 500;\n line-height: 16px; /* 133.333% */\n}\n\n.button-module_btn--medium__WaM0q {\n gap: 8px;\n padding: 8px 20px;\n font-family: Inter;\n font-size: 14px;\n font-style: normal;\n font-weight: 500;\n line-height: 20px; /* 142.857% */\n}\n\n.button-module_btn--large__qrwDc {\n gap: 8px;\n padding: 14px 24px;\n font-family: Inter;\n font-size: 16px;\n font-style: normal;\n font-weight: 500;\n line-height: 24px; /* 150% */\n}\n\n.button-module_btn-square--mini__Ak5mN {\n border-radius: 4px;\n}\n\n.button-module_btn-square--small__O58ux {\n border-radius: 6px;\n}\n\n.button-module_btn-square--medium__xNiKL {\n border-radius: 10px;\n}\n\n.button-module_btn-square--large__9JUii {\n border-radius: 12px;\n}\n\n.button-module_btn-rounded--mini__7ZTyL {\n border-radius: 32px;\n}\n\n.button-module_btn-rounded--small__KJhsk {\n border-radius: 32px;\n}\n\n.button-module_btn-rounded--medium__wT5Uc {\n border-radius: 32px;\n}\n\n.button-module_btn-rounded--large__46yFD {\n border-radius: 40px;\n}";
2836
+ var styles$3 = {"button":"button-module_button__WDVlB","btn-default":"button-module_btn-default__upnYC","btn-default--disabled":"button-module_btn-default--disabled__tlBX8","btn-tinted":"button-module_btn-tinted__hE7vU","btn-tinted--disabled":"button-module_btn-tinted--disabled__KYbnK","btn-secondary":"button-module_btn-secondary__C8isQ","btn-secondary--disabled":"button-module_btn-secondary--disabled__2Y-Q3","btn--mini":"button-module_btn--mini__7zJ2M","btn--small":"button-module_btn--small__IGPOx","btn--medium":"button-module_btn--medium__WaM0q","btn--large":"button-module_btn--large__qrwDc","btn-square--mini":"button-module_btn-square--mini__Ak5mN","btn-square--small":"button-module_btn-square--small__O58ux","btn-square--medium":"button-module_btn-square--medium__xNiKL","btn-square--large":"button-module_btn-square--large__9JUii","btn-rounded--mini":"button-module_btn-rounded--mini__7ZTyL","btn-rounded--small":"button-module_btn-rounded--small__KJhsk","btn-rounded--medium":"button-module_btn-rounded--medium__wT5Uc","btn-rounded--large":"button-module_btn-rounded--large__46yFD"};
2837
+ styleInject(css_248z$3);
2838
+
2839
+ var Button = function (_a) {
2840
+ var onClick = _a.onClick, children = _a.children, style = _a.style, _b = _a.className, className = _b === void 0 ? '' : _b, _c = _a.isRounded, isRounded = _c === void 0 ? false : _c, _d = _a.disabled, disabled = _d === void 0 ? false : _d, _e = _a.variant, variant = _e === void 0 ? 'default' : _e, _f = _a.size, size = _f === void 0 ? 'medium' : _f, _g = _a.ariaLabel, ariaLabel = _g === void 0 ? 'Кнопка' : _g;
2841
+ return (React.createElement("button", { "data-testid": "Button_MAIN", "aria-label": ariaLabel, disabled: disabled, "aria-disabled": disabled, onClick: onClick, className: ClassNamesFn(styles$3["btn--".concat(size)], isRounded
2842
+ ? styles$3["btn-rounded--".concat(size)]
2843
+ : styles$3["btn-square--".concat(size)], disabled ? styles$3["btn-".concat(variant, "--disabled")] : styles$3["btn-".concat(variant)], styles$3.button, className), style: style }, children));
2844
+ };
2845
+
2846
+ var css_248z$2 = "/* Headings/Heading 1 */\n/* Headings/Heading 3 */\n/* Subtitles/Subtitle 3 */\n/* Body/Body 1, Medium */\n/* Body/Body 1, Regular */\n/* Body/Body 2, Medium */\n/* Body/Body 2, Regular */\n/* Body/Body 3, Regular */\n/* Caption/Caption 1, Medium */\n/* Caption/Caption 1, Regular */\n/* Caption/Caption 1, Semibold */\n/* Caption/Caption 2, Medium */\n/* Caption/Caption 2, Regular */\n.InputField-module_inputContainer__J1gSu {\n display: flex;\n align-items: center;\n background-color: #f0f2f4;\n border-radius: 8px;\n padding: 12px 16px;\n}\n\n.InputField-module_inputContainerLabeled__63H-X {\n display: block;\n background-color: #f0f2f4;\n border-radius: 8px;\n padding: 12px 16px;\n}\n.InputField-module_inputContainerLabeled__63H-X label {\n color: #758393;\n}\n\n.InputField-module_input__y6Hs- {\n width: 100%;\n border: none;\n background-color: #f0f2f4;\n}\n.InputField-module_input__y6Hs-:active, .InputField-module_input__y6Hs-:focus {\n outline: none;\n}\n.InputField-module_input__y6Hs-::placeholder {\n color: #929daa;\n}\n.InputField-module_input__y6Hs-::-webkit-inner-spin-button, .InputField-module_input__y6Hs-::-webkit-outer-spin-button {\n -webkit-appearance: none;\n margin: 0;\n}\n\n.InputField-module_clearIcon__WFQKa {\n cursor: pointer;\n}\n\n.InputField-module_input--onfocus__F5PRb {\n background-color: #e3e7eb;\n}\n.InputField-module_input--onfocus__F5PRb .InputField-module_input__y6Hs- {\n background-color: #e3e7eb;\n}\n\n.InputField-module_input-text__Cg-9A {\n font-family: Inter;\n font-size: 16px;\n font-style: normal;\n font-weight: 400;\n line-height: 24px; /* 150% */\n}";
2847
+ var styles$2 = {"inputContainer":"InputField-module_inputContainer__J1gSu","inputContainerLabeled":"InputField-module_inputContainerLabeled__63H-X","input":"InputField-module_input__y6Hs-","clearIcon":"InputField-module_clearIcon__WFQKa","input--onfocus":"InputField-module_input--onfocus__F5PRb","input-text":"InputField-module_input-text__Cg-9A"};
2848
+ styleInject(css_248z$2);
2849
+
2850
+ /******************************************************************************
2851
+ Copyright (c) Microsoft Corporation.
2852
+
2853
+ Permission to use, copy, modify, and/or distribute this software for any
2854
+ purpose with or without fee is hereby granted.
2855
+
2856
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
2857
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
2858
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
2859
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
2860
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
2861
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
2862
+ PERFORMANCE OF THIS SOFTWARE.
2863
+ ***************************************************************************** */
2864
+
2865
+ var __assign = function() {
2866
+ __assign = Object.assign || function __assign(t) {
2867
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
2868
+ s = arguments[i];
2869
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
2870
+ }
2871
+ return t;
2872
+ };
2873
+ return __assign.apply(this, arguments);
2874
+ };
2875
+
2876
+ function __rest(s, e) {
2877
+ var t = {};
2878
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
2879
+ t[p] = s[p];
2880
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
2881
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
2882
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
2883
+ t[p[i]] = s[p[i]];
2884
+ }
2885
+ return t;
2886
+ }
2887
+
2888
+ typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
2889
+ var e = new Error(message);
2890
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
2891
+ };
2892
+
2893
+ var ClearIcon = function (_a) {
2894
+ var _b = _a.fill, fill = _b === void 0 ? "none" : _b, _c = _a.pathFill, pathFill = _c === void 0 ? "#fff" : _c, _d = _a.width, width = _d === void 0 ? 20 : _d, _e = _a.height, height = _e === void 0 ? 20 : _e, props = __rest(_a, ["fill", "pathFill", "width", "height"]);
2895
+ return (React.createElement("svg", __assign({ "data-testid": "Icons_CLEAR", xmlns: "http://www.w3.org/2000/svg", width: width, height: height, fill: fill, viewBox: "0 0 20 20" }, props),
2896
+ React.createElement("path", { fill: pathFill, fillRule: "evenodd", d: "M10 18.333a8.333 8.333 0 100-16.666 8.333 8.333 0 000 16.666zM7.5 6.027L6.027 7.5l2.5 2.5-2.5 2.5L7.5 13.973l2.5-2.5 2.5 2.5 1.473-1.473-2.5-2.5 2.5-2.5L12.5 6.027l-2.5 2.5-2.5-2.5z", clipRule: "evenodd" })));
2897
+ };
2898
+
2899
+ var InputField = function (_a) {
2900
+ var onFocus = _a.onFocus, onBlur = _a.onBlur, onChange = _a.onChange, onEnterPress = _a.onEnterPress, _b = _a.value, value = _b === void 0 ? "" : _b, inputLeftIcon = _a.inputLeftIcon, _c = _a.placeholder, placeholder = _c === void 0 ? "" : _c, _d = _a.className, className = _d === void 0 ? "" : _d, style = _a.style, _e = _a.isClearable, isClearable = _e === void 0 ? false : _e, _f = _a.type, type = _f === void 0 ? "text" : _f, id = _a.id, _g = _a.labelText, labelText = _g === void 0 ? "" : _g, _h = _a.ariaLabel, ariaLabel = _h === void 0 ? "" : _h;
2901
+ var _j = react.exports.useState(false), focused = _j[0], setFocused = _j[1];
2902
+ return (React.createElement("div", { "data-testid": "InputField_MAIN", className: ClassNamesFn(styles$2[labelText.length ? "inputContainerLabeled" : "inputContainer"], className, focused ? styles$2["input--onfocus"] : undefined, styles$2["input-".concat(type === null || type === void 0 ? void 0 : type.toLocaleLowerCase())]), style: style },
2903
+ labelText.length > 0 && (React.createElement("label", { htmlFor: id, "data-testid": "InputField_LABEL" }, labelText)),
2904
+ inputLeftIcon,
2905
+ React.createElement("input", { "data-testid": "InputField_INPUT", "aria-label": ariaLabel, id: id, type: type, className: styles$2.input, placeholder: placeholder, "aria-placeholder": placeholder, onFocus: function () {
2906
+ setFocused(true);
2907
+ if (onFocus) {
2908
+ onFocus();
2909
+ }
2910
+ }, onBlur: function () {
2911
+ setFocused(false);
2912
+ if (onBlur) {
2913
+ onBlur();
2914
+ }
2915
+ }, onChange: onChange, onKeyDown: function (event) {
2916
+ if (onEnterPress && event.key === "Enter") {
2917
+ onEnterPress(event);
2918
+ }
2919
+ }, value: value, readOnly: !onChange }),
2920
+ isClearable && value && (React.createElement(ClearIcon, { fill: "red", pathFill: "#758393", className: styles$2.clearIcon, onClick: function () {
2921
+ if (onChange) {
2922
+ onChange({
2923
+ target: { value: "" },
2924
+ });
2925
+ }
2926
+ } }))));
2927
+ };
2928
+
2929
+ var css_248z$1 = "/* Headings/Heading 1 */\n/* Headings/Heading 3 */\n/* Subtitles/Subtitle 3 */\n/* Body/Body 1, Medium */\n/* Body/Body 1, Regular */\n/* Body/Body 2, Medium */\n/* Body/Body 2, Regular */\n/* Body/Body 3, Regular */\n/* Caption/Caption 1, Medium */\n/* Caption/Caption 1, Regular */\n/* Caption/Caption 1, Semibold */\n/* Caption/Caption 2, Medium */\n/* Caption/Caption 2, Regular */\n.RadioGroup-module_radio__cmSnZ {\n display: flex;\n align-items: center;\n cursor: pointer;\n}\n\n.RadioGroup-module_radio__cmSnZ input {\n display: none;\n}\n\n.RadioGroup-module_radioBtn__HSuIE {\n position: relative;\n height: 15px;\n width: 15px;\n border-radius: 50%;\n border: 2px solid #c5ccd3;\n margin: 10px;\n transition: background 0.3s;\n}\n\n.RadioGroup-module_radioBtn__HSuIE::after {\n content: \"\";\n position: absolute;\n top: 50%;\n left: 50%;\n height: 10px;\n width: 10px;\n background: #0581da;\n border-radius: 50%;\n transform: scale(0) translate(-50%, -50%);\n transition: transform 0.3s;\n}\n\ninput:checked + .RadioGroup-module_radioBtn__HSuIE::after {\n transform: scale(1) translate(-50%, -50%);\n}\n\ninput:checked + .RadioGroup-module_radioBtn__HSuIE {\n border: 2px solid #0581da;\n}\n\n.RadioGroup-module_radioBtnText__Kx9T1 {\n padding-left: 10px;\n width: fit-content;\n font-family: Inter;\n font-size: 14px;\n font-style: normal;\n font-weight: 400;\n line-height: 20px; /* 142.857% */\n}";
2930
+ var styles$1 = {"radio":"RadioGroup-module_radio__cmSnZ","radioBtn":"RadioGroup-module_radioBtn__HSuIE","radioBtnText":"RadioGroup-module_radioBtnText__Kx9T1"};
2931
+ styleInject(css_248z$1);
2932
+
2933
+ var CustomRadioButton = function (_a) {
2934
+ var label = _a.label, name = _a.name, checked = _a.checked, onChange = _a.onChange, value = _a.value;
2935
+ return (React.createElement("label", { "data-testid": "RadioGroupItem_LABEL", className: styles$1.radio },
2936
+ React.createElement("input", { "data-testid": "RadioGroupItem_INPUT", value: value, type: "radio", name: name, checked: checked, onChange: onChange }),
2937
+ React.createElement("span", { "data-testid": "RadioGroupItem_RADIO", className: styles$1.radioBtn }),
2938
+ React.createElement("span", { "data-testid": "RadioGroupItem_TEXT", className: styles$1.radioBtnText }, label)));
2939
+ };
2940
+ var RadioGroup = function (_a) {
2941
+ var RadioGroupItems = _a.RadioGroupItems, invokeCustomOnChange = _a.invokeCustomOnChange;
2942
+ var _b = react.exports.useState(""), selectedOption = _b[0], setSelectedOption = _b[1];
2943
+ var handleChange = function (event) {
2944
+ setSelectedOption(event.target.value);
2945
+ invokeCustomOnChange(event);
2946
+ };
2947
+ return (React.createElement("fieldset", { "data-testid": "RadioGroup_FIELDSET" }, RadioGroupItems.map(function (item) { return (React.createElement(CustomRadioButton, { key: item.label, label: item.label, name: "radio", checked: selectedOption === item.value, onChange: handleChange, value: item.value })); })));
2948
+ };
2949
+
2950
+ var css_248z = "/* Headings/Heading 1 */\n/* Headings/Heading 3 */\n/* Subtitles/Subtitle 3 */\n/* Body/Body 1, Medium */\n/* Body/Body 1, Regular */\n/* Body/Body 2, Medium */\n/* Body/Body 2, Regular */\n/* Body/Body 3, Regular */\n/* Caption/Caption 1, Medium */\n/* Caption/Caption 1, Regular */\n/* Caption/Caption 1, Semibold */\n/* Caption/Caption 2, Medium */\n/* Caption/Caption 2, Regular */\n.RadioToggle-module_wrap__Z7gAu {\n display: flex;\n justify-content: flex-end;\n align-items: center;\n padding: 4px;\n width: 32px;\n height: 16px;\n border-radius: 40px;\n background: #c1dc19;\n}\n\n.RadioToggle-module_wrapLock__T8rZ0 {\n justify-content: flex-start;\n background: #e3e7eb;\n}\n\n.RadioToggle-module_round__Fki8X {\n width: 16px;\n height: 16px;\n background: #fff;\n border-radius: 100px;\n}";
2951
+ var styles = {"wrap":"RadioToggle-module_wrap__Z7gAu","wrapLock":"RadioToggle-module_wrapLock__T8rZ0","round":"RadioToggle-module_round__Fki8X"};
2810
2952
  styleInject(css_248z);
2811
2953
 
2812
- var Button = function (props) {
2813
- return React.createElement("button", null, props.label);
2954
+ // import { Dispatch, SetStateAction } from "react";
2955
+ var RadioToggle = function (_a) {
2956
+ var lock = _a.lock, setLock = _a.setLock;
2957
+ return (React.createElement("button", { "data-testid": "RadioToggle_BUTTON", "aria-pressed": lock, "aria-label": "\u041A\u043D\u043E\u043F\u043A\u0430 \u043F\u0435\u0440\u0435\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u044F", onClick: function () {
2958
+ setLock(!lock);
2959
+ } },
2960
+ React.createElement("div", { "data-testid": "RadioToggle_WRAP", className: ClassNamesFn(styles.wrap, lock && styles.wrapLock) },
2961
+ React.createElement("div", { "data-testid": "RadioToggle_ROUND", className: styles.round }))));
2962
+ };
2963
+
2964
+ var Сomponents = {
2965
+ Button: Button,
2966
+ InputField: InputField,
2967
+ RadioGroup: RadioGroup,
2968
+ CustomRadioButton: CustomRadioButton,
2969
+ Accordion: Accordion,
2970
+ RadioToggle: RadioToggle,
2814
2971
  };
2815
2972
 
2816
- var components = {
2817
- Button: Button
2973
+ var SystemDesign = {
2974
+ Сomponents: Сomponents
2818
2975
  };
2819
2976
 
2820
- export { components };
2977
+ export { SystemDesign as default };
2821
2978
  //# sourceMappingURL=index.js.map