@shmidko61/lc-ui-kit 0.6.0 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,90 +1,92 @@
1
- import { Accordion as a, AccordionItem as r, AccordionRoot as n } from "./accordion.js";
1
+ import { Accordion as r, AccordionItem as a, AccordionRoot as n } from "./accordion.js";
2
2
  import { Box as i } from "./box.js";
3
3
  import { Button as s, buttonSizeBorderRadius as p, buttonSizeBoxProps as l, buttonSizeClassNames as I, buttonVariantClassNames as d, buttonVariants as m } from "./button.js";
4
4
  import { U as x, u as b, a as f, b as u } from "./ui-kit-provider-C6Mk5g_7.js";
5
5
  import { Flex as C } from "./flex.js";
6
- import { Grid as M, GridItem as g } from "./grid.js";
7
- import { ArrowCornerIcon as y, ArrowIcon as B, BurgerIcon as P, CheckIcon as A, CopyIcon as w, DropDown as G, EyeOpenIcon as v, FileIcon as D, GeminiStarIcon as K, GeoIcon as U, LockClosedIcon as V, LockOpenIcon as z, LogoutIcon as F, MailIcon as L, MediaMaxIcon as N, MediaPictureIcon as R, MediaTgIcon as H, MediaVkIcon as O, MediaWaIcon as W, NetUploadIcon as j, PaperclipIcon as E, PhoneIcon as X, PlusIcon as q, SaveIcon as J, SparkIcon as Q, SparkleIcon as Y, TelephoneIcon as Z, TimeClockIcon as _, TrashIcon as $, XMarkIcon as oo } from "./icons.js";
8
- import { Input as ao } from "./input.js";
9
- import { MediaCard as no } from "./media-card.js";
10
- import { MediaGallery as io } from "./media-gallery.js";
11
- import { Pagination as so } from "./pagination.js";
12
- import { Picture as lo } from "./picture.js";
13
- import { Select as mo } from "./select.js";
14
- import { r as xo, a as bo } from "./responsive-style.config-DFuATrIM.js";
15
- import { StatusBadge as uo } from "./status-badge.js";
16
- import { Switch as Co } from "./switch.js";
17
- import { D as Mo, T as go, a as ho, b as yo, c as Bo, d as Po, e as Ao, f as wo, g as Go, h as vo, i as Do, j as Ko, k as Uo } from "./table-container-BsE-uIE1.js";
6
+ import { Grid as h, GridItem as S } from "./grid.js";
7
+ import { ArrowCornerIcon as y, ArrowIcon as B, ArrowLongLeftIcon as A, ArrowheadRightIcon as P, BurgerIcon as w, CheckIcon as G, CopyIcon as L, DropDown as v, EyeOpenIcon as D, FileIcon as K, GeminiStarIcon as R, GeoIcon as U, LockClosedIcon as V, LockOpenIcon as z, LogoutIcon as F, MailIcon as N, MediaMaxIcon as H, MediaPictureIcon as O, MediaTgIcon as W, MediaVkIcon as j, MediaWaIcon as E, NetUploadIcon as X, PaperclipIcon as q, PhoneIcon as J, PlusIcon as Q, SaveIcon as Y, SparkIcon as Z, SparkleIcon as _, TelephoneIcon as $, TimeClockIcon as oo, TrashIcon as eo, XMarkIcon as ro } from "./icons.js";
8
+ import { Input as no } from "./input.js";
9
+ import { MediaCard as io } from "./media-card.js";
10
+ import { MediaGallery as so } from "./media-gallery.js";
11
+ import { Pagination as lo } from "./pagination.js";
12
+ import { Picture as mo } from "./picture.js";
13
+ import { Select as xo } from "./select.js";
14
+ import { r as fo, a as uo } from "./responsive-style.config-DFuATrIM.js";
15
+ import { StatusBadge as Co } from "./status-badge.js";
16
+ import { Switch as ho } from "./switch.js";
17
+ import { D as Mo, T as yo, a as Bo, b as Ao, c as Po, d as wo, e as Go, f as Lo, g as vo, h as Do, i as Ko, j as Ro, k as Uo } from "./table-container-BsE-uIE1.js";
18
18
  import { Typography as zo, typographyVariants as Fo } from "./typography.js";
19
19
  export {
20
- a as Accordion,
21
- r as AccordionItem,
20
+ r as Accordion,
21
+ a as AccordionItem,
22
22
  n as AccordionRoot,
23
23
  y as ArrowCornerIcon,
24
24
  B as ArrowIcon,
25
+ A as ArrowLongLeftIcon,
26
+ P as ArrowheadRightIcon,
25
27
  i as Box,
26
- P as BurgerIcon,
28
+ w as BurgerIcon,
27
29
  s as Button,
28
- A as CheckIcon,
29
- w as CopyIcon,
30
+ G as CheckIcon,
31
+ L as CopyIcon,
30
32
  Mo as DataTable,
31
- G as DropDown,
32
- v as EyeOpenIcon,
33
- D as FileIcon,
33
+ v as DropDown,
34
+ D as EyeOpenIcon,
35
+ K as FileIcon,
34
36
  C as Flex,
35
- K as GeminiStarIcon,
37
+ R as GeminiStarIcon,
36
38
  U as GeoIcon,
37
- M as Grid,
38
- g as GridItem,
39
- ao as Input,
39
+ h as Grid,
40
+ S as GridItem,
41
+ no as Input,
40
42
  V as LockClosedIcon,
41
43
  z as LockOpenIcon,
42
44
  F as LogoutIcon,
43
- L as MailIcon,
44
- no as MediaCard,
45
- io as MediaGallery,
46
- N as MediaMaxIcon,
47
- R as MediaPictureIcon,
48
- H as MediaTgIcon,
49
- O as MediaVkIcon,
50
- W as MediaWaIcon,
51
- j as NetUploadIcon,
52
- so as Pagination,
53
- E as PaperclipIcon,
54
- X as PhoneIcon,
55
- lo as Picture,
56
- q as PlusIcon,
57
- J as SaveIcon,
58
- mo as Select,
59
- Q as SparkIcon,
60
- Y as SparkleIcon,
61
- uo as StatusBadge,
62
- Co as Switch,
63
- go as Table,
64
- ho as TableBody,
65
- yo as TableCaption,
66
- Bo as TableCell,
67
- Po as TableContainer,
68
- Ao as TableFooter,
69
- wo as TableHead,
70
- Go as TableHeader,
71
- vo as TableRow,
72
- Do as TableScrollArea,
73
- Ko as TableStatus,
45
+ N as MailIcon,
46
+ io as MediaCard,
47
+ so as MediaGallery,
48
+ H as MediaMaxIcon,
49
+ O as MediaPictureIcon,
50
+ W as MediaTgIcon,
51
+ j as MediaVkIcon,
52
+ E as MediaWaIcon,
53
+ X as NetUploadIcon,
54
+ lo as Pagination,
55
+ q as PaperclipIcon,
56
+ J as PhoneIcon,
57
+ mo as Picture,
58
+ Q as PlusIcon,
59
+ Y as SaveIcon,
60
+ xo as Select,
61
+ Z as SparkIcon,
62
+ _ as SparkleIcon,
63
+ Co as StatusBadge,
64
+ ho as Switch,
65
+ yo as Table,
66
+ Bo as TableBody,
67
+ Ao as TableCaption,
68
+ Po as TableCell,
69
+ wo as TableContainer,
70
+ Go as TableFooter,
71
+ Lo as TableHead,
72
+ vo as TableHeader,
73
+ Do as TableRow,
74
+ Ko as TableScrollArea,
75
+ Ro as TableStatus,
74
76
  Uo as TableToolbar,
75
- Z as TelephoneIcon,
76
- _ as TimeClockIcon,
77
- $ as TrashIcon,
77
+ $ as TelephoneIcon,
78
+ oo as TimeClockIcon,
79
+ eo as TrashIcon,
78
80
  zo as Typography,
79
81
  x as UiKitProvider,
80
- oo as XMarkIcon,
82
+ ro as XMarkIcon,
81
83
  p as buttonSizeBorderRadius,
82
84
  l as buttonSizeBoxProps,
83
85
  I as buttonSizeClassNames,
84
86
  d as buttonVariantClassNames,
85
87
  m as buttonVariants,
86
- xo as responsiveBreakpointMinWidth,
87
- bo as responsiveBreakpoints,
88
+ fo as responsiveBreakpointMinWidth,
89
+ uo as responsiveBreakpoints,
88
90
  Fo as typographyVariants,
89
91
  b as uiKitColorTokens,
90
92
  f as uiKitTypographyTokens,
@@ -1,10 +1,10 @@
1
1
  import { ChangeEventHandler, InputHTMLAttributes, JSX, ReactNode, TextareaHTMLAttributes } from 'react';
2
- import { InputPlaceholderProps } from './input.types';
3
- export type { InputPlaceholderProps, InputPlaceholderStyleProps } from './input.types';
2
+ import { InputPlaceholderProps, InputTextProps } from './input.types';
3
+ export type { InputPlaceholderProps, InputPlaceholderStyleProps, InputTextProps, InputTextStyleProps, } from './input.types';
4
4
  /** Варианты отображения поля ввода. */
5
5
  type InputVariant = 'default' | 'password' | 'textarea';
6
6
  /** Общие props для input и textarea режимов. */
7
- type InputBaseProps = {
7
+ type InputBaseProps = InputTextProps & {
8
8
  /** Оформление placeholder с overrides md, lg, xl; по умолчанию сохраняется стиль UI-kit. */
9
9
  placeholderProps?: InputPlaceholderProps;
10
10
  /** Класс внешнего контейнера с label, control и сообщением. */
@@ -47,6 +47,6 @@ export type InputProps = NativeInputProps | TextareaInputProps;
47
47
  * textarea. Label, helper/error text и иконки встроены в компонент, чтобы
48
48
  * приложения использовали единый визуальный и accessibility-паттерн.
49
49
  */
50
- export declare function Input({ className, containerClassName, disabled, error, helperText, id, label, leftIcon, placeholderProps, style, rightIcon, variant, ...props }: InputProps): JSX.Element;
50
+ export declare function Input({ className, containerClassName, disabled, error, helperText, id, label, leftIcon, fontSize, fontWeight, lineHeight, letterSpacing, fontFamily, md, lg, xl, placeholderProps, style, rightIcon, variant, ...props }: InputProps): JSX.Element;
51
51
  /** Универсальный тип change handler для input и textarea режимов. */
52
52
  export type InputChangeHandler = ChangeEventHandler<HTMLInputElement | HTMLTextAreaElement>;
@@ -1,5 +1,10 @@
1
1
  import { CSSProperties, ReactNode } from 'react';
2
- import { InputPlaceholderProps } from './input.types';
2
+ import { InputPlaceholderProps, InputTextProps } from './input.types';
3
+ /** Генерирует типографику control через общий механизм CSS-переменных. */
4
+ export declare function getInputTextPlan(props: InputTextProps): {
5
+ className: string;
6
+ style: CSSProperties;
7
+ };
3
8
  /** Генерирует CSS-переменные и responsive-классы только для заданных свойств подсказки. */
4
9
  export declare function getInputPlaceholderPlan(props?: InputPlaceholderProps): {
5
10
  className: string;
@@ -1,7 +1,22 @@
1
1
  import { ResponsiveStyleBreakpoint } from '../shared/responsive-style/responsive-style.types';
2
- import { TypographyColorValue, TypographyFontSizeValue, TypographyFontWeightValue } from '../types';
2
+ import { TypographyColorValue, TypographyFontSizeValue, TypographyFontWeightValue, TypographyLetterSpacingValue, TypographyLineHeightValue } from '../types';
3
+ /** Типографика текста поля; числовой lineHeight — безразмерный множитель. */
4
+ export type InputTextStyleProps = {
5
+ /** Размер текста: число в px, CSS-строка или токен. */
6
+ fontSize?: TypographyFontSizeValue;
7
+ /** Насыщенность текста или токен. */
8
+ fontWeight?: TypographyFontWeightValue;
9
+ /** Высота строки: множитель, CSS-строка или токен. */
10
+ lineHeight?: TypographyLineHeightValue;
11
+ /** Межбуквенное расстояние: число в px или CSS-строка; normal сбрасывает значение. */
12
+ letterSpacing?: TypographyLetterSpacingValue;
13
+ /** Семейство шрифта или токен; inherit возвращает наследование. */
14
+ fontFamily?: string;
15
+ };
16
+ /** Типографика control с наследованием отдельных свойств base → md → lg → xl. */
17
+ export type InputTextProps = InputTextStyleProps & Partial<Record<ResponsiveStyleBreakpoint, InputTextStyleProps>>;
3
18
  /** Оформление placeholder; не влияет на введённый текст. */
4
- export type InputPlaceholderStyleProps = {
19
+ export type InputPlaceholderStyleProps = InputTextStyleProps & {
5
20
  /** CSS-цвет или цветовой токен UI-kit. */
6
21
  color?: TypographyColorValue;
7
22
  /** Размер шрифта; число преобразуется в пиксели. */
package/dist/input.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),j=require("react"),q=require("./icons.cjs"),p=require("./responsive-style.config-B2m9jVlX.cjs"),w=require("./typography.cjs");function _(o){const n=[],s={};for(const a of[void 0,...p.responsiveBreakpoints]){const r=a?o?.[a]:o;if(!r)continue;const u={color:r.color,"font-size":r.fontSize,"font-weight":r.fontWeight,opacity:r.opacity,"font-style":r.italic===void 0?void 0:r.italic?"italic":"normal"};for(const[i,e]of Object.entries(u)){if(e===void 0)continue;const d=`--input-placeholder-${a?`${a}-`:""}${i}`;s[d]=typeof e=="string"&&e.startsWith("--")?`var(${e})`:i==="font-size"&&typeof e=="number"?`${e}px`:e,n.push(`${a?`${a}:`:""}placeholder:[${i}:var(${d})]`)}}return{className:n.join(" "),style:s}}function T(o,n){return o&&typeof o!="boolean"?o:n}const N="w-full rounded-[8px] border border-transparent bg-[var(--color-background-subtle)] px-4 text-[14px] font-normal leading-[120%] text-[var(--color-text-primary)] outline-none transition-colors placeholder:text-[var(--color-text-secondary)] focus-visible:border-[var(--color-primary-accent)] focus-visible:ring-2 focus-visible:ring-[color-mix(in_srgb,var(--color-primary-accent)_35%,transparent)] disabled:cursor-not-allowed disabled:opacity-50 [font-family:var(--font-family)] [&::-webkit-calendar-picker-indicator]:hidden [&::-webkit-calendar-picker-indicator]:appearance-none";function O({className:o,containerClassName:n,disabled:s,error:a=!1,helperText:r,id:u,label:i,leftIcon:e,placeholderProps:d,style:$,rightIcon:k,variant:x="default",...c}){const P=j.useId(),y=_(d),b={...y.style,...$},v=u??P,[g,z]=j.useState(!1),l=!!a,h=T(a,r),I=x==="textarea",m=x==="password",f=m?t.jsx("button",{"aria-label":g?"Скрыть значение":"Показать значение",disabled:s,type:"button",onClick:()=>z(S=>!S),children:t.jsx(q.EyeOpenIcon,{})}):k;return t.jsxs("div",{className:p.cn("grid w-full gap-2",n),children:[i?t.jsx(w.Typography,{as:"label",color:"--color-text-secondary",htmlFor:v,variant:"b3",children:i}):null,t.jsxs("div",{className:"relative w-full",children:[e&&t.jsx("span",{className:"pointer-events-none absolute left-4 top-1/2 flex -translate-y-1/2 text-[var(--color-text-secondary)] [&_svg]:size-5",children:e}),I?t.jsx("textarea",{...c,"aria-invalid":l||c["aria-invalid"],className:p.cn(N,y.className,"min-h-[109px] resize-y px-4 py-3",l&&"border-[var(--color-secondary-accent-2)] focus-visible:ring-[var(--color-secondary-accent-2)]",e&&"pl-12",o),disabled:s,style:b,id:v}):t.jsx("input",{...c,"aria-invalid":l||c["aria-invalid"],className:p.cn(N,y.className,"min-h-[42px] py-3",l&&"border-[var(--color-secondary-accent-2)] focus-visible:ring-[var(--color-secondary-accent-2)]",e&&"pl-12",f&&"pr-12",o),disabled:s,style:b,id:v,type:m&&!g?"password":c.type??"text"}),f&&t.jsx("span",{className:"absolute right-2 top-1/2 flex -translate-y-1/2 text-[var(--color-text-secondary)] [&_svg]:size-5",children:f})]}),h?t.jsx(w.Typography,{as:"p",color:l?"--color-secondary-accent-2":"--color-text-secondary",variant:"b3",children:h}):null]})}exports.Input=O;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),N=require("react"),V=require("./icons.cjs"),y=require("./responsive-style.config-B2m9jVlX.cjs"),$=require("./typography.cjs");function k(e,s){const i=[],c={};for(const r of[void 0,...y.responsiveBreakpoints]){const t=r?e?.[r]:e;if(!t)continue;const p={color:t.color,"font-size":t.fontSize,"font-weight":t.fontWeight,"line-height":t.lineHeight,"letter-spacing":t.letterSpacing,"font-family":t.fontFamily,opacity:t.opacity,"font-style":t.italic===void 0?void 0:t.italic?"italic":"normal"};for(const[a,o]of Object.entries(p)){if(o===void 0)continue;const u=`--input-${s?"placeholder":"text"}-${r?`${r}-`:""}${a}`;c[u]=typeof o=="string"&&o.startsWith("--")?`var(${o})`:(a==="font-size"||a==="letter-spacing")&&typeof o=="number"?`${o}px`:o,i.push(`${r?`${r}:`:""}${s?"placeholder:":""}[${a}:var(${u})]`)}}return{className:i.join(" "),style:c}}function W(e){return k(e,!1)}function H(e){return k(e,!0)}function A(e,s){return e&&typeof e!="boolean"?e:s}const P="w-full rounded-[8px] border border-transparent bg-[var(--color-background-subtle)] px-4 text-[14px] font-normal leading-[120%] text-[var(--color-text-primary)] outline-none transition-colors placeholder:text-[var(--color-text-secondary)] focus-visible:border-[var(--color-primary-accent)] focus-visible:ring-2 focus-visible:ring-[color-mix(in_srgb,var(--color-primary-accent)_35%,transparent)] disabled:cursor-not-allowed disabled:opacity-50 [font-family:var(--font-family)] [&::-webkit-calendar-picker-indicator]:hidden [&::-webkit-calendar-picker-indicator]:appearance-none";function D({className:e,containerClassName:s,disabled:i,error:c=!1,helperText:r,id:t,label:p,leftIcon:a,fontSize:o,fontWeight:u,lineHeight:I,letterSpacing:S,fontFamily:z,md:q,lg:T,xl:_,placeholderProps:O,style:R,rightIcon:B,variant:b="default",...l}){const C=N.useId(),f=H(O),v=W({fontSize:o,fontWeight:u,lineHeight:I,letterSpacing:S,fontFamily:z,md:q,lg:T,xl:_}),h={...v.style,...f.style,...R},x=t??C,[m,E]=N.useState(!1),d=!!c,j=A(c,r),F=b==="textarea",w=b==="password",g=w?n.jsx("button",{"aria-label":m?"Скрыть значение":"Показать значение",disabled:i,type:"button",onClick:()=>E(M=>!M),children:n.jsx(V.EyeOpenIcon,{})}):B;return n.jsxs("div",{className:y.cn("grid w-full gap-2",s),children:[p?n.jsx($.Typography,{as:"label",color:"--color-text-secondary",htmlFor:x,variant:"b3",children:p}):null,n.jsxs("div",{className:"relative w-full",children:[a&&n.jsx("span",{className:"pointer-events-none absolute left-4 top-1/2 flex -translate-y-1/2 text-[var(--color-text-secondary)] [&_svg]:size-5",children:a}),F?n.jsx("textarea",{...l,"aria-invalid":d||l["aria-invalid"],className:y.cn(P,f.className,v.className,"min-h-[109px] resize-y px-4 py-3",d&&"border-[var(--color-secondary-accent-2)] focus-visible:ring-[var(--color-secondary-accent-2)]",a&&"pl-12",e),disabled:i,style:h,id:x}):n.jsx("input",{...l,"aria-invalid":d||l["aria-invalid"],className:y.cn(P,f.className,v.className,"min-h-[42px] py-3",d&&"border-[var(--color-secondary-accent-2)] focus-visible:ring-[var(--color-secondary-accent-2)]",a&&"pl-12",g&&"pr-12",e),disabled:i,style:h,id:x,type:w&&!m?"password":l.type??"text"}),g&&n.jsx("span",{className:"absolute right-2 top-1/2 flex -translate-y-1/2 text-[var(--color-text-secondary)] [&_svg]:size-5",children:g})]}),j?n.jsx($.Typography,{as:"p",color:d?"--color-secondary-accent-2":"--color-text-secondary",variant:"b3",children:j}):null]})}exports.Input=D;
package/dist/input.js CHANGED
@@ -1,113 +1,141 @@
1
- import { jsxs as w, jsx as r } from "react/jsx-runtime";
2
- import { useId as S, useState as B } from "react";
3
- import { EyeOpenIcon as C } from "./icons.js";
4
- import { a as E, c as y } from "./responsive-style.config-DFuATrIM.js";
5
- import { Typography as N } from "./typography.js";
6
- function O(o) {
7
- const n = [], s = {};
8
- for (const t of [void 0, ...E]) {
9
- const a = t ? o?.[t] : o;
10
- if (!a) continue;
1
+ import { jsxs as $, jsx as r } from "react/jsx-runtime";
2
+ import { useId as M, useState as R } from "react";
3
+ import { EyeOpenIcon as q } from "./icons.js";
4
+ import { a as A, c as b } from "./responsive-style.config-DFuATrIM.js";
5
+ import { Typography as P } from "./typography.js";
6
+ function I(e, i) {
7
+ const s = [], l = {};
8
+ for (const n of [void 0, ...A]) {
9
+ const t = n ? e?.[n] : e;
10
+ if (!t) continue;
11
11
  const p = {
12
- color: a.color,
13
- "font-size": a.fontSize,
14
- "font-weight": a.fontWeight,
15
- opacity: a.opacity,
16
- "font-style": a.italic === void 0 ? void 0 : a.italic ? "italic" : "normal"
12
+ color: t.color,
13
+ "font-size": t.fontSize,
14
+ "font-weight": t.fontWeight,
15
+ "line-height": t.lineHeight,
16
+ "letter-spacing": t.letterSpacing,
17
+ "font-family": t.fontFamily,
18
+ opacity: t.opacity,
19
+ "font-style": t.italic === void 0 ? void 0 : t.italic ? "italic" : "normal"
17
20
  };
18
- for (const [i, e] of Object.entries(p)) {
19
- if (e === void 0) continue;
20
- const d = `--input-placeholder-${t ? `${t}-` : ""}${i}`;
21
- s[d] = typeof e == "string" && e.startsWith("--") ? `var(${e})` : i === "font-size" && typeof e == "number" ? `${e}px` : e, n.push(
22
- `${t ? `${t}:` : ""}placeholder:[${i}:var(${d})]`
21
+ for (const [a, o] of Object.entries(p)) {
22
+ if (o === void 0) continue;
23
+ const u = `--input-${i ? "placeholder" : "text"}-${n ? `${n}-` : ""}${a}`;
24
+ l[u] = typeof o == "string" && o.startsWith("--") ? `var(${o})` : (a === "font-size" || a === "letter-spacing") && typeof o == "number" ? `${o}px` : o, s.push(
25
+ `${n ? `${n}:` : ""}${i ? "placeholder:" : ""}[${a}:var(${u})]`
23
26
  );
24
27
  }
25
28
  }
26
- return { className: n.join(" "), style: s };
29
+ return { className: s.join(" "), style: l };
27
30
  }
28
- function T(o, n) {
29
- return o && typeof o != "boolean" ? o : n;
31
+ function D(e) {
32
+ return I(e, !1);
30
33
  }
31
- const $ = "w-full rounded-[8px] border border-transparent bg-[var(--color-background-subtle)] px-4 text-[14px] font-normal leading-[120%] text-[var(--color-text-primary)] outline-none transition-colors placeholder:text-[var(--color-text-secondary)] focus-visible:border-[var(--color-primary-accent)] focus-visible:ring-2 focus-visible:ring-[color-mix(in_srgb,var(--color-primary-accent)_35%,transparent)] disabled:cursor-not-allowed disabled:opacity-50 [font-family:var(--font-family)] [&::-webkit-calendar-picker-indicator]:hidden [&::-webkit-calendar-picker-indicator]:appearance-none";
32
- function q({
33
- className: o,
34
- containerClassName: n,
34
+ function G(e) {
35
+ return I(e, !0);
36
+ }
37
+ function J(e, i) {
38
+ return e && typeof e != "boolean" ? e : i;
39
+ }
40
+ const k = "w-full rounded-[8px] border border-transparent bg-[var(--color-background-subtle)] px-4 text-[14px] font-normal leading-[120%] text-[var(--color-text-primary)] outline-none transition-colors placeholder:text-[var(--color-text-secondary)] focus-visible:border-[var(--color-primary-accent)] focus-visible:ring-2 focus-visible:ring-[color-mix(in_srgb,var(--color-primary-accent)_35%,transparent)] disabled:cursor-not-allowed disabled:opacity-50 [font-family:var(--font-family)] [&::-webkit-calendar-picker-indicator]:hidden [&::-webkit-calendar-picker-indicator]:appearance-none";
41
+ function Y({
42
+ className: e,
43
+ containerClassName: i,
35
44
  disabled: s,
36
- error: t = !1,
37
- helperText: a,
38
- id: p,
39
- label: i,
40
- leftIcon: e,
41
- placeholderProps: d,
42
- style: k,
43
- rightIcon: z,
44
- variant: m = "default",
45
- ...l
45
+ error: l = !1,
46
+ helperText: n,
47
+ id: t,
48
+ label: p,
49
+ leftIcon: a,
50
+ fontSize: o,
51
+ fontWeight: u,
52
+ lineHeight: z,
53
+ letterSpacing: S,
54
+ fontFamily: j,
55
+ md: _,
56
+ lg: T,
57
+ xl: B,
58
+ placeholderProps: C,
59
+ style: E,
60
+ rightIcon: F,
61
+ variant: x = "default",
62
+ ...c
46
63
  }) {
47
- const P = S(), f = O(d), b = { ...f.style, ...k }, u = p ?? P, [x, I] = B(!1), c = !!t, h = T(t, a), j = m === "textarea", g = m === "password", v = g ? /* @__PURE__ */ r(
64
+ const O = M(), f = G(C), y = D({
65
+ fontSize: o,
66
+ fontWeight: u,
67
+ lineHeight: z,
68
+ letterSpacing: S,
69
+ fontFamily: j,
70
+ md: _,
71
+ lg: T,
72
+ xl: B
73
+ }), g = { ...y.style, ...f.style, ...E }, v = t ?? O, [h, V] = R(!1), d = !!l, w = J(l, n), W = x === "textarea", N = x === "password", m = N ? /* @__PURE__ */ r(
48
74
  "button",
49
75
  {
50
- "aria-label": x ? "Скрыть значение" : "Показать значение",
76
+ "aria-label": h ? "Скрыть значение" : "Показать значение",
51
77
  disabled: s,
52
78
  type: "button",
53
- onClick: () => I((_) => !_),
54
- children: /* @__PURE__ */ r(C, {})
79
+ onClick: () => V((H) => !H),
80
+ children: /* @__PURE__ */ r(q, {})
55
81
  }
56
- ) : z;
57
- return /* @__PURE__ */ w("div", { className: y("grid w-full gap-2", n), children: [
58
- i ? /* @__PURE__ */ r(N, { as: "label", color: "--color-text-secondary", htmlFor: u, variant: "b3", children: i }) : null,
59
- /* @__PURE__ */ w("div", { className: "relative w-full", children: [
60
- e && /* @__PURE__ */ r("span", { className: "pointer-events-none absolute left-4 top-1/2 flex -translate-y-1/2 text-[var(--color-text-secondary)] [&_svg]:size-5", children: e }),
61
- j ? /* @__PURE__ */ r(
82
+ ) : F;
83
+ return /* @__PURE__ */ $("div", { className: b("grid w-full gap-2", i), children: [
84
+ p ? /* @__PURE__ */ r(P, { as: "label", color: "--color-text-secondary", htmlFor: v, variant: "b3", children: p }) : null,
85
+ /* @__PURE__ */ $("div", { className: "relative w-full", children: [
86
+ a && /* @__PURE__ */ r("span", { className: "pointer-events-none absolute left-4 top-1/2 flex -translate-y-1/2 text-[var(--color-text-secondary)] [&_svg]:size-5", children: a }),
87
+ W ? /* @__PURE__ */ r(
62
88
  "textarea",
63
89
  {
64
- ...l,
65
- "aria-invalid": c || l["aria-invalid"],
66
- className: y(
67
- $,
90
+ ...c,
91
+ "aria-invalid": d || c["aria-invalid"],
92
+ className: b(
93
+ k,
68
94
  f.className,
95
+ y.className,
69
96
  "min-h-[109px] resize-y px-4 py-3",
70
- c && "border-[var(--color-secondary-accent-2)] focus-visible:ring-[var(--color-secondary-accent-2)]",
71
- e && "pl-12",
72
- o
97
+ d && "border-[var(--color-secondary-accent-2)] focus-visible:ring-[var(--color-secondary-accent-2)]",
98
+ a && "pl-12",
99
+ e
73
100
  ),
74
101
  disabled: s,
75
- style: b,
76
- id: u
102
+ style: g,
103
+ id: v
77
104
  }
78
105
  ) : /* @__PURE__ */ r(
79
106
  "input",
80
107
  {
81
- ...l,
82
- "aria-invalid": c || l["aria-invalid"],
83
- className: y(
84
- $,
108
+ ...c,
109
+ "aria-invalid": d || c["aria-invalid"],
110
+ className: b(
111
+ k,
85
112
  f.className,
113
+ y.className,
86
114
  "min-h-[42px] py-3",
87
- c && "border-[var(--color-secondary-accent-2)] focus-visible:ring-[var(--color-secondary-accent-2)]",
88
- e && "pl-12",
89
- v && "pr-12",
90
- o
115
+ d && "border-[var(--color-secondary-accent-2)] focus-visible:ring-[var(--color-secondary-accent-2)]",
116
+ a && "pl-12",
117
+ m && "pr-12",
118
+ e
91
119
  ),
92
120
  disabled: s,
93
- style: b,
94
- id: u,
95
- type: g && !x ? "password" : l.type ?? "text"
121
+ style: g,
122
+ id: v,
123
+ type: N && !h ? "password" : c.type ?? "text"
96
124
  }
97
125
  ),
98
- v && /* @__PURE__ */ r("span", { className: "absolute right-2 top-1/2 flex -translate-y-1/2 text-[var(--color-text-secondary)] [&_svg]:size-5", children: v })
126
+ m && /* @__PURE__ */ r("span", { className: "absolute right-2 top-1/2 flex -translate-y-1/2 text-[var(--color-text-secondary)] [&_svg]:size-5", children: m })
99
127
  ] }),
100
- h ? /* @__PURE__ */ r(
101
- N,
128
+ w ? /* @__PURE__ */ r(
129
+ P,
102
130
  {
103
131
  as: "p",
104
- color: c ? "--color-secondary-accent-2" : "--color-text-secondary",
132
+ color: d ? "--color-secondary-accent-2" : "--color-text-secondary",
105
133
  variant: "b3",
106
- children: h
134
+ children: w
107
135
  }
108
136
  ) : null
109
137
  ] });
110
138
  }
111
139
  export {
112
- q as Input
140
+ Y as Input
113
141
  };