@de-kit/st-ui 0.1.13 → 0.1.14

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 (46) hide show
  1. package/dist/components/birthday-picker/birthday-picker.cjs +245 -0
  2. package/dist/components/birthday-picker/birthday-picker.cjs.map +1 -0
  3. package/dist/components/birthday-picker/birthday-picker.d.cts +24 -0
  4. package/dist/components/birthday-picker/birthday-picker.d.ts +24 -0
  5. package/dist/components/birthday-picker/birthday-picker.js +245 -0
  6. package/dist/components/birthday-picker/birthday-picker.js.map +1 -0
  7. package/dist/components/birthday-picker/birthday-picker.scss +84 -0
  8. package/dist/components/birthday-picker/index.d.cts +2 -0
  9. package/dist/components/birthday-picker/index.d.ts +2 -0
  10. package/dist/components/birthday-picker/wheel-column.cjs +114 -0
  11. package/dist/components/birthday-picker/wheel-column.cjs.map +1 -0
  12. package/dist/components/birthday-picker/wheel-column.js +114 -0
  13. package/dist/components/birthday-picker/wheel-column.js.map +1 -0
  14. package/dist/components/birthday-picker/wheel-column.scss +61 -0
  15. package/dist/components/form/form.cjs +124 -0
  16. package/dist/components/form/form.cjs.map +1 -0
  17. package/dist/components/form/form.d.cts +31 -0
  18. package/dist/components/form/form.d.ts +31 -0
  19. package/dist/components/form/form.js +121 -0
  20. package/dist/components/form/form.js.map +1 -0
  21. package/dist/components/form/form.scss +29 -0
  22. package/dist/components/form/index.d.cts +2 -0
  23. package/dist/components/form/index.d.ts +2 -0
  24. package/dist/components/phone-input/index.d.cts +2 -0
  25. package/dist/components/phone-input/index.d.ts +2 -0
  26. package/dist/components/phone-input/phone-input.cjs +105 -0
  27. package/dist/components/phone-input/phone-input.cjs.map +1 -0
  28. package/dist/components/phone-input/phone-input.d.cts +29 -0
  29. package/dist/components/phone-input/phone-input.d.ts +29 -0
  30. package/dist/components/phone-input/phone-input.js +103 -0
  31. package/dist/components/phone-input/phone-input.js.map +1 -0
  32. package/dist/icons/icon-label-ozon.cjs +4 -4
  33. package/dist/icons/icon-label-ozon.cjs.map +1 -1
  34. package/dist/icons/icon-label-ozon.js +4 -4
  35. package/dist/icons/icon-label-ozon.js.map +1 -1
  36. package/dist/icons/icon-label-yandex.cjs +1 -1
  37. package/dist/icons/icon-label-yandex.cjs.map +1 -1
  38. package/dist/icons/icon-label-yandex.js +1 -1
  39. package/dist/icons/icon-label-yandex.js.map +1 -1
  40. package/dist/icons/index.cjs +2 -2
  41. package/dist/icons/index.js +2 -2
  42. package/dist/index.cjs +10 -0
  43. package/dist/index.d.cts +7 -1
  44. package/dist/index.d.ts +7 -1
  45. package/dist/index.js +4 -1
  46. package/package.json +8 -5
@@ -0,0 +1,121 @@
1
+ import { cn } from "../../lib/cn.js";
2
+ import { Button } from "../button/button.js";
3
+ import { createContext, forwardRef, useCallback, useContext, useEffect, useRef, useState } from "react";
4
+ import { jsx, jsxs } from "react/jsx-runtime";
5
+ import "./form.scss";
6
+ // src/components/form/form.tsx
7
+ const FormPendingContext = createContext(false);
8
+ const useFormPending = () => useContext(FormPendingContext);
9
+ const isThenable = (value) => (typeof value === "object" || typeof value === "function") && value !== null && "then" in value && typeof value.then === "function";
10
+ const toMessage = (reason) => {
11
+ if (typeof reason === "string" && reason.trim()) return reason;
12
+ if (typeof reason === "object" && reason !== null && "message" in reason && typeof reason.message === "string" && reason.message.trim()) return reason.message;
13
+ return "Не получилось отправить. Попробуйте ещё раз";
14
+ };
15
+ const Form = forwardRef(function Form({ children, className, error, onSubmit, pending = false, ...props }, ref) {
16
+ const [busy, setBusy] = useState(false);
17
+ const [failure, setFailure] = useState(null);
18
+ const formNode = useRef(null);
19
+ const busyRef = useRef(false);
20
+ const requestId = useRef(0);
21
+ const live = useRef(true);
22
+ const submitting = pending || busy;
23
+ const shownError = error ?? failure;
24
+ useEffect(() => {
25
+ live.current = true;
26
+ return () => {
27
+ live.current = false;
28
+ };
29
+ }, []);
30
+ useEffect(() => {
31
+ const node = formNode.current;
32
+ if (!node) return;
33
+ let firstInvalid = null;
34
+ const handleInvalid = (event) => {
35
+ const target = event.target;
36
+ if (!(target instanceof HTMLElement) || !target.closest(".field")) return;
37
+ event.preventDefault();
38
+ if (firstInvalid) return;
39
+ firstInvalid = target;
40
+ queueMicrotask(() => {
41
+ firstInvalid?.focus();
42
+ firstInvalid = null;
43
+ });
44
+ };
45
+ node.addEventListener("invalid", handleInvalid, true);
46
+ return () => node.removeEventListener("invalid", handleInvalid, true);
47
+ }, []);
48
+ const setNode = useCallback((node) => {
49
+ formNode.current = node;
50
+ if (typeof ref === "function") {
51
+ ref(node);
52
+ return;
53
+ }
54
+ if (ref) ref.current = node;
55
+ }, [ref]);
56
+ const handleSubmit = (event) => {
57
+ if (!onSubmit) return;
58
+ event.preventDefault();
59
+ if (busyRef.current || pending) return;
60
+ const data = new FormData(event.currentTarget);
61
+ setFailure(null);
62
+ let result;
63
+ try {
64
+ result = onSubmit(data, event);
65
+ } catch (reason) {
66
+ setFailure(toMessage(reason));
67
+ return;
68
+ }
69
+ if (!isThenable(result)) return;
70
+ const id = ++requestId.current;
71
+ busyRef.current = true;
72
+ setBusy(true);
73
+ const finish = () => {
74
+ if (!live.current || requestId.current !== id) return;
75
+ busyRef.current = false;
76
+ setBusy(false);
77
+ };
78
+ Promise.resolve(result).then(() => {
79
+ finish();
80
+ }, (reason) => {
81
+ finish();
82
+ if (!live.current || requestId.current !== id) return;
83
+ setFailure(toMessage(reason));
84
+ });
85
+ };
86
+ return /* @__PURE__ */ jsx("form", {
87
+ ...props,
88
+ ref: setNode,
89
+ className: cn("form", className),
90
+ onSubmit: handleSubmit,
91
+ "aria-busy": submitting || void 0,
92
+ children: /* @__PURE__ */ jsxs(FormPendingContext.Provider, {
93
+ value: submitting,
94
+ children: [children, shownError ? /* @__PURE__ */ jsx("p", {
95
+ className: "form__error",
96
+ role: "alert",
97
+ children: shownError
98
+ }) : null]
99
+ })
100
+ });
101
+ });
102
+ const FormActions = ({ children, className }) => /* @__PURE__ */ jsx("div", {
103
+ className: cn("form__buttons", className),
104
+ children
105
+ });
106
+ const FormConsent = ({ children, className }) => /* @__PURE__ */ jsx("div", {
107
+ className: cn("form__consent", className),
108
+ children
109
+ });
110
+ const FormSubmit = ({ loading = false, children, ...props }) => {
111
+ const pending = useFormPending();
112
+ return /* @__PURE__ */ jsx(Button, {
113
+ ...props,
114
+ type: "submit",
115
+ loading: loading || pending,
116
+ children
117
+ });
118
+ };
119
+ export { Form, FormActions, FormConsent, FormSubmit };
120
+
121
+ //# sourceMappingURL=form.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"form.js","names":[],"sources":["../../../src/components/form/form.tsx"],"sourcesContent":["import {\n createContext,\n forwardRef,\n useCallback,\n useContext,\n useEffect,\n useRef,\n useState,\n type FormEvent,\n type FormHTMLAttributes,\n type ForwardedRef,\n type ReactNode,\n} from 'react';\n\nimport { Button, type ButtonProps } from '@/components/button';\nimport { cn } from '@/lib/cn';\nimport './form.scss';\n\nconst FormPendingContext = createContext(false);\n\nconst useFormPending = () => useContext(FormPendingContext);\n\nconst isThenable = (value: unknown): value is PromiseLike<void> =>\n (typeof value === 'object' || typeof value === 'function') &&\n value !== null &&\n 'then' in value &&\n typeof value.then === 'function';\n\nconst toMessage = (reason: unknown) => {\n if (typeof reason === 'string' && reason.trim()) return reason;\n // Error и объекты вида `{ message }` из API-клиентов.\n if (\n typeof reason === 'object' &&\n reason !== null &&\n 'message' in reason &&\n typeof reason.message === 'string' &&\n reason.message.trim()\n ) {\n return reason.message;\n }\n return 'Не получилось отправить. Попробуйте ещё раз';\n};\n\nexport interface FormProps extends Omit<\n FormHTMLAttributes<HTMLFormElement>,\n 'onSubmit'\n> {\n /**\n * Вызывается после нативной проверки. `FormData` — по `name` контролов.\n * Промис держит кнопку, пока не осядет. Синхронный throw и reject — ошибка под полями.\n */\n onSubmit?: (\n data: FormData,\n event: FormEvent<HTMLFormElement>,\n ) => void | Promise<void>;\n /**\n * Запрос снаружи формы: `onSubmit` ничего не вернул, крутилку держит стор.\n * Складывается с ожиданием промиса.\n */\n pending?: boolean;\n /** Пока задана — она вместо текста из упавшего `onSubmit`. */\n error?: ReactNode;\n}\n\nexport interface FormActionsProps {\n children: ReactNode;\n className?: string;\n}\n\nexport interface FormConsentProps {\n /** Текст рядом с кнопкой: оферта, согласие. Ссылки можно класть внутрь. */\n children: ReactNode;\n className?: string;\n}\n\nexport const Form = forwardRef(function Form(\n {\n children,\n className,\n error,\n onSubmit,\n pending = false,\n ...props\n }: FormProps,\n ref: ForwardedRef<HTMLFormElement>,\n) {\n const [busy, setBusy] = useState(false);\n const [failure, setFailure] = useState<string | null>(null);\n const formNode = useRef<HTMLFormElement | null>(null);\n const busyRef = useRef(false);\n const requestId = useRef(0);\n const live = useRef(true);\n const submitting = pending || busy;\n const shownError = error ?? failure;\n\n useEffect(() => {\n live.current = true;\n return () => {\n live.current = false;\n };\n }, []);\n\n useEffect(() => {\n const node = formNode.current;\n if (!node) return;\n\n // Бабл браузера английский и перекрывает подсказку. Field уже рисует\n // ошибку. Отмена `invalid` убирает контрол из списка, которому браузер\n // показывает бабл. Сама проверка остаётся отрицательной, сабмит не уходит.\n let firstInvalid: HTMLElement | null = null;\n\n const handleInvalid = (event: Event) => {\n const target = event.target;\n if (!(target instanceof HTMLElement) || !target.closest('.field')) return;\n\n event.preventDefault();\n if (firstInvalid) return;\n\n // Браузер фокусит только контролы, чей `invalid` не отменён.\n // Первый в дереве — тот, с которого он начал бы сам.\n firstInvalid = target;\n queueMicrotask(() => {\n firstInvalid?.focus();\n firstInvalid = null;\n });\n };\n\n node.addEventListener('invalid', handleInvalid, true);\n return () => node.removeEventListener('invalid', handleInvalid, true);\n }, []);\n\n // Стабильная ссылка: иначе React на каждом рендере отцепляет и вешает ref заново.\n const setNode = useCallback(\n (node: HTMLFormElement | null) => {\n formNode.current = node;\n if (typeof ref === 'function') {\n ref(node);\n return;\n }\n if (ref) ref.current = node;\n },\n [ref],\n );\n\n const handleSubmit = (event: FormEvent<HTMLFormElement>) => {\n // Без своего onSubmit остаётся нативный action/method.\n if (!onSubmit) return;\n\n event.preventDefault();\n // Кнопка заблокирована, но requestSubmit и Enter её обходят.\n if (busyRef.current || pending) return;\n\n const data = new FormData(event.currentTarget);\n setFailure(null);\n\n let result: void | Promise<void>;\n try {\n result = onSubmit(data, event);\n } catch (reason) {\n setFailure(toMessage(reason));\n return;\n }\n\n if (!isThenable(result)) return;\n\n const id = ++requestId.current;\n busyRef.current = true;\n setBusy(true);\n\n const finish = () => {\n if (!live.current || requestId.current !== id) return;\n busyRef.current = false;\n setBusy(false);\n };\n\n void Promise.resolve(result).then(\n () => {\n finish();\n },\n (reason: unknown) => {\n finish();\n if (!live.current || requestId.current !== id) return;\n setFailure(toMessage(reason));\n },\n );\n };\n\n return (\n <form\n {...props}\n ref={setNode}\n className={cn('form', className)}\n onSubmit={handleSubmit}\n aria-busy={submitting || undefined}\n >\n <FormPendingContext.Provider value={submitting}>\n {children}\n {shownError ? (\n <p className=\"form__error\" role=\"alert\">\n {shownError}\n </p>\n ) : null}\n </FormPendingContext.Provider>\n </form>\n );\n});\n\nexport const FormActions = ({ children, className }: FormActionsProps) => (\n <div className={cn('form__buttons', className)}>{children}</div>\n);\n\nexport const FormConsent = ({ children, className }: FormConsentProps) => (\n <div className={cn('form__consent', className)}>{children}</div>\n);\n\nexport const FormSubmit = ({\n loading = false,\n children,\n ...props\n}: Omit<ButtonProps, 'type' | 'asChild'>) => {\n const pending = useFormPending();\n\n return (\n <Button {...props} type=\"submit\" loading={loading || pending}>\n {children}\n </Button>\n );\n};\n"],"mappings":";;;;;;AAkBA,MAAM,qBAAqB,cAAc,KAAK;AAE9C,MAAM,uBAAuB,WAAW,kBAAkB;AAE1D,MAAM,cAAc,WACjB,OAAO,UAAU,YAAY,OAAO,UAAU,eAC/C,UAAU,QACV,UAAU,SACV,OAAO,MAAM,SAAS;AAExB,MAAM,aAAa,WAAoB;CACrC,IAAI,OAAO,WAAW,YAAY,OAAO,KAAK,GAAG,OAAO;CAExD,IACE,O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AA;AAEZ"}
@@ -0,0 +1,29 @@
1
+ .form {
2
+ display: flex;
3
+ flex-direction: column;
4
+ gap: var(--space-6);
5
+ width: 100%;
6
+ margin: 0;
7
+ }
8
+
9
+ .form__buttons {
10
+ display: flex;
11
+ flex-wrap: wrap;
12
+ align-items: center;
13
+ gap: var(--space-2) var(--space-4);
14
+ }
15
+
16
+ .form__consent {
17
+ max-width: 220px;
18
+ margin: 0;
19
+ font-size: var(--text-xs);
20
+ line-height: var(--text-xs--line-height);
21
+ color: var(--color-muted-foreground);
22
+ }
23
+
24
+ .form__error {
25
+ margin: 0;
26
+ font-size: var(--text-xs);
27
+ line-height: var(--text-xs--line-height);
28
+ color: var(--color-destructive);
29
+ }
@@ -0,0 +1,2 @@
1
+ import { Form, FormActions, FormActionsProps, FormConsent, FormConsentProps, FormProps, FormSubmit } from "./form.cjs";
2
+ export { Form, FormActions, type FormActionsProps, FormConsent, type FormConsentProps, type FormProps, FormSubmit };
@@ -0,0 +1,2 @@
1
+ import { Form, FormActions, FormActionsProps, FormConsent, FormConsentProps, FormProps, FormSubmit } from "./form.js";
2
+ export { Form, FormActions, type FormActionsProps, FormConsent, type FormConsentProps, type FormProps, FormSubmit };
@@ -0,0 +1,2 @@
1
+ import { PHONE_MASK, PhoneInput, PhoneInputProps } from "./phone-input.cjs";
2
+ export { PHONE_MASK, PhoneInput, type PhoneInputProps };
@@ -0,0 +1,2 @@
1
+ import { PHONE_MASK, PhoneInput, PhoneInputProps } from "./phone-input.js";
2
+ export { PHONE_MASK, PhoneInput, type PhoneInputProps };
@@ -0,0 +1,105 @@
1
+ const require_cn = require("../../lib/cn.cjs");
2
+ const require_field_context = require("../field/field-context.cjs");
3
+ const require_icon_cross = require("../../icons/icon-cross.cjs");
4
+ let react = require("react");
5
+ let react_jsx_runtime = require("react/jsx-runtime");
6
+ require("@/components/input/input.scss");
7
+ let react_imask = require("react-imask");
8
+ // src/components/phone-input/phone-input.tsx
9
+ const PHONE_MASK = "+7 (000) 000-00-00";
10
+ /**
11
+ * Плейсхолдер в виде маски: цифры маски заменяются на «_», литералы остаются.
12
+ * Это атрибут placeholder, а не значение, поэтому required и FormData не меняются.
13
+ */
14
+ const maskPlaceholder = (mask) => mask.replace(/[09]/g, "_");
15
+ const assignRef = (ref, node) => {
16
+ if (typeof ref === "function") {
17
+ ref(node);
18
+ return;
19
+ }
20
+ if (ref) ref.current = node;
21
+ };
22
+ /**
23
+ * Прямая запись `input.value` обходит react-imask, поэтому значение пишем через
24
+ * сеттер прототипа и шлём `input`: маска сама обновится и вызовет onAccept.
25
+ */
26
+ const emitInputValue = (input, next) => {
27
+ (Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, "value")?.set)?.call(input, next);
28
+ input.dispatchEvent(new Event("input", { bubbles: true }));
29
+ };
30
+ /**
31
+ * Телефон на react-imask. Внутри `Field` берёт id, required и ошибку у поля,
32
+ * а в `reportValue` отдаёт цифры, чтобы пустое значение считалось пустым.
33
+ */
34
+ const PhoneInput = (0, react.forwardRef)(function PhoneInput({ mask = PHONE_MASK, placeholder = maskPlaceholder(mask), value, defaultValue, size = "md", error, clearable = false, clearLabel = "Очистить", onClear, className, id, disabled, readOnly, onAccept, "aria-describedby": ariaDescribedBy, ...props }, ref) {
35
+ const field = require_field_context.useFieldControl();
36
+ const reportValue = field?.reportValue;
37
+ const inputRef = (0, react.useRef)(null);
38
+ const [uncontrolledFilled, setUncontrolledFilled] = (0, react.useState)(() => defaultValue !== void 0 && defaultValue !== "");
39
+ const isInvalid = Boolean(error) || Boolean(field?.invalid);
40
+ const canClear = clearable && !disabled && !readOnly && (value !== void 0 ? value !== "" : uncontrolledFilled);
41
+ const describedBy = [field?.describedBy, ariaDescribedBy].filter((part) => Boolean(part)).join(" ");
42
+ const setRef = (0, react.useCallback)((node) => {
43
+ inputRef.current = node;
44
+ assignRef(ref, node);
45
+ }, [ref]);
46
+ (0, react.useEffect)(() => {
47
+ if (value === "") reportValue?.("");
48
+ }, [value, reportValue]);
49
+ const handleAccept = (nextValue, maskRef) => {
50
+ setUncontrolledFilled(maskRef.unmaskedValue !== "");
51
+ reportValue?.(maskRef.unmaskedValue);
52
+ onAccept?.(nextValue, maskRef.unmaskedValue);
53
+ };
54
+ const handleClearMouseDown = (event) => {
55
+ event.preventDefault();
56
+ };
57
+ const handleClear = () => {
58
+ const input = inputRef.current;
59
+ if (!input) return;
60
+ emitInputValue(input, "");
61
+ onClear?.();
62
+ input.focus();
63
+ };
64
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
65
+ className: "input__wrap",
66
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_imask.IMaskInput, {
67
+ ...props,
68
+ type: "tel",
69
+ placeholder,
70
+ inputMode: "tel",
71
+ autoComplete: "tel",
72
+ mask,
73
+ inputRef: setRef,
74
+ value,
75
+ defaultValue,
76
+ onAccept: handleAccept,
77
+ disabled,
78
+ readOnly,
79
+ ...field ? { id: field.id } : { id },
80
+ ...field?.required ? {
81
+ "required": true,
82
+ "aria-required": true
83
+ } : {},
84
+ ...isInvalid ? { "aria-invalid": true } : {},
85
+ ...describedBy ? { "aria-describedby": describedBy } : {},
86
+ ...field?.errorId ? { "aria-errormessage": field.errorId } : {},
87
+ className: require_cn.cn("input", className, require_cn.when(size !== "md", `input--${size}`), require_cn.when(isInvalid, "input--error"), require_cn.when(clearable && !disabled && !readOnly, "input--clearable"))
88
+ }), canClear ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
89
+ type: "button",
90
+ className: "input__clear",
91
+ "aria-label": clearLabel,
92
+ onMouseDown: handleClearMouseDown,
93
+ onClick: handleClear,
94
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_icon_cross.IconCross, {
95
+ width: 16,
96
+ height: 16
97
+ })
98
+ }) : null]
99
+ });
100
+ });
101
+ exports.PHONE_MASK = PHONE_MASK;
102
+ exports.PhoneInput = PhoneInput;
103
+ exports.maskPlaceholder = maskPlaceholder;
104
+
105
+ //# sourceMappingURL=phone-input.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"phone-input.cjs","names":["forwardRef","useFieldControl","useRef","useState","useCallback","IMaskInput","cn","when","IconCross"],"sources":["../../../src/components/phone-input/phone-input.tsx"],"sourcesContent":["import {\n forwardRef,\n useCallback,\n useEffect,\n useRef,\n useState,\n type InputHTMLAttributes,\n type MouseEvent,\n type Ref,\n} from 'react';\nimport { IMaskInput } from 'react-imask';\n\nimport { useFieldControl } from '@/components/field/field-context';\nimport type { InputSize } from '@/components/input';\nimport { IconCross } from '@/icons/icon-cross';\nimport { cn, when } from '@/lib/cn';\nimport '@/components/input/input.scss';\n\nexport const PHONE_MASK = '+7 (000) 000-00-00';\n\n/**\n * Плейсхолдер в виде маски: цифры маски заменяются на «_», литералы остаются.\n * Это атрибут placeholder, а не значение, поэтому required и FormData не меняются.\n */\nexport const maskPlaceholder = (mask: string) => mask.replace(/[09]/g, '_');\n\nconst assignRef = (\n ref: Ref<HTMLInputElement> | undefined,\n node: HTMLInputElement | null,\n) => {\n if (typeof ref === 'function') {\n ref(node);\n return;\n }\n\n if (ref) ref.current = node;\n};\n\n/**\n * Прямая запись `input.value` обходит react-imask, поэтому значение пишем через\n * сеттер прототипа и шлём `input`: маска сама обновится и вызовет onAccept.\n */\nconst emitInputValue = (input: HTMLInputElement, next: string) => {\n const setter = Object.getOwnPropertyDescriptor(\n HTMLInputElement.prototype,\n 'value',\n )?.set;\n\n setter?.call(input, next);\n input.dispatchEvent(new Event('input', { bubbles: true }));\n};\n\nexport interface PhoneInputProps extends Omit<\n InputHTMLAttributes<HTMLInputElement>,\n 'size' | 'type' | 'value' | 'defaultValue' | 'onChange'\n> {\n /** Маска из react-imask. По умолчанию — российский номер. */\n mask?: string;\n /** По умолчанию показывает маску вроде «+7 (___) ___-__-__». */\n placeholder?: string;\n /** Маскированное значение, как в `input`. Пустая строка очищает поле. */\n value?: string;\n defaultValue?: string;\n size?: InputSize;\n error?: boolean;\n /** Крестик справа. Появляется, только когда в поле есть значение. */\n clearable?: boolean;\n clearLabel?: string;\n /** Вызывается после очистки крестиком; `onAccept` получит пустые значения. */\n onClear?: () => void;\n /** Вызывается на каждый ввод: `value` — с маской, `unmaskedValue` — только цифры. */\n onAccept?: (value: string, unmaskedValue: string) => void;\n}\n\n/**\n * Телефон на react-imask. Внутри `Field` берёт id, required и ошибку у поля,\n * а в `reportValue` отдаёт цифры, чтобы пустое значение считалось пустым.\n */\nexport const PhoneInput = forwardRef<HTMLInputElement, PhoneInputProps>(\n function PhoneInput(\n {\n mask = PHONE_MASK,\n placeholder = maskPlaceholder(mask),\n value,\n defaultValue,\n size = 'md',\n error,\n clearable = false,\n clearLabel = 'Очистить',\n onClear,\n className,\n id,\n disabled,\n readOnly,\n onAccept,\n 'aria-describedby': ariaDescribedBy,\n ...props\n },\n ref,\n ) {\n const field = useFieldControl();\n const reportValue = field?.reportValue;\n const inputRef = useRef<HTMLInputElement | null>(null);\n const [uncontrolledFilled, setUncontrolledFilled] = useState(\n () => defaultValue !== undefined && defaultValue !== '',\n );\n const isInvalid = Boolean(error) || Boolean(field?.invalid);\n const hasValue = value !== undefined ? value !== '' : uncontrolledFilled;\n const canClear = clearable && !disabled && !readOnly && hasValue;\n const describedBy = [field?.describedBy, ariaDescribedBy]\n .filter(part => Boolean(part))\n .join(' ');\n\n const setRef = useCallback(\n (node: HTMLInputElement | null) => {\n inputRef.current = node;\n assignRef(ref, node);\n },\n [ref],\n );\n\n // Сброс снаружи (value='') не проходит через onAccept, поэтому сообщаем здесь.\n useEffect(() => {\n if (value === '') reportValue?.('');\n }, [value, reportValue]);\n\n const handleAccept = (\n nextValue: string,\n maskRef: { unmaskedValue: string },\n ) => {\n setUncontrolledFilled(maskRef.unmaskedValue !== '');\n reportValue?.(maskRef.unmaskedValue);\n onAccept?.(nextValue, maskRef.unmaskedValue);\n };\n\n const handleClearMouseDown = (event: MouseEvent<HTMLButtonElement>) => {\n event.preventDefault();\n };\n\n const handleClear = () => {\n const input = inputRef.current;\n if (!input) return;\n\n emitInputValue(input, '');\n onClear?.();\n input.focus();\n };\n\n return (\n <div className=\"input__wrap\">\n <IMaskInput\n {...props}\n type=\"tel\"\n placeholder={placeholder}\n inputMode=\"tel\"\n autoComplete=\"tel\"\n mask={mask}\n inputRef={setRef}\n value={value}\n defaultValue={defaultValue}\n onAccept={handleAccept}\n disabled={disabled}\n readOnly={readOnly}\n {...(field ? { id: field.id } : { id })}\n {...(field?.required\n ? { 'required': true, 'aria-required': true }\n : {})}\n {...(isInvalid ? { 'aria-invalid': true } : {})}\n {...(describedBy ? { 'aria-describedby': describedBy } : {})}\n {...(field?.errorId ? { 'aria-errormessage': field.errorId } : {})}\n className={cn(\n 'input',\n className,\n when(size !== 'md', `input--${size}`),\n when(isInvalid, 'input--error'),\n when(clearable && !disabled && !readOnly, 'input--clearable'),\n )}\n />\n {canClear ? (\n <button\n type=\"button\"\n className=\"input__clear\"\n aria-label={clearLabel}\n onMouseDown={handleClearMouseDown}\n onClick={handleClear}\n >\n <IconCross width={16} height={16} />\n </button>\n ) : null}\n </div>\n );\n },\n);\n"],"mappings":";;;;;;;;AAkBA,MAAa,aAAa;;;;;AAM1B,MAAa,mBAAmB,SAAiB,KAAK,QAAQ,SAAS,GAAG;AAE1E,MAAM,aACJ,KACA,SACG;CACH,IAAI,OAAO,QAAQ,YAAY;EAC7B,IAAI,IAAI;EACR;CACF;CAEA,IAAI,KAAK,IAAI,UAAU;AACzB;;;;;AAMA,MAAM,kBAAkB,OAAyB,SAAiB;CAMhE,CALe,OAAO,yBACpB,iBAAiB,WACjB,OACF,CAAC,EAAE,IAAA,EAEK,KAAK,OAAO,IAAI;CACxB,MAAM,cAAc,IAAI,MAAM,SAAS,EAAE,SAAS,KAAK,CAAC,CAAC;AAC3D;;;;;AA4BA,MAAa,cAAA,GAAaA,MAAAA,WAAAA,CACxB,SAAS,WACP,EACE,OAAO,YACP,cAAc,gBAAgB,IAAI,GAClC,OACA,cACA,OAAO,MACP,OACA,YA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Q;GACb,WAAU;GACV,cAAa;GACP;GACN,UAAU;GACH;GACO;GACd,UAAU;GACA;GACA;GACV,GAAK,QAAQ,EAAE,IAAI,MAAM,GAAG,IAAI,EAAE,GAAG;GACrC,GAAK,OAAO,WACR;IAAE,YAAY;IAAM,iBAAiB;GAAK,IAC1C,CAAC;GACL,GAAK,YAAY,EAAE,gBAAgB,KAAK,IAAI,CAAC;GAC7C,GAAK,cAAc,EAAE,oBAAoB,YAAY,IAAI,CAAC;GAC1D,GAAK,OAAO,UAAU,EAAE,qBAAqB,MAAM,QAAQ,IAAI,CAAC;GAChE,WAAWC,WAAAA,GACT,SACA,WACAC,WAAAA,KAAK,SAAS,MAAM,UAAU,MAAM,GACpCA,WAAAA,KAAK,WAAW,cAAc,GAC9BA,WAAAA,KAAK,aAAa,CAAC,YAAY,CAAC,UAAU,kBAAkB,CAC9D;EACD,CAAA,GACA,WACC,iBAAA,GAAA,kBAAA,IAAA,CAAC,UAAD;GACE,MAAK;GACL,WAAU;GACV,cAAY;GACZ,aAAa;GACb,SAAS;GAET,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAACC,mBAAAA,WAAD;IAAW,OAAO;IAAI,QAAQ;GAAK,CAAA;EAC7B,CAAA,IACN,IACD;;AAET,CACF"}
@@ -0,0 +1,29 @@
1
+ import { InputSize } from "../input/input.cjs";
2
+ import "../input/index.cjs";
3
+ import { InputHTMLAttributes } from "react";
4
+ import "@/components/input/input.scss";
5
+ export declare const PHONE_MASK = "+7 (000) 000-00-00";
6
+ export interface PhoneInputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size' | 'type' | 'value' | 'defaultValue' | 'onChange'> {
7
+ /** Маска из react-imask. По умолчанию — российский номер. */
8
+ mask?: string;
9
+ /** По умолчанию показывает маску вроде «+7 (___) ___-__-__». */
10
+ placeholder?: string;
11
+ /** Маскированное значение, как в `input`. Пустая строка очищает поле. */
12
+ value?: string;
13
+ defaultValue?: string;
14
+ size?: InputSize;
15
+ error?: boolean;
16
+ /** Крестик справа. Появляется, только когда в поле есть значение. */
17
+ clearable?: boolean;
18
+ clearLabel?: string;
19
+ /** Вызывается после очистки крестиком; `onAccept` получит пустые значения. */
20
+ onClear?: () => void;
21
+ /** Вызывается на каждый ввод: `value` — с маской, `unmaskedValue` — только цифры. */
22
+ onAccept?: (value: string, unmaskedValue: string) => void;
23
+ }
24
+ /**
25
+ * Телефон на react-imask. Внутри `Field` берёт id, required и ошибку у поля,
26
+ * а в `reportValue` отдаёт цифры, чтобы пустое значение считалось пустым.
27
+ */
28
+ export declare const PhoneInput: import("react").ForwardRefExoticComponent<PhoneInputProps & import("react").RefAttributes<HTMLInputElement>>;
29
+ //# sourceMappingURL=phone-input.d.cts.map
@@ -0,0 +1,29 @@
1
+ import { InputSize } from "../input/input.js";
2
+ import "../input/index.js";
3
+ import { InputHTMLAttributes } from "react";
4
+ import "@/components/input/input.scss";
5
+ export declare const PHONE_MASK = "+7 (000) 000-00-00";
6
+ export interface PhoneInputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size' | 'type' | 'value' | 'defaultValue' | 'onChange'> {
7
+ /** Маска из react-imask. По умолчанию — российский номер. */
8
+ mask?: string;
9
+ /** По умолчанию показывает маску вроде «+7 (___) ___-__-__». */
10
+ placeholder?: string;
11
+ /** Маскированное значение, как в `input`. Пустая строка очищает поле. */
12
+ value?: string;
13
+ defaultValue?: string;
14
+ size?: InputSize;
15
+ error?: boolean;
16
+ /** Крестик справа. Появляется, только когда в поле есть значение. */
17
+ clearable?: boolean;
18
+ clearLabel?: string;
19
+ /** Вызывается после очистки крестиком; `onAccept` получит пустые значения. */
20
+ onClear?: () => void;
21
+ /** Вызывается на каждый ввод: `value` — с маской, `unmaskedValue` — только цифры. */
22
+ onAccept?: (value: string, unmaskedValue: string) => void;
23
+ }
24
+ /**
25
+ * Телефон на react-imask. Внутри `Field` берёт id, required и ошибку у поля,
26
+ * а в `reportValue` отдаёт цифры, чтобы пустое значение считалось пустым.
27
+ */
28
+ export declare const PhoneInput: import("react").ForwardRefExoticComponent<PhoneInputProps & import("react").RefAttributes<HTMLInputElement>>;
29
+ //# sourceMappingURL=phone-input.d.ts.map
@@ -0,0 +1,103 @@
1
+ import { cn, when } from "../../lib/cn.js";
2
+ import { useFieldControl } from "../field/field-context.js";
3
+ import { IconCross } from "../../icons/icon-cross.js";
4
+ import { forwardRef, useCallback, useEffect, useRef, useState } from "react";
5
+ import { jsx, jsxs } from "react/jsx-runtime";
6
+ import "@/components/input/input.scss";
7
+ import { IMaskInput } from "react-imask";
8
+ // src/components/phone-input/phone-input.tsx
9
+ const PHONE_MASK = "+7 (000) 000-00-00";
10
+ /**
11
+ * Плейсхолдер в виде маски: цифры маски заменяются на «_», литералы остаются.
12
+ * Это атрибут placeholder, а не значение, поэтому required и FormData не меняются.
13
+ */
14
+ const maskPlaceholder = (mask) => mask.replace(/[09]/g, "_");
15
+ const assignRef = (ref, node) => {
16
+ if (typeof ref === "function") {
17
+ ref(node);
18
+ return;
19
+ }
20
+ if (ref) ref.current = node;
21
+ };
22
+ /**
23
+ * Прямая запись `input.value` обходит react-imask, поэтому значение пишем через
24
+ * сеттер прототипа и шлём `input`: маска сама обновится и вызовет onAccept.
25
+ */
26
+ const emitInputValue = (input, next) => {
27
+ (Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, "value")?.set)?.call(input, next);
28
+ input.dispatchEvent(new Event("input", { bubbles: true }));
29
+ };
30
+ /**
31
+ * Телефон на react-imask. Внутри `Field` берёт id, required и ошибку у поля,
32
+ * а в `reportValue` отдаёт цифры, чтобы пустое значение считалось пустым.
33
+ */
34
+ const PhoneInput = forwardRef(function PhoneInput({ mask = PHONE_MASK, placeholder = maskPlaceholder(mask), value, defaultValue, size = "md", error, clearable = false, clearLabel = "Очистить", onClear, className, id, disabled, readOnly, onAccept, "aria-describedby": ariaDescribedBy, ...props }, ref) {
35
+ const field = useFieldControl();
36
+ const reportValue = field?.reportValue;
37
+ const inputRef = useRef(null);
38
+ const [uncontrolledFilled, setUncontrolledFilled] = useState(() => defaultValue !== void 0 && defaultValue !== "");
39
+ const isInvalid = Boolean(error) || Boolean(field?.invalid);
40
+ const canClear = clearable && !disabled && !readOnly && (value !== void 0 ? value !== "" : uncontrolledFilled);
41
+ const describedBy = [field?.describedBy, ariaDescribedBy].filter((part) => Boolean(part)).join(" ");
42
+ const setRef = useCallback((node) => {
43
+ inputRef.current = node;
44
+ assignRef(ref, node);
45
+ }, [ref]);
46
+ useEffect(() => {
47
+ if (value === "") reportValue?.("");
48
+ }, [value, reportValue]);
49
+ const handleAccept = (nextValue, maskRef) => {
50
+ setUncontrolledFilled(maskRef.unmaskedValue !== "");
51
+ reportValue?.(maskRef.unmaskedValue);
52
+ onAccept?.(nextValue, maskRef.unmaskedValue);
53
+ };
54
+ const handleClearMouseDown = (event) => {
55
+ event.preventDefault();
56
+ };
57
+ const handleClear = () => {
58
+ const input = inputRef.current;
59
+ if (!input) return;
60
+ emitInputValue(input, "");
61
+ onClear?.();
62
+ input.focus();
63
+ };
64
+ return /* @__PURE__ */ jsxs("div", {
65
+ className: "input__wrap",
66
+ children: [/* @__PURE__ */ jsx(IMaskInput, {
67
+ ...props,
68
+ type: "tel",
69
+ placeholder,
70
+ inputMode: "tel",
71
+ autoComplete: "tel",
72
+ mask,
73
+ inputRef: setRef,
74
+ value,
75
+ defaultValue,
76
+ onAccept: handleAccept,
77
+ disabled,
78
+ readOnly,
79
+ ...field ? { id: field.id } : { id },
80
+ ...field?.required ? {
81
+ "required": true,
82
+ "aria-required": true
83
+ } : {},
84
+ ...isInvalid ? { "aria-invalid": true } : {},
85
+ ...describedBy ? { "aria-describedby": describedBy } : {},
86
+ ...field?.errorId ? { "aria-errormessage": field.errorId } : {},
87
+ className: cn("input", className, when(size !== "md", `input--${size}`), when(isInvalid, "input--error"), when(clearable && !disabled && !readOnly, "input--clearable"))
88
+ }), canClear ? /* @__PURE__ */ jsx("button", {
89
+ type: "button",
90
+ className: "input__clear",
91
+ "aria-label": clearLabel,
92
+ onMouseDown: handleClearMouseDown,
93
+ onClick: handleClear,
94
+ children: /* @__PURE__ */ jsx(IconCross, {
95
+ width: 16,
96
+ height: 16
97
+ })
98
+ }) : null]
99
+ });
100
+ });
101
+ export { PHONE_MASK, PhoneInput, maskPlaceholder };
102
+
103
+ //# sourceMappingURL=phone-input.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"phone-input.js","names":[],"sources":["../../../src/components/phone-input/phone-input.tsx"],"sourcesContent":["import {\n forwardRef,\n useCallback,\n useEffect,\n useRef,\n useState,\n type InputHTMLAttributes,\n type MouseEvent,\n type Ref,\n} from 'react';\nimport { IMaskInput } from 'react-imask';\n\nimport { useFieldControl } from '@/components/field/field-context';\nimport type { InputSize } from '@/components/input';\nimport { IconCross } from '@/icons/icon-cross';\nimport { cn, when } from '@/lib/cn';\nimport '@/components/input/input.scss';\n\nexport const PHONE_MASK = '+7 (000) 000-00-00';\n\n/**\n * Плейсхолдер в виде маски: цифры маски заменяются на «_», литералы остаются.\n * Это атрибут placeholder, а не значение, поэтому required и FormData не меняются.\n */\nexport const maskPlaceholder = (mask: string) => mask.replace(/[09]/g, '_');\n\nconst assignRef = (\n ref: Ref<HTMLInputElement> | undefined,\n node: HTMLInputElement | null,\n) => {\n if (typeof ref === 'function') {\n ref(node);\n return;\n }\n\n if (ref) ref.current = node;\n};\n\n/**\n * Прямая запись `input.value` обходит react-imask, поэтому значение пишем через\n * сеттер прототипа и шлём `input`: маска сама обновится и вызовет onAccept.\n */\nconst emitInputValue = (input: HTMLInputElement, next: string) => {\n const setter = Object.getOwnPropertyDescriptor(\n HTMLInputElement.prototype,\n 'value',\n )?.set;\n\n setter?.call(input, next);\n input.dispatchEvent(new Event('input', { bubbles: true }));\n};\n\nexport interface PhoneInputProps extends Omit<\n InputHTMLAttributes<HTMLInputElement>,\n 'size' | 'type' | 'value' | 'defaultValue' | 'onChange'\n> {\n /** Маска из react-imask. По умолчанию — российский номер. */\n mask?: string;\n /** По умолчанию показывает маску вроде «+7 (___) ___-__-__». */\n placeholder?: string;\n /** Маскированное значение, как в `input`. Пустая строка очищает поле. */\n value?: string;\n defaultValue?: string;\n size?: InputSize;\n error?: boolean;\n /** Крестик справа. Появляется, только когда в поле есть значение. */\n clearable?: boolean;\n clearLabel?: string;\n /** Вызывается после очистки крестиком; `onAccept` получит пустые значения. */\n onClear?: () => void;\n /** Вызывается на каждый ввод: `value` — с маской, `unmaskedValue` — только цифры. */\n onAccept?: (value: string, unmaskedValue: string) => void;\n}\n\n/**\n * Телефон на react-imask. Внутри `Field` берёт id, required и ошибку у поля,\n * а в `reportValue` отдаёт цифры, чтобы пустое значение считалось пустым.\n */\nexport const PhoneInput = forwardRef<HTMLInputElement, PhoneInputProps>(\n function PhoneInput(\n {\n mask = PHONE_MASK,\n placeholder = maskPlaceholder(mask),\n value,\n defaultValue,\n size = 'md',\n error,\n clearable = false,\n clearLabel = 'Очистить',\n onClear,\n className,\n id,\n disabled,\n readOnly,\n onAccept,\n 'aria-describedby': ariaDescribedBy,\n ...props\n },\n ref,\n ) {\n const field = useFieldControl();\n const reportValue = field?.reportValue;\n const inputRef = useRef<HTMLInputElement | null>(null);\n const [uncontrolledFilled, setUncontrolledFilled] = useState(\n () => defaultValue !== undefined && defaultValue !== '',\n );\n const isInvalid = Boolean(error) || Boolean(field?.invalid);\n const hasValue = value !== undefined ? value !== '' : uncontrolledFilled;\n const canClear = clearable && !disabled && !readOnly && hasValue;\n const describedBy = [field?.describedBy, ariaDescribedBy]\n .filter(part => Boolean(part))\n .join(' ');\n\n const setRef = useCallback(\n (node: HTMLInputElement | null) => {\n inputRef.current = node;\n assignRef(ref, node);\n },\n [ref],\n );\n\n // Сброс снаружи (value='') не проходит через onAccept, поэтому сообщаем здесь.\n useEffect(() => {\n if (value === '') reportValue?.('');\n }, [value, reportValue]);\n\n const handleAccept = (\n nextValue: string,\n maskRef: { unmaskedValue: string },\n ) => {\n setUncontrolledFilled(maskRef.unmaskedValue !== '');\n reportValue?.(maskRef.unmaskedValue);\n onAccept?.(nextValue, maskRef.unmaskedValue);\n };\n\n const handleClearMouseDown = (event: MouseEvent<HTMLButtonElement>) => {\n event.preventDefault();\n };\n\n const handleClear = () => {\n const input = inputRef.current;\n if (!input) return;\n\n emitInputValue(input, '');\n onClear?.();\n input.focus();\n };\n\n return (\n <div className=\"input__wrap\">\n <IMaskInput\n {...props}\n type=\"tel\"\n placeholder={placeholder}\n inputMode=\"tel\"\n autoComplete=\"tel\"\n mask={mask}\n inputRef={setRef}\n value={value}\n defaultValue={defaultValue}\n onAccept={handleAccept}\n disabled={disabled}\n readOnly={readOnly}\n {...(field ? { id: field.id } : { id })}\n {...(field?.required\n ? { 'required': true, 'aria-required': true }\n : {})}\n {...(isInvalid ? { 'aria-invalid': true } : {})}\n {...(describedBy ? { 'aria-describedby': describedBy } : {})}\n {...(field?.errorId ? { 'aria-errormessage': field.errorId } : {})}\n className={cn(\n 'input',\n className,\n when(size !== 'md', `input--${size}`),\n when(isInvalid, 'input--error'),\n when(clearable && !disabled && !readOnly, 'input--clearable'),\n )}\n />\n {canClear ? (\n <button\n type=\"button\"\n className=\"input__clear\"\n aria-label={clearLabel}\n onMouseDown={handleClearMouseDown}\n onClick={handleClear}\n >\n <IconCross width={16} height={16} />\n </button>\n ) : null}\n </div>\n );\n },\n);\n"],"mappings":";;;;;;;;AAkBA,MAAa,aAAa;;;;;AAM1B,MAAa,mBAAmB,SAAiB,KAAK,QAAQ,SAAS,GAAG;AAE1E,MAAM,aACJ,KACA,SACG;CACH,IAAI,OAAO,QAAQ,YAAY;EAC7B,IAAI,IAAI;EACR;CACF;CAEA,IAAI,KAAK,IAAI,UAAU;AACzB;;;;;AAMA,MAAM,kBAAkB,OAAyB,SAAiB;CAMhE,CALe,OAAO,yBACpB,iBAAiB,WACjB,OACF,CAAC,EAAE,IAAA,EAEK,KAAK,OAAO,IAAI;CACxB,MAAM,cAAc,IAAI,MAAM,SAAS,EAAE,SAAS,KAAK,CAAC,CAAC;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UAAU;GACH;GACO;GACd,UAAU;GACA;GACA;GACV,GAAK,QAAQ,EAAE,IAAI,MAAM,GAAG,IAAI,EAAE,GAAG;GACrC,GAAK,OAAO,WACR;IAAE,YAAY;IAAM,iBAAiB;GAAK,IAC1C,CAAC;GACL,GAAK,YAAY,EAAE,gBAAgB,KAAK,IAAI,CAAC;GAC7C,GAAK,cAAc,EAAE,oBAAoB,YAAY,IAAI,CAAC;GAC1D,GAAK,OAAO,UAAU,EAAE,qBAAqB,MAAM,QAAQ,IAAI,CAAC;GAChE,WAAW,GACT,SACA,WACA,KAAK,SAAS,MAAM,UAAU,MAAM,GACpC,KAAK,WAAW,cAAc,GAC9B,KAAK,aAAa,CAAC,YAAY,CAAC,UAAU,kBAAkB,CAC9D;EACD,CAAA,GACA,WACC,oBAAC,UAAD;GACE,MAAK;GACL,WAAU;GACV,cAAY;GACZ,aAAa;GACb,SAAS;GAET,UAAA,oBAAC,WAAD;IAAW,OAAO;IAAI,QAAQ;GAAK,CAAA;EAC7B,CAAA,IACN,IACD;;AAET,CACF"}
@@ -9,19 +9,19 @@ const IconLabelOzon = (props) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(req
9
9
  children: [
10
10
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
11
11
  fill: "#005BFF",
12
- d: "M12,4H8C5.79,4,4,5.79,4,8v4c0,2.21,1.79,4,4,4h4c2.21,0,4-1.79,4-4V8\r\nC16,5.79,14.21,4,12,4z"
12
+ d: "M12,4H8C5.79,4,4,5.79,4,8v4c0,2.21,1.79,4,4,4h4c2.21,0,4-1.79,4-4V8\nC16,5.79,14.21,4,12,4z"
13
13
  }),
14
14
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
15
15
  fill: "#F91155",
16
- d: "M12.78,9.19L7,10.62v5.23C7.32,15.94,7.65,16,8,16h4c1.92,0,3.53-1.36,3.91-3.17\r\nL12.78,9.19z"
16
+ d: "M12.78,9.19L7,10.62v5.23C7.32,15.94,7.65,16,8,16h4c1.92,0,3.53-1.36,3.91-3.17\nL12.78,9.19z"
17
17
  }),
18
18
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
19
19
  fill: "#FFFFFF",
20
- d: "M14.27,8.98c-0.4-1.69-2.65-2.6-5.01-2.03c-2.36,0.56-3.95,2.39-3.54,4.08\r\nc0.4,1.69,2.65,2.6,5.01,2.03C13.09,12.49,14.68,10.66,14.27,8.98z"
20
+ d: "M14.27,8.98c-0.4-1.69-2.65-2.6-5.01-2.03c-2.36,0.56-3.95,2.39-3.54,4.08\nc0.4,1.69,2.65,2.6,5.01,2.03C13.09,12.49,14.68,10.66,14.27,8.98z"
21
21
  }),
22
22
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
23
23
  fill: "#F91155",
24
- d: "M12.65,9.37c-0.17-0.71-1.49-1.24-3.01-0.88c-1.51,0.36-2.46,1.43-2.29,2.15\r\nc0.17,0.71,1.49,1.24,3.01,0.88C11.88,11.15,12.82,10.08,12.65,9.37z"
24
+ d: "M12.65,9.37c-0.17-0.71-1.49-1.24-3.01-0.88c-1.51,0.36-2.46,1.43-2.29,2.15\nc0.17,0.71,1.49,1.24,3.01,0.88C11.88,11.15,12.82,10.08,12.65,9.37z"
25
25
  })
26
26
  ]
27
27
  });
@@ -1 +1 @@
1
- {"version":3,"file":"icon-label-ozon.cjs","names":["Svg"],"sources":["../../src/icons/icon-label-ozon.tsx"],"sourcesContent":["// Generated by scripts/build-icons.mjs. Do not edit.\nimport { Svg, type IconProps } from './svg';\n\nexport const IconLabelOzon = (props: IconProps) => (\n <Svg viewBox=\"0 0 20 20\" width={20} height={20} {...props}>\n <path\n fill=\"#005BFF\"\n d={\n 'M12,4H8C5.79,4,4,5.79,4,8v4c0,2.21,1.79,4,4,4h4c2.21,0,4-1.79,4-4V8\\r\\nC16,5.79,14.21,4,12,4z'\n }\n />\n <path\n fill=\"#F91155\"\n d={\n 'M12.78,9.19L7,10.62v5.23C7.32,15.94,7.65,16,8,16h4c1.92,0,3.53-1.36,3.91-3.17\\r\\nL12.78,9.19z'\n }\n />\n <path\n fill=\"#FFFFFF\"\n d={\n 'M14.27,8.98c-0.4-1.69-2.65-2.6-5.01-2.03c-2.36,0.56-3.95,2.39-3.54,4.08\\r\\nc0.4,1.69,2.65,2.6,5.01,2.03C13.09,12.49,14.68,10.66,14.27,8.98z'\n }\n />\n <path\n fill=\"#F91155\"\n d={\n 'M12.65,9.37c-0.17-0.71-1.49-1.24-3.01-0.88c-1.51,0.36-2.46,1.43-2.29,2.15\\r\\nc0.17,0.71,1.49,1.24,3.01,0.88C11.88,11.15,12.82,10.08,12.65,9.37z'\n }\n />\n </Svg>\n);\n"],"mappings":";;;AAGA,MAAa,iBAAiB,UAC5B,iBAAA,GAAA,kBAAA,KAAA,CAACA,YAAAA,KAAD;CAAK,SAAQ;CAAY,OAAO;CAAI,QAAQ;CAAI,GAAI;CAApD,UAAA;EACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD;GACE,MAAK;GACL,GACE;EAEH,CAAA;EACD,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD;GACE,MAAK;GACL,GACE;EAEH,CAAA;EACD,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD;GACE,MAAK;GACL,GACE;EAEH,CAAA;EACD,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD;GACE,MAAK;GACL,GACE;EAEH,CAAA;CACE"}
1
+ {"version":3,"file":"icon-label-ozon.cjs","names":["Svg"],"sources":["../../src/icons/icon-label-ozon.tsx"],"sourcesContent":["// Generated by scripts/build-icons.mjs. Do not edit.\nimport { Svg, type IconProps } from './svg';\n\nexport const IconLabelOzon = (props: IconProps) => (\n <Svg viewBox=\"0 0 20 20\" width={20} height={20} {...props}>\n <path\n fill=\"#005BFF\"\n d={\n 'M12,4H8C5.79,4,4,5.79,4,8v4c0,2.21,1.79,4,4,4h4c2.21,0,4-1.79,4-4V8\\nC16,5.79,14.21,4,12,4z'\n }\n />\n <path\n fill=\"#F91155\"\n d={\n 'M12.78,9.19L7,10.62v5.23C7.32,15.94,7.65,16,8,16h4c1.92,0,3.53-1.36,3.91-3.17\\nL12.78,9.19z'\n }\n />\n <path\n fill=\"#FFFFFF\"\n d={\n 'M14.27,8.98c-0.4-1.69-2.65-2.6-5.01-2.03c-2.36,0.56-3.95,2.39-3.54,4.08\\nc0.4,1.69,2.65,2.6,5.01,2.03C13.09,12.49,14.68,10.66,14.27,8.98z'\n }\n />\n <path\n fill=\"#F91155\"\n d={\n 'M12.65,9.37c-0.17-0.71-1.49-1.24-3.01-0.88c-1.51,0.36-2.46,1.43-2.29,2.15\\nc0.17,0.71,1.49,1.24,3.01,0.88C11.88,11.15,12.82,10.08,12.65,9.37z'\n }\n />\n </Svg>\n);\n"],"mappings":";;;AAGA,MAAa,iBAAiB,UAC5B,iBAAA,GAAA,kBAAA,KAAA,CAACA,YAAAA,KAAD;CAAK,SAAQ;CAAY,OAAO;CAAI,QAAQ;CAAI,GAAI;CAApD,UAAA;EACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD;GACE,MAAK;GACL,GACE;EAEH,CAAA;EACD,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD;GACE,MAAK;GACL,GACE;EAEH,CAAA;EACD,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD;GACE,MAAK;GACL,GACE;EAEH,CAAA;EACD,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD;GACE,MAAK;GACL,GACE;EAEH,CAAA;CACE"}
@@ -9,19 +9,19 @@ const IconLabelOzon = (props) => /* @__PURE__ */ jsxs(Svg, {
9
9
  children: [
10
10
  /* @__PURE__ */ jsx("path", {
11
11
  fill: "#005BFF",
12
- d: "M12,4H8C5.79,4,4,5.79,4,8v4c0,2.21,1.79,4,4,4h4c2.21,0,4-1.79,4-4V8\r\nC16,5.79,14.21,4,12,4z"
12
+ d: "M12,4H8C5.79,4,4,5.79,4,8v4c0,2.21,1.79,4,4,4h4c2.21,0,4-1.79,4-4V8\nC16,5.79,14.21,4,12,4z"
13
13
  }),
14
14
  /* @__PURE__ */ jsx("path", {
15
15
  fill: "#F91155",
16
- d: "M12.78,9.19L7,10.62v5.23C7.32,15.94,7.65,16,8,16h4c1.92,0,3.53-1.36,3.91-3.17\r\nL12.78,9.19z"
16
+ d: "M12.78,9.19L7,10.62v5.23C7.32,15.94,7.65,16,8,16h4c1.92,0,3.53-1.36,3.91-3.17\nL12.78,9.19z"
17
17
  }),
18
18
  /* @__PURE__ */ jsx("path", {
19
19
  fill: "#FFFFFF",
20
- d: "M14.27,8.98c-0.4-1.69-2.65-2.6-5.01-2.03c-2.36,0.56-3.95,2.39-3.54,4.08\r\nc0.4,1.69,2.65,2.6,5.01,2.03C13.09,12.49,14.68,10.66,14.27,8.98z"
20
+ d: "M14.27,8.98c-0.4-1.69-2.65-2.6-5.01-2.03c-2.36,0.56-3.95,2.39-3.54,4.08\nc0.4,1.69,2.65,2.6,5.01,2.03C13.09,12.49,14.68,10.66,14.27,8.98z"
21
21
  }),
22
22
  /* @__PURE__ */ jsx("path", {
23
23
  fill: "#F91155",
24
- d: "M12.65,9.37c-0.17-0.71-1.49-1.24-3.01-0.88c-1.51,0.36-2.46,1.43-2.29,2.15\r\nc0.17,0.71,1.49,1.24,3.01,0.88C11.88,11.15,12.82,10.08,12.65,9.37z"
24
+ d: "M12.65,9.37c-0.17-0.71-1.49-1.24-3.01-0.88c-1.51,0.36-2.46,1.43-2.29,2.15\nc0.17,0.71,1.49,1.24,3.01,0.88C11.88,11.15,12.82,10.08,12.65,9.37z"
25
25
  })
26
26
  ]
27
27
  });
@@ -1 +1 @@
1
- {"version":3,"file":"icon-label-ozon.js","names":[],"sources":["../../src/icons/icon-label-ozon.tsx"],"sourcesContent":["// Generated by scripts/build-icons.mjs. Do not edit.\nimport { Svg, type IconProps } from './svg';\n\nexport const IconLabelOzon = (props: IconProps) => (\n <Svg viewBox=\"0 0 20 20\" width={20} height={20} {...props}>\n <path\n fill=\"#005BFF\"\n d={\n 'M12,4H8C5.79,4,4,5.79,4,8v4c0,2.21,1.79,4,4,4h4c2.21,0,4-1.79,4-4V8\\r\\nC16,5.79,14.21,4,12,4z'\n }\n />\n <path\n fill=\"#F91155\"\n d={\n 'M12.78,9.19L7,10.62v5.23C7.32,15.94,7.65,16,8,16h4c1.92,0,3.53-1.36,3.91-3.17\\r\\nL12.78,9.19z'\n }\n />\n <path\n fill=\"#FFFFFF\"\n d={\n 'M14.27,8.98c-0.4-1.69-2.65-2.6-5.01-2.03c-2.36,0.56-3.95,2.39-3.54,4.08\\r\\nc0.4,1.69,2.65,2.6,5.01,2.03C13.09,12.49,14.68,10.66,14.27,8.98z'\n }\n />\n <path\n fill=\"#F91155\"\n d={\n 'M12.65,9.37c-0.17-0.71-1.49-1.24-3.01-0.88c-1.51,0.36-2.46,1.43-2.29,2.15\\r\\nc0.17,0.71,1.49,1.24,3.01,0.88C11.88,11.15,12.82,10.08,12.65,9.37z'\n }\n />\n </Svg>\n);\n"],"mappings":";;;AAGA,MAAa,iBAAiB,UAC5B,qBAAC,KAAD;CAAK,SAAQ;CAAY,OAAO;CAAI,QAAQ;CAAI,GAAI;CAApD,UAAA;EACE,oBAAC,QAAD;GACE,MAAK;GACL,GACE;EAEH,CAAA;EACD,oBAAC,QAAD;GACE,MAAK;GACL,GACE;EAEH,CAAA;EACD,oBAAC,QAAD;GACE,MAAK;GACL,GACE;EAEH,CAAA;EACD,oBAAC,QAAD;GACE,MAAK;GACL,GACE;EAEH,CAAA;CACE"}
1
+ {"version":3,"file":"icon-label-ozon.js","names":[],"sources":["../../src/icons/icon-label-ozon.tsx"],"sourcesContent":["// Generated by scripts/build-icons.mjs. Do not edit.\nimport { Svg, type IconProps } from './svg';\n\nexport const IconLabelOzon = (props: IconProps) => (\n <Svg viewBox=\"0 0 20 20\" width={20} height={20} {...props}>\n <path\n fill=\"#005BFF\"\n d={\n 'M12,4H8C5.79,4,4,5.79,4,8v4c0,2.21,1.79,4,4,4h4c2.21,0,4-1.79,4-4V8\\nC16,5.79,14.21,4,12,4z'\n }\n />\n <path\n fill=\"#F91155\"\n d={\n 'M12.78,9.19L7,10.62v5.23C7.32,15.94,7.65,16,8,16h4c1.92,0,3.53-1.36,3.91-3.17\\nL12.78,9.19z'\n }\n />\n <path\n fill=\"#FFFFFF\"\n d={\n 'M14.27,8.98c-0.4-1.69-2.65-2.6-5.01-2.03c-2.36,0.56-3.95,2.39-3.54,4.08\\nc0.4,1.69,2.65,2.6,5.01,2.03C13.09,12.49,14.68,10.66,14.27,8.98z'\n }\n />\n <path\n fill=\"#F91155\"\n d={\n 'M12.65,9.37c-0.17-0.71-1.49-1.24-3.01-0.88c-1.51,0.36-2.46,1.43-2.29,2.15\\nc0.17,0.71,1.49,1.24,3.01,0.88C11.88,11.15,12.82,10.08,12.65,9.37z'\n }\n />\n </Svg>\n);\n"],"mappings":";;;AAGA,MAAa,iBAAiB,UAC5B,qBAAC,KAAD;CAAK,SAAQ;CAAY,OAAO;CAAI,QAAQ;CAAI,GAAI;CAApD,UAAA;EACE,oBAAC,QAAD;GACE,MAAK;GACL,GACE;EAEH,CAAA;EACD,oBAAC,QAAD;GACE,MAAK;GACL,GACE;EAEH,CAAA;EACD,oBAAC,QAAD;GACE,MAAK;GACL,GACE;EAEH,CAAA;EACD,oBAAC,QAAD;GACE,MAAK;GACL,GACE;EAEH,CAAA;CACE"}
@@ -13,7 +13,7 @@ const IconLabelYandex = (props) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(r
13
13
  r: "6"
14
14
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
15
15
  fill: "#FFFFFF",
16
- d: "M10.28,6.31c-1.85,0-2.82,0.94-2.82,2.33c0,1.11,0.53,1.76,1.48,2.44L7.3,13.51h1.37\r\nl1.84-2.73l-0.64-0.43C9.09,9.84,8.72,9.44,8.72,8.57c0-0.77,0.54-1.29,1.58-1.29h0.56v6.23h1.26V6.31H10.28z"
16
+ d: "M10.28,6.31c-1.85,0-2.82,0.94-2.82,2.33c0,1.11,0.53,1.76,1.48,2.44L7.3,13.51h1.37\nl1.84-2.73l-0.64-0.43C9.09,9.84,8.72,9.44,8.72,8.57c0-0.77,0.54-1.29,1.58-1.29h0.56v6.23h1.26V6.31H10.28z"
17
17
  })]
18
18
  });
19
19
  exports.IconLabelYandex = IconLabelYandex;
@@ -1 +1 @@
1
- {"version":3,"file":"icon-label-yandex.cjs","names":["Svg"],"sources":["../../src/icons/icon-label-yandex.tsx"],"sourcesContent":["// Generated by scripts/build-icons.mjs. Do not edit.\nimport { Svg, type IconProps } from './svg';\n\nexport const IconLabelYandex = (props: IconProps) => (\n <Svg viewBox=\"0 0 20 20\" width={20} height={20} {...props}>\n <circle fill=\"#FC3F1D\" cx=\"10\" cy=\"10\" r=\"6\" />\n <path\n fill=\"#FFFFFF\"\n d={\n 'M10.28,6.31c-1.85,0-2.82,0.94-2.82,2.33c0,1.11,0.53,1.76,1.48,2.44L7.3,13.51h1.37\\r\\nl1.84-2.73l-0.64-0.43C9.09,9.84,8.72,9.44,8.72,8.57c0-0.77,0.54-1.29,1.58-1.29h0.56v6.23h1.26V6.31H10.28z'\n }\n />\n </Svg>\n);\n"],"mappings":";;;AAGA,MAAa,mBAAmB,UAC9B,iBAAA,GAAA,kBAAA,KAAA,CAACA,YAAAA,KAAD;CAAK,SAAQ;CAAY,OAAO;CAAI,QAAQ;CAAI,GAAI;CAApD,UAAA,CACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,UAAD;EAAQ,MAAK;EAAU,IAAG;EAAK,IAAG;EAAK,GAAE;CAAK,CAAA,GAC9C,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD;EACE,MAAK;EACL,GACE;CAEH,CAAA,CACE"}
1
+ {"version":3,"file":"icon-label-yandex.cjs","names":["Svg"],"sources":["../../src/icons/icon-label-yandex.tsx"],"sourcesContent":["// Generated by scripts/build-icons.mjs. Do not edit.\nimport { Svg, type IconProps } from './svg';\n\nexport const IconLabelYandex = (props: IconProps) => (\n <Svg viewBox=\"0 0 20 20\" width={20} height={20} {...props}>\n <circle fill=\"#FC3F1D\" cx=\"10\" cy=\"10\" r=\"6\" />\n <path\n fill=\"#FFFFFF\"\n d={\n 'M10.28,6.31c-1.85,0-2.82,0.94-2.82,2.33c0,1.11,0.53,1.76,1.48,2.44L7.3,13.51h1.37\\nl1.84-2.73l-0.64-0.43C9.09,9.84,8.72,9.44,8.72,8.57c0-0.77,0.54-1.29,1.58-1.29h0.56v6.23h1.26V6.31H10.28z'\n }\n />\n </Svg>\n);\n"],"mappings":";;;AAGA,MAAa,mBAAmB,UAC9B,iBAAA,GAAA,kBAAA,KAAA,CAACA,YAAAA,KAAD;CAAK,SAAQ;CAAY,OAAO;CAAI,QAAQ;CAAI,GAAI;CAApD,UAAA,CACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,UAAD;EAAQ,MAAK;EAAU,IAAG;EAAK,IAAG;EAAK,GAAE;CAAK,CAAA,GAC9C,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD;EACE,MAAK;EACL,GACE;CAEH,CAAA,CACE"}
@@ -13,7 +13,7 @@ const IconLabelYandex = (props) => /* @__PURE__ */ jsxs(Svg, {
13
13
  r: "6"
14
14
  }), /* @__PURE__ */ jsx("path", {
15
15
  fill: "#FFFFFF",
16
- d: "M10.28,6.31c-1.85,0-2.82,0.94-2.82,2.33c0,1.11,0.53,1.76,1.48,2.44L7.3,13.51h1.37\r\nl1.84-2.73l-0.64-0.43C9.09,9.84,8.72,9.44,8.72,8.57c0-0.77,0.54-1.29,1.58-1.29h0.56v6.23h1.26V6.31H10.28z"
16
+ d: "M10.28,6.31c-1.85,0-2.82,0.94-2.82,2.33c0,1.11,0.53,1.76,1.48,2.44L7.3,13.51h1.37\nl1.84-2.73l-0.64-0.43C9.09,9.84,8.72,9.44,8.72,8.57c0-0.77,0.54-1.29,1.58-1.29h0.56v6.23h1.26V6.31H10.28z"
17
17
  })]
18
18
  });
19
19
  export { IconLabelYandex };
@@ -1 +1 @@
1
- {"version":3,"file":"icon-label-yandex.js","names":[],"sources":["../../src/icons/icon-label-yandex.tsx"],"sourcesContent":["// Generated by scripts/build-icons.mjs. Do not edit.\nimport { Svg, type IconProps } from './svg';\n\nexport const IconLabelYandex = (props: IconProps) => (\n <Svg viewBox=\"0 0 20 20\" width={20} height={20} {...props}>\n <circle fill=\"#FC3F1D\" cx=\"10\" cy=\"10\" r=\"6\" />\n <path\n fill=\"#FFFFFF\"\n d={\n 'M10.28,6.31c-1.85,0-2.82,0.94-2.82,2.33c0,1.11,0.53,1.76,1.48,2.44L7.3,13.51h1.37\\r\\nl1.84-2.73l-0.64-0.43C9.09,9.84,8.72,9.44,8.72,8.57c0-0.77,0.54-1.29,1.58-1.29h0.56v6.23h1.26V6.31H10.28z'\n }\n />\n </Svg>\n);\n"],"mappings":";;;AAGA,MAAa,mBAAmB,UAC9B,qBAAC,KAAD;CAAK,SAAQ;CAAY,OAAO;CAAI,QAAQ;CAAI,GAAI;CAApD,UAAA,CACE,oBAAC,UAAD;EAAQ,MAAK;EAAU,IAAG;EAAK,IAAG;EAAK,GAAE;CAAK,CAAA,GAC9C,oBAAC,QAAD;EACE,MAAK;EACL,GACE;CAEH,CAAA,CACE"}
1
+ {"version":3,"file":"icon-label-yandex.js","names":[],"sources":["../../src/icons/icon-label-yandex.tsx"],"sourcesContent":["// Generated by scripts/build-icons.mjs. Do not edit.\nimport { Svg, type IconProps } from './svg';\n\nexport const IconLabelYandex = (props: IconProps) => (\n <Svg viewBox=\"0 0 20 20\" width={20} height={20} {...props}>\n <circle fill=\"#FC3F1D\" cx=\"10\" cy=\"10\" r=\"6\" />\n <path\n fill=\"#FFFFFF\"\n d={\n 'M10.28,6.31c-1.85,0-2.82,0.94-2.82,2.33c0,1.11,0.53,1.76,1.48,2.44L7.3,13.51h1.37\\nl1.84-2.73l-0.64-0.43C9.09,9.84,8.72,9.44,8.72,8.57c0-0.77,0.54-1.29,1.58-1.29h0.56v6.23h1.26V6.31H10.28z'\n }\n />\n </Svg>\n);\n"],"mappings":";;;AAGA,MAAa,mBAAmB,UAC9B,qBAAC,KAAD;CAAK,SAAQ;CAAY,OAAO;CAAI,QAAQ;CAAI,GAAI;CAApD,UAAA,CACE,oBAAC,UAAD;EAAQ,MAAK;EAAU,IAAG;EAAK,IAAG;EAAK,GAAE;CAAK,CAAA,GAC9C,oBAAC,QAAD;EACE,MAAK;EACL,GACE;CAEH,CAAA,CACE"}