@alphakits/ui 2.5.15 → 2.5.16

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.
@@ -1,149 +1,227 @@
1
- import { jsxs as a, jsx as e } from "react/jsx-runtime";
2
- import j from "@alphakits/icons/dist/EyeM";
3
- import B from "@alphakits/icons/dist/HeartStrokeM";
4
- import H from "@alphakits/icons/dist/PlusS";
5
- import L from "@alphakits/icons/dist/TrashM";
6
- import b, { forwardRef as D, useState as p, useRef as G } from "react";
7
- import { Button as O } from "../button/component.js";
8
- import { FlexColumns as q } from "../flex-columns/component.js";
9
- import { IconButton as m } from "../icon-button/component.js";
10
- import { Image as J } from "../image/component.js";
11
- import { ImageGallery as K } from "../image-gallery/component.js";
12
- import { Padding as Q } from "../padding/component.js";
13
- import { SuperListHeader as U } from "../super-list-header/component.js";
14
- import { Typography as k } from "../typography/component.js";
15
- import { getServiceError as V } from "../utils/get-service-error/index.js";
16
- import { showError as W } from "../utils/show-toast/index.js";
17
- import t from "./index.module.css.js";
18
- const de = D(
1
+ import { jsxs as f, jsx as o } from "react/jsx-runtime";
2
+ import or from "@alphakits/icons/dist/EyeS";
3
+ import tr from "@alphakits/icons/dist/HeartS";
4
+ import O from "@alphakits/icons/dist/PlusS";
5
+ import ar from "@alphakits/icons/dist/TrashS";
6
+ import A from "classnames";
7
+ import { forwardRef as nr, useState as m, useRef as P } from "react";
8
+ import { Button as sr } from "../button/component.js";
9
+ import { FlexColumns as ir } from "../flex-columns/component.js";
10
+ import { IconButton as y } from "../icon-button/component.js";
11
+ import { Image as cr } from "../image/component.js";
12
+ import { ImageGallery as lr } from "../image-gallery/component.js";
13
+ import { SuperListHeader as dr } from "../super-list-header/component.js";
14
+ import { Typography as L } from "../typography/component.js";
15
+ import { getServiceError as fr } from "../utils/get-service-error/index.js";
16
+ import { showError as pr } from "../utils/show-toast/index.js";
17
+ import a from "./index.module.css.js";
18
+ const w = "application/x-image-uploader-index", mr = (t, g, p) => {
19
+ if (g === p) return t;
20
+ const c = [...t], [N] = c.splice(g, 1);
21
+ return c.splice(p, 0, N), c;
22
+ }, br = nr(
19
23
  ({
20
- value: n = [],
21
- title: S,
22
- subtitle: d,
23
- columns: N = 3,
24
- onUpdate: f,
25
- uploadRequest: I,
26
- setMain: h,
27
- type: R,
28
- main: u,
29
- multiple: l,
30
- error: g,
31
- className: z,
32
- children: y
33
- }, T) => {
34
- const [A, w] = p(!1), [E, F] = p(), [v, C] = p(!1), s = G(null), M = (r, c) => {
35
- f(r.filter((i) => i !== c));
36
- }, x = async ({ target: { files: r } }) => {
37
- if (!r) return;
38
- const c = Array.from(r).map((i) => {
39
- const o = new FormData();
40
- return o.append("file", i), o.append("type", R), I({ data: o });
24
+ value: t = [],
25
+ title: g,
26
+ subtitle: p,
27
+ onUpdate: c,
28
+ uploadRequest: N,
29
+ setMain: S,
30
+ type: B,
31
+ main: k,
32
+ multiple: s,
33
+ error: v,
34
+ className: H,
35
+ children: z
36
+ }, M) => {
37
+ const [j, I] = m(!1), [G, K] = m(), [R, x] = m(!1), [W, h] = m(!1), [_, C] = m(null), u = P(null), d = P(0), D = () => u.current?.click(), E = async (r) => {
38
+ const e = Array.from(r).filter(
39
+ (l) => l.type.startsWith("image/") || /\.heic$/i.test(l.name)
40
+ );
41
+ if (!e.length) return;
42
+ const n = e.map((l) => {
43
+ const i = new FormData();
44
+ return i.append("file", l), i.append("type", B), N({ data: i });
41
45
  });
42
- C(!0);
46
+ x(!0);
43
47
  try {
44
- const o = (await Promise.all(c)).map(({ data: P }) => P.url);
45
- f(l ? [...n, ...o] : o);
46
- } catch (i) {
47
- const { message: o } = V(i);
48
- W(o);
48
+ const i = (await Promise.all(n)).map(({ data: er }) => er.url);
49
+ c(s ? [...t, ...i] : i.slice(0, 1));
50
+ } catch (l) {
51
+ const { message: i } = fr(l);
52
+ pr(i);
49
53
  } finally {
50
- s.current && (s.current.value = ""), C(!1);
54
+ u.current && (u.current.value = ""), x(!1);
51
55
  }
52
- };
53
- return /* @__PURE__ */ a("div", { className: z, children: [
54
- /* @__PURE__ */ e(
56
+ }, b = async ({ target: { files: r } }) => {
57
+ r && await E(r);
58
+ }, $ = (r, e) => {
59
+ c(r.filter((n) => n !== e));
60
+ }, q = (r, e) => {
61
+ c(mr(t, r, e));
62
+ }, J = (r) => {
63
+ r.preventDefault(), d.current += 1, h(!0);
64
+ }, Q = (r) => {
65
+ r.preventDefault(), d.current -= 1, d.current <= 0 && (d.current = 0, h(!1));
66
+ }, F = (r) => {
67
+ r.preventDefault(), r.dataTransfer.dropEffect = r.dataTransfer.types.includes(w) ? "move" : "copy";
68
+ }, V = async (r) => {
69
+ r.preventDefault(), r.stopPropagation(), d.current = 0, h(!1), !r.dataTransfer.getData(w) && r.dataTransfer.files?.length && await E(r.dataTransfer.files);
70
+ }, X = (r, e) => {
71
+ !s || t.length < 2 || (r.dataTransfer.setData(w, String(e)), r.dataTransfer.effectAllowed = "move", C(e));
72
+ }, Y = () => {
73
+ C(null);
74
+ }, Z = (r, e) => {
75
+ if (r.preventDefault(), r.stopPropagation(), d.current = 0, h(!1), r.dataTransfer.files?.length) {
76
+ E(r.dataTransfer.files);
77
+ return;
78
+ }
79
+ const n = Number(r.dataTransfer.getData(w));
80
+ Number.isNaN(n) || n === e || (q(n, e), C(null));
81
+ }, T = s || !t.length, U = !t.length, rr = !T;
82
+ return /* @__PURE__ */ f("div", { className: H, children: [
83
+ /* @__PURE__ */ o(
55
84
  "input",
56
85
  {
57
86
  type: "file",
58
87
  style: { height: 0, position: "absolute" },
59
- ref: T,
60
- onChange: x,
61
- multiple: l,
88
+ ref: M,
89
+ onChange: b,
90
+ multiple: s,
62
91
  accept: "image/*, .heic"
63
92
  }
64
93
  ),
65
- /* @__PURE__ */ e(
94
+ /* @__PURE__ */ o(
66
95
  "input",
67
96
  {
68
97
  type: "file",
69
98
  style: { height: 0, position: "absolute" },
70
- ref: s,
71
- onChange: x,
72
- multiple: l,
99
+ ref: u,
100
+ onChange: b,
101
+ multiple: s,
73
102
  accept: "image/*, .heic"
74
103
  }
75
104
  ),
76
- y ? /* @__PURE__ */ e(O, { view: "ghost", onClick: () => s.current?.click(), children: y({ value: n, loading: v }) }) : /* @__PURE__ */ a(b.Fragment, { children: [
77
- /* @__PURE__ */ e(
78
- U,
79
- {
80
- text: S,
81
- leftAddons: /* @__PURE__ */ e(
82
- m,
83
- {
84
- onClick: () => s.current?.click(),
85
- icon: H,
86
- loading: v
87
- }
88
- )
89
- }
90
- ),
91
- d && /* @__PURE__ */ e(k.Text, { view: "primary-small", color: "secondary", weight: "medium", children: d }),
92
- /* @__PURE__ */ e(Q, { padding: "4px 0", children: g && /* @__PURE__ */ e(k.Text, { view: "caps", color: "negative", weight: "medium", children: g }) }),
93
- /* @__PURE__ */ e(q, { columns: N, children: n.map((r, c) => /* @__PURE__ */ a(
94
- J,
95
- {
96
- className: t.image,
97
- src: r,
98
- size: "xl",
99
- view: "default",
100
- children: [
101
- /* @__PURE__ */ a("div", { className: t.controls, children: [
102
- !!h && u !== r && /* @__PURE__ */ e(
103
- m,
104
- {
105
- onClick: () => h(r),
106
- icon: B,
107
- size: "m",
108
- view: "secondary",
109
- className: t.icon
110
- }
111
- ),
112
- /* @__PURE__ */ e(
113
- m,
114
- {
115
- onClick: () => {
116
- F(c), w(!0);
117
- },
118
- icon: j,
119
- size: "m",
120
- view: "secondary",
121
- className: t.icon
122
- }
123
- ),
124
- /* @__PURE__ */ e(
125
- m,
126
- {
127
- onClick: () => M(n, r),
128
- icon: L,
129
- size: "m",
130
- view: "secondary",
131
- className: t.icon
132
- }
133
- )
134
- ] }),
135
- u === r && /* @__PURE__ */ e("div", { className: t.main, children: "MAIN" })
136
- ]
137
- },
138
- r
139
- )) }),
140
- /* @__PURE__ */ e(
141
- K,
105
+ z ? /* @__PURE__ */ o(sr, { view: "ghost", onClick: D, children: z({ value: t, loading: R }) }) : /* @__PURE__ */ f(ir, { columns: 1, gr: 12, gc: 0, children: [
106
+ /* @__PURE__ */ f("div", { className: a.header, children: [
107
+ /* @__PURE__ */ o(
108
+ dr,
109
+ {
110
+ text: g,
111
+ rightAddons: rr ? /* @__PURE__ */ o(
112
+ y,
113
+ {
114
+ onClick: D,
115
+ icon: O,
116
+ loading: R
117
+ }
118
+ ) : void 0
119
+ }
120
+ ),
121
+ p && /* @__PURE__ */ o(
122
+ L.Text,
123
+ {
124
+ view: "primary-small",
125
+ color: "secondary",
126
+ weight: "medium",
127
+ children: p
128
+ }
129
+ ),
130
+ v && /* @__PURE__ */ o(L.Text, { view: "caps", color: "negative", weight: "medium", children: v })
131
+ ] }),
132
+ (!!t.length || T) && /* @__PURE__ */ f("div", { className: a.grid, children: [
133
+ t.map((r, e) => /* @__PURE__ */ o(
134
+ "div",
135
+ {
136
+ className: A(a.card, {
137
+ [a.cardDragging]: _ === e
138
+ }),
139
+ draggable: s && t.length > 1,
140
+ onDragStart: (n) => X(n, e),
141
+ onDragEnd: Y,
142
+ onDragOver: F,
143
+ onDrop: (n) => Z(n, e),
144
+ children: /* @__PURE__ */ f(
145
+ cr,
146
+ {
147
+ className: a.thumbnail,
148
+ src: r,
149
+ size: "xl",
150
+ view: "default",
151
+ children: [
152
+ s && k === r && /* @__PURE__ */ o("div", { className: a.mainBadge, children: "MAIN" }),
153
+ /* @__PURE__ */ f(
154
+ "div",
155
+ {
156
+ className: a.controls,
157
+ onMouseDown: (n) => n.stopPropagation(),
158
+ children: [
159
+ s && !!S && k !== r && /* @__PURE__ */ o(
160
+ y,
161
+ {
162
+ onClick: () => S(r),
163
+ icon: tr,
164
+ size: "s",
165
+ className: a.action
166
+ }
167
+ ),
168
+ /* @__PURE__ */ o(
169
+ y,
170
+ {
171
+ onClick: () => {
172
+ K(e), I(!0);
173
+ },
174
+ icon: or,
175
+ size: "s",
176
+ className: a.action
177
+ }
178
+ ),
179
+ /* @__PURE__ */ o(
180
+ y,
181
+ {
182
+ onClick: () => $(t, r),
183
+ icon: ar,
184
+ size: "s",
185
+ className: a.action
186
+ }
187
+ )
188
+ ]
189
+ }
190
+ )
191
+ ]
192
+ }
193
+ )
194
+ },
195
+ r
196
+ )),
197
+ T && /* @__PURE__ */ o(
198
+ "div",
199
+ {
200
+ role: "button",
201
+ tabIndex: 0,
202
+ className: A(a.dropzone, {
203
+ [a.dropzoneActive]: W,
204
+ [a.dropzoneEmpty]: U
205
+ }),
206
+ onClick: D,
207
+ onKeyDown: (r) => {
208
+ (r.key === "Enter" || r.key === " ") && (r.preventDefault(), D());
209
+ },
210
+ onDragEnter: J,
211
+ onDragLeave: Q,
212
+ onDragOver: F,
213
+ onDrop: V,
214
+ children: /* @__PURE__ */ o(O, { className: a.dropzoneIcon })
215
+ }
216
+ )
217
+ ] }),
218
+ /* @__PURE__ */ o(
219
+ lr,
142
220
  {
143
- photos: n.map((r) => ({ src: r })),
144
- initialSlide: E || 0,
145
- open: A,
146
- onClose: () => w(!1)
221
+ photos: t.map((r) => ({ src: r })),
222
+ initialSlide: G || 0,
223
+ open: j,
224
+ onClose: () => I(!1)
147
225
  }
148
226
  )
149
227
  ] })
@@ -151,5 +229,5 @@ const de = D(
151
229
  }
152
230
  );
153
231
  export {
154
- de as ImageUploader
232
+ br as ImageUploader
155
233
  };
@@ -1 +1 @@
1
- .image_5Dvr{height:150px}.icon_Xtgb{background:var(--color-bg-primary-inverted);color:var(--color-text-primary-inverted);margin:4px}.controls_XUF4{position:absolute;inset:0;display:flex;background:var(--color-bg-primary-inverted);align-items:center;justify-content:center;opacity:0;z-index:3}.controls_XUF4:hover{opacity:1}.main_ZMTq{position:absolute;bottom:0;background:var(--color-bg-positive);width:100%;text-align:center;font-size:10px;text-transform:uppercase;padding:4px;z-index:4;color:var(--color-text-primary-inverted)}
1
+ .header_r6rI{display:flex;flex-direction:column;gap:4px}.header_r6rI>:first-child{min-height:0;min-height:initial;padding:0}.grid_xbZY{display:grid;grid-template-columns:repeat(auto-fill,minmax(112px,136px));grid-gap:12px;gap:12px}.card_Hah9,.dropzone_RCg5{width:100%;max-width:136px;height:80px;box-sizing:border-box}.card_Hah9{position:relative;cursor:grab;border-radius:var(--radius-s, 8px);overflow:hidden}.card_Hah9:active{cursor:grabbing}.cardDragging_0e1s{opacity:.45}.card_Hah9 .thumbnail_jtZG{width:100%!important;height:100%!important;min-width:0!important;min-height:0!important;max-width:none;border-radius:inherit!important;overflow:hidden}.card_Hah9 .thumbnail_jtZG>div{border-radius:inherit!important}.card_Hah9 .thumbnail_jtZG img{border-radius:inherit}.card_Hah9:hover .controls_XUF4{opacity:1}.controls_XUF4{position:absolute;top:0;right:0;left:0;display:flex;align-items:center;justify-content:flex-end;gap:3px;padding:4px 5px;background:linear-gradient(to bottom,rgba(15,20,25,.42),transparent);opacity:0;transition:opacity .15s ease;z-index:3}.action_q3U6{align-items:center!important;background:#fffffff0!important;border-radius:4px!important;box-shadow:0 1px 3px #00000047;color:#1c1c1e!important;display:inline-flex!important;flex-shrink:0;height:20px!important;justify-content:center!important;min-height:20px!important;min-width:20px!important;padding:0!important;width:20px!important}.action_q3U6:hover{background:#fff!important}.action_q3U6 span{height:12px!important;width:12px!important}.action_q3U6 svg,.action_q3U6 svg *{color:#1c1c1e!important;fill:currentColor!important;height:12px!important;width:12px!important}.mainBadge_kZlV{position:absolute;top:6px;left:6px;background:var(--color-bg-positive);border-radius:var(--radius-s, 8px);color:var(--color-text-primary-inverted);font-size:9px;font-weight:700;letter-spacing:.04em;line-height:1;padding:4px 6px;text-transform:uppercase;z-index:4}.dropzone_RCg5{align-items:center;background:var(--color-bg-secondary);border:1.5px dashed color-mix(in srgb,var(--color-graphic-secondary) 35%,transparent);border-radius:var(--radius-s, 8px);cursor:pointer;display:flex;justify-content:center;padding:0;transition:background .15s ease,border-color .15s ease}.dropzone_RCg5:hover{background:var(--color-bg-thirdly);border-color:color-mix(in srgb,var(--color-graphic-accent) 55%,transparent)}.dropzoneActive_z97l{background:color-mix(in srgb,var(--color-bg-accent) 8%,var(--color-bg-secondary));border-color:var(--color-graphic-accent)}.dropzoneEmpty_9tHX{max-width:136px}.dropzoneIcon_m3ug{color:var(--color-graphic-secondary)}.dropzoneActive_z97l .dropzoneIcon_m3ug{color:var(--color-graphic-accent)}
@@ -1,15 +1,31 @@
1
1
  import * as __css from './index.css';
2
2
  export const __cssModule = __css;
3
- const o = "image_5Dvr", n = "icon_Xtgb", t = "controls_XUF4", c = "main_ZMTq", s = {
4
- image: o,
5
- icon: n,
6
- controls: t,
7
- main: c
3
+ const o = "header_r6rI", n = "grid_xbZY", r = "card_Hah9", t = "dropzone_RCg5", c = "cardDragging_0e1s", d = "thumbnail_jtZG", e = "controls_XUF4", a = "action_q3U6", s = "mainBadge_kZlV", i = "dropzoneActive_z97l", g = "dropzoneEmpty_9tHX", p = "dropzoneIcon_m3ug", z = {
4
+ header: o,
5
+ grid: n,
6
+ card: r,
7
+ dropzone: t,
8
+ cardDragging: c,
9
+ thumbnail: d,
10
+ controls: e,
11
+ action: a,
12
+ mainBadge: s,
13
+ dropzoneActive: i,
14
+ dropzoneEmpty: g,
15
+ dropzoneIcon: p
8
16
  };
9
17
  export {
10
- t as controls,
11
- s as default,
12
- n as icon,
13
- o as image,
14
- c as main
18
+ a as action,
19
+ r as card,
20
+ c as cardDragging,
21
+ e as controls,
22
+ z as default,
23
+ t as dropzone,
24
+ i as dropzoneActive,
25
+ g as dropzoneEmpty,
26
+ p as dropzoneIcon,
27
+ n as grid,
28
+ o as header,
29
+ s as mainBadge,
30
+ d as thumbnail
15
31
  };
package/dist/index.d.ts CHANGED
@@ -69,6 +69,7 @@ export * from './radio-groups';
69
69
  export * from './section-wrapper';
70
70
  export * from './select';
71
71
  export * from './settings-hint';
72
+ export * from './settings-info-block';
72
73
  export * from './sidepanel';
73
74
  export * from './sidepanel-header';
74
75
  export * from './skeleton';
package/dist/index.js CHANGED
@@ -11,7 +11,7 @@ import { ButtonArrow as C } from "./button-arrow/component.js";
11
11
  import { Calendar as g } from "./calendar/component.js";
12
12
  import { useCalendar as E } from "./calendar/use-calendar.js";
13
13
  import { usePeriod as P } from "./calendar/use-period.js";
14
- import { DAYS_IN_WEEK as F, MONTHS_IN_YEAR as R, SUNDAY_INDEX as y, dateInLimits as B, limitDate as L, monthName as b, russianWeekDay as w } from "./calendar/utils.js";
14
+ import { DAYS_IN_WEEK as F, MONTHS_IN_YEAR as R, SUNDAY_INDEX as B, dateInLimits as y, limitDate as L, monthName as b, russianWeekDay as w } from "./calendar/utils.js";
15
15
  import { CalendarInput as N } from "./calendar-input/component.js";
16
16
  import { DATE_FORMAT as H, DATE_MASK as v, IS_BROWSER as G, NATIVE_DATE_FORMAT as U, SUPPORTS_INPUT_TYPE_DATE as q, isCompleteDateInput as z, isInputDateSupported as K, parseDateString as V } from "./calendar-input/utils.js";
17
17
  import { Card as J } from "./card/component.js";
@@ -31,7 +31,7 @@ import { Dot as go } from "./dot/component.js";
31
31
  import { EmptyPage as Eo } from "./empty-page/component.js";
32
32
  import { FilterTag as Po } from "./filter-tag/component.js";
33
33
  import { Flex as Fo } from "./flex/component.js";
34
- import { FlexColumns as yo } from "./flex-columns/component.js";
34
+ import { FlexColumns as Bo } from "./flex-columns/component.js";
35
35
  import { Footer as Lo } from "./footer/component.js";
36
36
  import { FiltersForm as wo } from "./form/templates/filters-form/index.js";
37
37
  import { FormControl as No } from "./form-control/component.js";
@@ -52,7 +52,7 @@ import { InfoBlockHeader as gr } from "./info-block-header/component.js";
52
52
  import { InfoBlockItem as Er } from "./info-block-item/component.js";
53
53
  import { InfoBlockWrapper as Pr } from "./info-block-wrapper/component.js";
54
54
  import { Input as Fr } from "./input/component.js";
55
- import { InputAutocomplete as yr } from "./input-autocomplete/component.js";
55
+ import { InputAutocomplete as Br } from "./input-autocomplete/component.js";
56
56
  import { InputGhost as Lr } from "./input-ghost/component.js";
57
57
  import { Link as wr } from "./link/component.js";
58
58
  import { ListAllert as Nr } from "./list-allert/component.js";
@@ -78,7 +78,7 @@ import { Radio as ge } from "./radio/component.js";
78
78
  import { RadioGroup as Ee } from "./radio-group/component.js";
79
79
  import { RadioGroups as Pe } from "./radio-groups/component.js";
80
80
  import { SectionWrapper as Fe } from "./section-wrapper/component.js";
81
- import { Select as ye } from "./select/component.js";
81
+ import { Select as Be } from "./select/component.js";
82
82
  import { Arrow as Le } from "./select/components/arrow/component.js";
83
83
  import { BaseSelect as we } from "./select/components/base-select/component.js";
84
84
  import { SelectField as Ne } from "./select/components/field/component.js";
@@ -90,45 +90,46 @@ import { useLazyLoading as je } from "./select/presets/use-lazy-loading/index.js
90
90
  import { useSelectWithLoading as Xe } from "./select/presets/use-select-with-loading/hook.js";
91
91
  import { convertToOptions as Ze, isGroup as $e, isOptionShape as ot, joinOptions as rt, lastIndexOf as et, processOptions as tt, useVisibleOptions as pt } from "./select/utils.js";
92
92
  import { SettingsHint as ft } from "./settings-hint/component.js";
93
- import { Sidepanel as xt } from "./sidepanel/component.js";
94
- import { SidepanelHeader as it } from "./sidepanel-header/component.js";
95
- import { Skeleton as ut } from "./skeleton/component.js";
96
- import { Space as dt } from "./space/component.js";
97
- import { Spinner as ct } from "./spinner/component.js";
98
- import { Stack as Ot } from "./stack/component.js";
99
- import { StackingContext as It, stackingOrder as At } from "./stack/context.js";
100
- import { Status as Dt } from "./status/component.js";
101
- import { SteppedProgressBar as kt, useSteps as Et } from "./stepped-progress-bar/index.js";
102
- import { Sticker as Pt } from "./sticker/component.js";
103
- import { SuffixInput as Ft } from "./suffix-input/component.js";
104
- import { SuperListHeader as yt } from "./super-list-header/component.js";
105
- import { SuperListItem as Lt } from "./super-list-item/component.js";
106
- import { Switch as wt } from "./switch/component.js";
107
- import { Table as Nt } from "./table/component.js";
108
- import { TableCell as Ht } from "./table/components/cell/component.js";
109
- import { TableStatus as Gt } from "./table-status/component.js";
110
- import { Tag as qt } from "./tag/component.js";
111
- import { TagsList as Kt } from "./tags-list/component.js";
112
- import { Textarea as jt } from "./textarea/component.js";
113
- import { LOACAL_STORAGE_THEME_KEY as Xt, STYLE_TAG_ID as Qt, THEME as Zt, THEME_DATA_ATTR as $t, ThemeProvider as op, useTheme as rp } from "./theme-provider/component.js";
114
- import { defaultThemes as tp } from "./theme-provider/default-themes.js";
115
- import { Toast as mp } from "./toast/component.js";
116
- import { ToastNotifier as ap } from "./toast-notifier/component.js";
117
- import { ToastPlate as sp } from "./toast-plate/component.js";
118
- import { Tooltip as np } from "./tooltip/component.js";
119
- import { Typography as lp } from "./typography/component.js";
120
- import { add as Sp, addDays as cp, addMonths as Tp, addYears as Op, eachDayOfInterval as hp, eachMonthOfInterval as Ip, eachYearOfInterval as Ap, endOfDay as Cp, endOfISOWeek as Dp, endOfWeek as gp, endOfYear as kp, format as Ep, isAfter as Mp, isBefore as Pp, isEqual as _p, isLastDayOfMonth as Fp, isSameDay as Rp, isSameMonth as yp, isSameYear as Bp, isThisMonth as Lp, isThisYear as bp, isToday as wp, isWithinInterval as Wp, lastDayOfMonth as Np, max as Yp, min as Hp, parse as vp, parseISO as Gp, startOfDay as Up, startOfISOWeek as qp, startOfMonth as zp, startOfWeek as Kp, startOfYear as Vp, subDays as jp, subMonths as Jp, subWeeks as Xp, subYears as Qp, weekDaysShort as Zp } from "./utils/date/index.js";
121
- import { debounce as om } from "./utils/debounce.js";
122
- import { AMOUNT_MAJOR_MINOR_PARTS_SEPARATOR as em, THINSP as tm, formatAmount as pm, isCurrencyFirst as mm } from "./utils/format-amount/util.js";
123
- import { formatDate as am, locales as xm } from "./utils/format-date/index.js";
124
- import { safeStringify as im } from "./utils/safe-stringify.js";
125
- import { showCompactSuccess as um, showError as lm, showSuccess as dm } from "./utils/show-toast/index.js";
126
- import { splitAmount as cm } from "./utils/split-amount/util.js";
127
- import { capitalize as Om } from "./utils/string.js";
128
- import { WelcomeContainer as Im } from "./welcome-layout/component.js";
129
- import { withSuffix as Cm } from "./with-suffix/component.js";
93
+ import { SettingsInfoBlock as xt } from "./settings-info-block/component.js";
94
+ import { Sidepanel as it } from "./sidepanel/component.js";
95
+ import { SidepanelHeader as ut } from "./sidepanel-header/component.js";
96
+ import { Skeleton as dt } from "./skeleton/component.js";
97
+ import { Space as ct } from "./space/component.js";
98
+ import { Spinner as Ot } from "./spinner/component.js";
99
+ import { Stack as It } from "./stack/component.js";
100
+ import { StackingContext as Ct, stackingOrder as Dt } from "./stack/context.js";
101
+ import { Status as kt } from "./status/component.js";
102
+ import { SteppedProgressBar as Mt, useSteps as Pt } from "./stepped-progress-bar/index.js";
103
+ import { Sticker as Ft } from "./sticker/component.js";
104
+ import { SuffixInput as Bt } from "./suffix-input/component.js";
105
+ import { SuperListHeader as Lt } from "./super-list-header/component.js";
106
+ import { SuperListItem as wt } from "./super-list-item/component.js";
107
+ import { Switch as Nt } from "./switch/component.js";
108
+ import { Table as Ht } from "./table/component.js";
109
+ import { TableCell as Gt } from "./table/components/cell/component.js";
110
+ import { TableStatus as qt } from "./table-status/component.js";
111
+ import { Tag as Kt } from "./tag/component.js";
112
+ import { TagsList as jt } from "./tags-list/component.js";
113
+ import { Textarea as Xt } from "./textarea/component.js";
114
+ import { LOACAL_STORAGE_THEME_KEY as Zt, STYLE_TAG_ID as $t, THEME as op, THEME_DATA_ATTR as rp, ThemeProvider as ep, useTheme as tp } from "./theme-provider/component.js";
115
+ import { defaultThemes as mp } from "./theme-provider/default-themes.js";
116
+ import { Toast as ap } from "./toast/component.js";
117
+ import { ToastNotifier as sp } from "./toast-notifier/component.js";
118
+ import { ToastPlate as np } from "./toast-plate/component.js";
119
+ import { Tooltip as lp } from "./tooltip/component.js";
120
+ import { Typography as Sp } from "./typography/component.js";
121
+ import { add as Tp, addDays as Op, addMonths as hp, addYears as Ip, eachDayOfInterval as Ap, eachMonthOfInterval as Cp, eachYearOfInterval as Dp, endOfDay as gp, endOfISOWeek as kp, endOfWeek as Ep, endOfYear as Mp, format as Pp, isAfter as _p, isBefore as Fp, isEqual as Rp, isLastDayOfMonth as Bp, isSameDay as yp, isSameMonth as Lp, isSameYear as bp, isThisMonth as wp, isThisYear as Wp, isToday as Np, isWithinInterval as Yp, lastDayOfMonth as Hp, max as vp, min as Gp, parse as Up, parseISO as qp, startOfDay as zp, startOfISOWeek as Kp, startOfMonth as Vp, startOfWeek as jp, startOfYear as Jp, subDays as Xp, subMonths as Qp, subWeeks as Zp, subYears as $p, weekDaysShort as om } from "./utils/date/index.js";
122
+ import { debounce as em } from "./utils/debounce.js";
123
+ import { AMOUNT_MAJOR_MINOR_PARTS_SEPARATOR as pm, THINSP as mm, formatAmount as fm, isCurrencyFirst as am } from "./utils/format-amount/util.js";
124
+ import { formatDate as sm, locales as im } from "./utils/format-date/index.js";
125
+ import { safeStringify as um } from "./utils/safe-stringify.js";
126
+ import { showCompactSuccess as dm, showError as Sm, showSuccess as cm } from "./utils/show-toast/index.js";
127
+ import { splitAmount as Om } from "./utils/split-amount/util.js";
128
+ import { capitalize as Im } from "./utils/string.js";
129
+ import { WelcomeContainer as Cm } from "./welcome-layout/component.js";
130
+ import { withSuffix as gm } from "./with-suffix/component.js";
130
131
  export {
131
- em as AMOUNT_MAJOR_MINOR_PARTS_SEPARATOR,
132
+ pm as AMOUNT_MAJOR_MINOR_PARTS_SEPARATOR,
132
133
  e as Amount,
133
134
  p as AmountInput,
134
135
  Le as Arrow,
@@ -168,7 +169,7 @@ export {
168
169
  Po as FilterTag,
169
170
  wo as FiltersForm,
170
171
  Fo as Flex,
171
- yo as FlexColumns,
172
+ Bo as FlexColumns,
172
173
  Lo as Footer,
173
174
  qo as Form,
174
175
  No as FormControl,
@@ -185,9 +186,9 @@ export {
185
186
  Er as InfoBlockItem,
186
187
  Pr as InfoBlockWrapper,
187
188
  Fr as Input,
188
- yr as InputAutocomplete,
189
+ Br as InputAutocomplete,
189
190
  Lr as InputGhost,
190
- Xt as LOACAL_STORAGE_THEME_KEY,
191
+ Zt as LOACAL_STORAGE_THEME_KEY,
191
192
  ue as LabeledButton,
192
193
  wr as Link,
193
194
  Nr as ListAllert,
@@ -219,111 +220,112 @@ export {
219
220
  Pe as RadioGroups,
220
221
  T as Radiuses,
221
222
  or as Row,
222
- Qt as STYLE_TAG_ID,
223
- y as SUNDAY_INDEX,
223
+ $t as STYLE_TAG_ID,
224
+ B as SUNDAY_INDEX,
224
225
  q as SUPPORTS_INPUT_TYPE_DATE,
225
226
  Fe as SectionWrapper,
226
- ye as Select,
227
+ Be as Select,
227
228
  Ne as SelectField,
228
229
  ft as SettingsHint,
229
- xt as Sidepanel,
230
- it as SidepanelHeader,
231
- ut as Skeleton,
232
- dt as Space,
230
+ xt as SettingsInfoBlock,
231
+ it as Sidepanel,
232
+ ut as SidepanelHeader,
233
+ dt as Skeleton,
234
+ ct as Space,
233
235
  O as Spaces,
234
- ct as Spinner,
235
- Ot as Stack,
236
- It as StackingContext,
237
- Dt as Status,
238
- kt as SteppedProgressBar,
239
- Pt as Sticker,
240
- Ft as SuffixInput,
241
- yt as SuperListHeader,
242
- Lt as SuperListItem,
243
- wt as Switch,
244
- Zt as THEME,
245
- $t as THEME_DATA_ATTR,
246
- tm as THINSP,
247
- Nt as Table,
248
- Ht as TableCell,
249
- Gt as TableStatus,
250
- qt as Tag,
251
- Kt as TagsList,
252
- jt as Textarea,
253
- op as ThemeProvider,
254
- mp as Toast,
255
- ap as ToastNotifier,
256
- sp as ToastPlate,
257
- np as Tooltip,
258
- lp as Typography,
236
+ Ot as Spinner,
237
+ It as Stack,
238
+ Ct as StackingContext,
239
+ kt as Status,
240
+ Mt as SteppedProgressBar,
241
+ Ft as Sticker,
242
+ Bt as SuffixInput,
243
+ Lt as SuperListHeader,
244
+ wt as SuperListItem,
245
+ Nt as Switch,
246
+ op as THEME,
247
+ rp as THEME_DATA_ATTR,
248
+ mm as THINSP,
249
+ Ht as Table,
250
+ Gt as TableCell,
251
+ qt as TableStatus,
252
+ Kt as Tag,
253
+ jt as TagsList,
254
+ Xt as Textarea,
255
+ ep as ThemeProvider,
256
+ ap as Toast,
257
+ sp as ToastNotifier,
258
+ np as ToastPlate,
259
+ lp as Tooltip,
260
+ Sp as Typography,
259
261
  Ke as VirtualOptionsList,
260
- Im as WelcomeContainer,
261
- Sp as add,
262
- cp as addDays,
263
- Tp as addMonths,
264
- Op as addYears,
265
- Om as capitalize,
262
+ Cm as WelcomeContainer,
263
+ Tp as add,
264
+ Op as addDays,
265
+ hp as addMonths,
266
+ Ip as addYears,
267
+ Im as capitalize,
266
268
  Ko as connect,
267
269
  Ze as convertToOptions,
268
- B as dateInLimits,
269
- om as debounce,
270
- tp as defaultThemes,
271
- hp as eachDayOfInterval,
272
- Ip as eachMonthOfInterval,
273
- Ap as eachYearOfInterval,
274
- Cp as endOfDay,
275
- Dp as endOfISOWeek,
276
- gp as endOfWeek,
277
- kp as endOfYear,
278
- Ep as format,
279
- pm as formatAmount,
280
- am as formatDate,
281
- Mp as isAfter,
282
- Pp as isBefore,
270
+ y as dateInLimits,
271
+ em as debounce,
272
+ mp as defaultThemes,
273
+ Ap as eachDayOfInterval,
274
+ Cp as eachMonthOfInterval,
275
+ Dp as eachYearOfInterval,
276
+ gp as endOfDay,
277
+ kp as endOfISOWeek,
278
+ Ep as endOfWeek,
279
+ Mp as endOfYear,
280
+ Pp as format,
281
+ fm as formatAmount,
282
+ sm as formatDate,
283
+ _p as isAfter,
284
+ Fp as isBefore,
283
285
  z as isCompleteDateInput,
284
- mm as isCurrencyFirst,
285
- _p as isEqual,
286
+ am as isCurrencyFirst,
287
+ Rp as isEqual,
286
288
  $e as isGroup,
287
289
  K as isInputDateSupported,
288
- Fp as isLastDayOfMonth,
290
+ Bp as isLastDayOfMonth,
289
291
  ot as isOptionShape,
290
- Rp as isSameDay,
291
- yp as isSameMonth,
292
- Bp as isSameYear,
293
- Lp as isThisMonth,
294
- bp as isThisYear,
295
- wp as isToday,
296
- Wp as isWithinInterval,
292
+ yp as isSameDay,
293
+ Lp as isSameMonth,
294
+ bp as isSameYear,
295
+ wp as isThisMonth,
296
+ Wp as isThisYear,
297
+ Np as isToday,
298
+ Yp as isWithinInterval,
297
299
  rt as joinOptions,
298
- Np as lastDayOfMonth,
300
+ Hp as lastDayOfMonth,
299
301
  et as lastIndexOf,
300
302
  L as limitDate,
301
- xm as locales,
302
- Yp as max,
303
- Hp as min,
303
+ im as locales,
304
+ vp as max,
305
+ Gp as min,
304
306
  b as monthName,
305
- vp as parse,
307
+ Up as parse,
306
308
  V as parseDateString,
307
- Gp as parseISO,
309
+ qp as parseISO,
308
310
  tt as processOptions,
309
311
  w as russianWeekDay,
310
- im as safeStringify,
312
+ um as safeStringify,
311
313
  io as showAlert,
312
- um as showCompactSuccess,
314
+ dm as showCompactSuccess,
313
315
  no as showConfirm,
314
- lm as showError,
315
- dm as showSuccess,
316
- cm as splitAmount,
317
- At as stackingOrder,
318
- Up as startOfDay,
319
- qp as startOfISOWeek,
320
- zp as startOfMonth,
321
- Kp as startOfWeek,
322
- Vp as startOfYear,
323
- jp as subDays,
324
- Jp as subMonths,
325
- Xp as subWeeks,
326
- Qp as subYears,
316
+ Sm as showError,
317
+ cm as showSuccess,
318
+ Om as splitAmount,
319
+ Dt as stackingOrder,
320
+ zp as startOfDay,
321
+ Kp as startOfISOWeek,
322
+ Vp as startOfMonth,
323
+ jp as startOfWeek,
324
+ Jp as startOfYear,
325
+ Xp as subDays,
326
+ Qp as subMonths,
327
+ Zp as subWeeks,
328
+ $p as subYears,
327
329
  Or as textSizes,
328
330
  E as useCalendar,
329
331
  xr as useClickOutside,
@@ -338,10 +340,10 @@ export {
338
340
  P as usePeriod,
339
341
  ur as usePrevious,
340
342
  Xe as useSelectWithLoading,
341
- Et as useSteps,
342
- rp as useTheme,
343
+ Pt as useSteps,
344
+ tp as useTheme,
343
345
  pt as useVisibleOptions,
344
- Zp as weekDaysShort,
346
+ om as weekDaysShort,
345
347
  Xo as withFormik,
346
- Cm as withSuffix
348
+ gm as withSuffix
347
349
  };
@@ -1,17 +1,17 @@
1
- import { jsx as o, jsxs as Ne } from "react/jsx-runtime";
1
+ import { jsx as o, jsxs as Be } from "react/jsx-runtime";
2
2
  import I from "classnames";
3
- import Be from "@alphakits/icons/dist/CancelM";
4
- import $e from "@alphakits/icons/dist/AlertCircleM";
5
- import ke from "@alphakits/icons/dist/CheckmarkCircleM";
6
- import ye from "@alphakits/icons/dist/EyeM";
7
- import Fe, { useRef as xe, useId as je, useState as k, useMemo as He, useCallback as u, Fragment as Pe } from "react";
8
- import Te from "react-merge-refs";
3
+ import $e from "@alphakits/icons/dist/CancelM";
4
+ import ke from "@alphakits/icons/dist/AlertCircleM";
5
+ import ye from "@alphakits/icons/dist/CheckmarkCircleM";
6
+ import Fe from "@alphakits/icons/dist/EyeM";
7
+ import xe, { useRef as je, useId as He, useState as k, useMemo as Pe, useCallback as u, Fragment as Te } from "react";
8
+ import Ae from "react-merge-refs";
9
9
  import { Button as E } from "../button/component.js";
10
- import { FormControl as Ae } from "../form-control/component.js";
11
- import { useFocus as Ce } from "../hooks/useFocus/index.js";
10
+ import { FormControl as Ce } from "../form-control/component.js";
11
+ import { useFocus as Se } from "../hooks/useFocus/index.js";
12
12
  import s from "./index.module.css.js";
13
- import { getDefaultInputMode as Se } from "./utils/get-default-input-mode.js";
14
- const Ze = Fe.forwardRef(
13
+ import { getDefaultInputMode as De } from "./utils/get-default-input-mode.js";
14
+ const _e = xe.forwardRef(
15
15
  ({
16
16
  size: q = "m",
17
17
  type: b = "text",
@@ -51,27 +51,28 @@ const Ze = Fe.forwardRef(
51
51
  inputMode: ie,
52
52
  enterKeyHint: re,
53
53
  id: ne,
54
- ...ce
55
- }, le) => {
56
- const l = H === void 0, n = xe(null), de = je(), [ue] = Ce(n, "keyboard"), [h, P] = k(!1), [fe, T] = k(se || ""), [p, me] = k(!1), d = ne ?? de, A = m ? `${d}-label` : void 0, w = i || f ? `${d}-hint` : void 0, M = t && typeof t == "string" ? `${d}-error` : void 0, N = l ? fe : H ?? "", B = !!N, C = typeof t == "string" ? t : "", pe = He(
54
+ autoComplete: ce = "off",
55
+ ...le
56
+ }, de) => {
57
+ const l = H === void 0, n = je(null), ue = He(), [fe] = Se(n, "keyboard"), [h, P] = k(!1), [me, T] = k(se || ""), [p, pe] = k(!1), d = ne ?? ue, A = m ? `${d}-label` : void 0, w = i || f ? `${d}-hint` : void 0, M = t && typeof t == "string" ? `${d}-error` : void 0, N = l ? me : H ?? "", B = !!N, C = typeof t == "string" ? t : "", ve = Pe(
57
58
  () => [C ? M : null, i || f ? w : null].filter(Boolean).join(" ") || void 0,
58
59
  [C, M, i, f, w]
59
- ), $ = f ? `${N.length}/${x}` : "", ve = i && $ ? `${i} · ${$}` : $ || i, S = b === "password", D = S && ae && !a && !c, Ie = S && p ? "text" : b, be = ie ?? Se(b), v = K && B && !a && !c, ge = u(
60
+ ), $ = f ? `${N.length}/${x}` : "", Ie = i && $ ? `${i} · ${$}` : $ || i, S = b === "password", D = S && ae && !a && !c, be = S && p ? "text" : b, ge = ie ?? De(b), v = K && B && !a && !c, Re = u(
60
61
  (e) => {
61
62
  c || P(!0), g && g(e);
62
63
  },
63
64
  [g, c]
64
- ), Re = u(
65
+ ), Ve = u(
65
66
  (e) => {
66
67
  P(!1), R && R(e);
67
68
  },
68
69
  [R]
69
- ), Ve = u(
70
+ ), he = u(
70
71
  (e) => {
71
72
  r && r(e, { value: e.target.value }), l && T(e.target.value);
72
73
  },
73
74
  [r, l]
74
- ), he = u(
75
+ ), we = u(
75
76
  (e) => {
76
77
  v && (l && T(""), r && r(
77
78
  {
@@ -83,9 +84,9 @@ const Ze = Fe.forwardRef(
83
84
  ), V && V(e), n.current?.focus());
84
85
  },
85
86
  [v, r, V, l]
86
- ), we = u(() => {
87
- me((e) => !e), n.current?.focus();
88
- }, []), Me = () => (v || j || y || t || D) && /* @__PURE__ */ Ne(Pe, { children: [
87
+ ), Me = u(() => {
88
+ pe((e) => !e), n.current?.focus();
89
+ }, []), Ne = () => (v || j || y || t || D) && /* @__PURE__ */ Be(Te, { children: [
89
90
  v && /* @__PURE__ */ o(
90
91
  E,
91
92
  {
@@ -94,8 +95,8 @@ const Ze = Fe.forwardRef(
94
95
  disabled: a,
95
96
  "aria-label": "Очистить",
96
97
  className: s.clearButton,
97
- onClick: he,
98
- children: /* @__PURE__ */ o(Be, { className: s.clearIcon, "aria-hidden": "true" })
98
+ onClick: we,
99
+ children: /* @__PURE__ */ o($e, { className: s.clearIcon, "aria-hidden": "true" })
99
100
  }
100
101
  ),
101
102
  D && /* @__PURE__ */ o(
@@ -107,9 +108,9 @@ const Ze = Fe.forwardRef(
107
108
  "aria-label": p ? "Скрыть пароль" : "Показать пароль",
108
109
  "aria-pressed": p,
109
110
  className: s.passwordRevealButton,
110
- onClick: we,
111
+ onClick: Me,
111
112
  children: /* @__PURE__ */ o(
112
- ye,
113
+ Fe,
113
114
  {
114
115
  className: I(s.passwordRevealIcon, {
115
116
  [s.passwordRevealIconHidden]: p
@@ -119,17 +120,17 @@ const Ze = Fe.forwardRef(
119
120
  )
120
121
  }
121
122
  ),
122
- t && /* @__PURE__ */ o($e, { className: s.errorIcon, "aria-hidden": "true" }),
123
- y && !t && /* @__PURE__ */ o(ke, { className: s.successIcon, "aria-hidden": "true" }),
123
+ t && /* @__PURE__ */ o(ke, { className: s.errorIcon, "aria-hidden": "true" }),
124
+ y && !t && /* @__PURE__ */ o(ye, { className: s.successIcon, "aria-hidden": "true" }),
124
125
  j
125
126
  ] });
126
127
  return /* @__PURE__ */ o(
127
- Ae,
128
+ Ce,
128
129
  {
129
130
  ref: oe,
130
131
  className: I(L, h && Y, B && Z),
131
132
  fieldClassName: I(Q, {
132
- [s.focusVisible]: ue
133
+ [s.focusVisible]: fe
133
134
  }),
134
135
  labelClassName: W,
135
136
  addonsClassName: X,
@@ -141,13 +142,13 @@ const Ze = Fe.forwardRef(
141
142
  focused: h,
142
143
  error: t,
143
144
  label: m,
144
- hint: ve,
145
+ hint: Ie,
145
146
  inputId: d,
146
147
  labelId: A,
147
148
  hintId: w,
148
149
  errorId: M,
149
150
  leftAddons: _,
150
- rightAddons: Me(),
151
+ rightAddons: Ne(),
151
152
  bottomAddons: G,
152
153
  onClick: O,
153
154
  onMouseDown: ee,
@@ -155,7 +156,8 @@ const Ze = Fe.forwardRef(
155
156
  children: /* @__PURE__ */ o(
156
157
  "input",
157
158
  {
158
- ...ce,
159
+ ...le,
160
+ autoComplete: ce,
159
161
  id: d,
160
162
  className: I(
161
163
  s.input,
@@ -165,21 +167,21 @@ const Ze = Fe.forwardRef(
165
167
  U
166
168
  ),
167
169
  disabled: a,
168
- onBlur: Re,
169
- onFocus: ge,
170
- onChange: Ve,
170
+ onBlur: Ve,
171
+ onFocus: Re,
172
+ onChange: he,
171
173
  maxLength: x,
172
- ref: Te([le, n]),
173
- type: Ie,
174
+ ref: Ae([de, n]),
175
+ type: be,
174
176
  value: N,
175
177
  readOnly: c,
176
- inputMode: be,
178
+ inputMode: ge,
177
179
  enterKeyHint: re,
178
180
  "data-test-id": J,
179
181
  "data-error": !!t,
180
182
  "aria-invalid": t ? !0 : void 0,
181
183
  "aria-required": F || void 0,
182
- "aria-describedby": pe,
184
+ "aria-describedby": ve,
183
185
  "aria-labelledby": m ? A : void 0
184
186
  }
185
187
  )
@@ -188,5 +190,5 @@ const Ze = Fe.forwardRef(
188
190
  }
189
191
  );
190
192
  export {
191
- Ze as Input
193
+ _e as Input
192
194
  };
@@ -1,6 +1,6 @@
1
1
  import { jsxs as i, jsx as o } from "react/jsx-runtime";
2
- import c from "@alphakits/icons/dist/SearchM";
3
- import l from "classnames";
2
+ import l from "@alphakits/icons/dist/SearchM";
3
+ import c from "classnames";
4
4
  import t from "./index.module.css.js";
5
5
  const x = ({
6
6
  value: e,
@@ -9,11 +9,12 @@ const x = ({
9
9
  leftAddons: m,
10
10
  block: n,
11
11
  size: p = "m"
12
- }) => /* @__PURE__ */ i("div", { className: l(t.input, t[p], { [t.block]: n }), children: [
13
- /* @__PURE__ */ o("span", { className: t.leftAddons, children: m || /* @__PURE__ */ o(c, {}) }),
12
+ }) => /* @__PURE__ */ i("div", { className: c(t.input, t[p], { [t.block]: n }), children: [
13
+ /* @__PURE__ */ o("span", { className: t.leftAddons, children: m || /* @__PURE__ */ o(l, {}) }),
14
14
  /* @__PURE__ */ o(
15
15
  "input",
16
16
  {
17
+ autoComplete: "off",
17
18
  value: e,
18
19
  onChange: (a) => {
19
20
  r(a.target.value);
@@ -0,0 +1,16 @@
1
+ import { default as React } from 'react';
2
+ export type SettingsInfoBlockView = 'accent' | 'positive' | 'attention' | 'neutral';
3
+ export type SettingsInfoBlockProps = {
4
+ title?: string;
5
+ description?: string | React.ReactNode;
6
+ text?: string;
7
+ view?: SettingsInfoBlockView;
8
+ icon?: React.ComponentType<React.SVGProps<SVGSVGElement>>;
9
+ actionLabel?: string;
10
+ onAction?: () => void;
11
+ actionHref?: string;
12
+ action?: React.ReactNode;
13
+ className?: string;
14
+ dataTestId?: string;
15
+ };
16
+ export declare const SettingsInfoBlock: React.FC<SettingsInfoBlockProps>;
@@ -0,0 +1,78 @@
1
+ import { jsxs as c, jsx as t } from "react/jsx-runtime";
2
+ import f from "@alphakits/icons/dist/InfoMarkS";
3
+ import g from "classnames";
4
+ import { Typography as p } from "../typography/component.js";
5
+ import i from "./index.module.css.js";
6
+ const y = ({
7
+ title: e,
8
+ description: n,
9
+ text: o
10
+ }) => {
11
+ const r = typeof o == "string" ? o.split(`
12
+ `).filter(Boolean) : [];
13
+ return {
14
+ title: e ?? r[0],
15
+ description: n ?? (r.length > 1 ? r.slice(1).join(`
16
+ `) : void 0)
17
+ };
18
+ }, k = ({ label: e, href: n, onClick: o }) => n ? /* @__PURE__ */ t("a", { href: n, className: i.actionLink, children: e }) : /* @__PURE__ */ t("button", { type: "button", className: i.actionLink, onClick: o, children: e }), T = ({
19
+ title: e,
20
+ description: n,
21
+ text: o,
22
+ view: r = "accent",
23
+ icon: h = f,
24
+ actionLabel: l,
25
+ onAction: a,
26
+ actionHref: d,
27
+ action: m,
28
+ className: v,
29
+ dataTestId: u
30
+ }) => {
31
+ const s = y({ title: e, description: n, text: o }), N = !!s.description;
32
+ return /* @__PURE__ */ c(
33
+ "div",
34
+ {
35
+ className: g(
36
+ i.component,
37
+ i[r],
38
+ { [i.withDescription]: N },
39
+ v
40
+ ),
41
+ "data-test-id": u,
42
+ role: "note",
43
+ children: [
44
+ /* @__PURE__ */ t("div", { className: i.iconWrap, "aria-hidden": "true", children: /* @__PURE__ */ t(h, { className: i.icon }) }),
45
+ /* @__PURE__ */ c("div", { className: i.body, children: [
46
+ /* @__PURE__ */ c("div", { className: i.text, children: [
47
+ s.title && /* @__PURE__ */ t(
48
+ p.Text,
49
+ {
50
+ tag: "div",
51
+ view: "title",
52
+ weight: "bold",
53
+ color: "primary",
54
+ className: i.title,
55
+ children: s.title
56
+ }
57
+ ),
58
+ s.description ? /* @__PURE__ */ t(
59
+ p.Text,
60
+ {
61
+ tag: "div",
62
+ view: "primary-small",
63
+ color: "secondary",
64
+ weight: "regular",
65
+ className: i.description,
66
+ children: s.description
67
+ }
68
+ ) : null
69
+ ] }),
70
+ m ? /* @__PURE__ */ t("div", { className: i.actionSlot, children: m }) : l && (d || a) ? /* @__PURE__ */ t(k, { label: l, href: d, onClick: a }) : null
71
+ ] })
72
+ ]
73
+ }
74
+ );
75
+ };
76
+ export {
77
+ T as SettingsInfoBlock
78
+ };
@@ -0,0 +1 @@
1
+ .component_o8T0{--info-glow: color-mix(in srgb, var(--color-graphic-accent) 12%, transparent);--info-glow-secondary: color-mix(in srgb, var(--color-graphic-accent) 5%, transparent);--info-border: color-mix(in srgb, var(--color-graphic-accent) 16%, transparent);--info-surface-top: color-mix(in srgb, var(--color-bg-accent) 8%, var(--color-bg-primary));--info-surface-bottom: color-mix(in srgb, var(--color-bg-secondary) 97%, var(--color-bg-accent) 3%);--info-icon-top: color-mix(in srgb, var(--color-graphic-accent) 12%, var(--color-bg-primary));--info-icon-bottom: color-mix(in srgb, var(--color-graphic-accent) 5%, var(--color-bg-secondary));--info-icon-border: color-mix(in srgb, var(--color-graphic-accent) 18%, transparent);--info-icon-color: var(--color-graphic-accent);--info-action-color: var(--color-text-accent);--info-shine: color-mix(in srgb, var(--color-bg-primary) 16%, transparent);position:relative;display:flex;align-items:flex-start;gap:14px;width:100%;padding:16px;box-sizing:border-box;border-radius:var(--radius-m, 12px);overflow:hidden;isolation:isolate;border:1px solid var(--info-border);background:radial-gradient(140% 130% at 0% 0%,var(--info-glow) 0%,transparent 62%),radial-gradient(100% 100% at 100% 100%,var(--info-glow-secondary) 0%,transparent 58%),linear-gradient(160deg,var(--info-surface-top) 0%,var(--info-surface-bottom) 100%)}.component_o8T0:after{content:"";position:absolute;inset:0;border-radius:inherit;pointer-events:none;background:linear-gradient(118deg,transparent 42%,var(--info-shine) 50%,transparent 58%);opacity:.22;z-index:0}.accent_xPRy{--info-glow: color-mix(in srgb, var(--color-graphic-accent) 13%, transparent);--info-glow-secondary: color-mix(in srgb, var(--color-graphic-accent) 6%, transparent);--info-border: color-mix(in srgb, var(--color-graphic-accent) 17%, transparent);--info-surface-top: color-mix(in srgb, var(--color-bg-accent) 9%, var(--color-bg-primary));--info-surface-bottom: color-mix(in srgb, var(--color-bg-secondary) 96%, var(--color-bg-accent) 4%);--info-icon-top: color-mix(in srgb, var(--color-graphic-accent) 13%, var(--color-bg-primary));--info-icon-bottom: color-mix(in srgb, var(--color-graphic-accent) 6%, var(--color-bg-secondary));--info-icon-border: color-mix(in srgb, var(--color-graphic-accent) 19%, transparent);--info-icon-color: var(--color-graphic-accent);--info-action-color: var(--color-text-accent)}.positive_oXy6{--info-glow: color-mix(in srgb, var(--color-graphic-positive) 12%, transparent);--info-glow-secondary: color-mix(in srgb, var(--color-graphic-positive) 5%, transparent);--info-border: color-mix(in srgb, var(--color-graphic-positive) 16%, transparent);--info-surface-top: color-mix(in srgb, var(--color-bg-positive) 8%, var(--color-bg-primary));--info-surface-bottom: color-mix(in srgb, var(--color-bg-secondary) 97%, var(--color-bg-positive) 3%);--info-icon-top: color-mix(in srgb, var(--color-graphic-positive) 12%, var(--color-bg-primary));--info-icon-bottom: color-mix(in srgb, var(--color-graphic-positive) 5%, var(--color-bg-secondary));--info-icon-border: color-mix(in srgb, var(--color-graphic-positive) 18%, transparent);--info-icon-color: var(--color-graphic-positive);--info-action-color: var(--color-graphic-positive)}.attention_YEcR{--info-glow: color-mix(in srgb, var(--color-graphic-attention) 14%, transparent);--info-glow-secondary: color-mix(in srgb, var(--color-graphic-attention) 6%, transparent);--info-border: color-mix(in srgb, var(--color-graphic-attention) 18%, transparent);--info-surface-top: color-mix(in srgb, var(--color-bg-attention) 9%, var(--color-bg-primary));--info-surface-bottom: color-mix(in srgb, var(--color-bg-secondary) 96%, var(--color-bg-attention) 4%);--info-icon-top: color-mix(in srgb, var(--color-graphic-attention) 13%, var(--color-bg-primary));--info-icon-bottom: color-mix(in srgb, var(--color-graphic-attention) 6%, var(--color-bg-secondary));--info-icon-border: color-mix(in srgb, var(--color-graphic-attention) 20%, transparent);--info-icon-color: var(--color-graphic-attention);--info-action-color: var(--color-graphic-attention)}.neutral_kGcO{--info-glow: color-mix(in srgb, var(--color-graphic-secondary) 8%, transparent);--info-glow-secondary: color-mix(in srgb, var(--color-graphic-secondary) 4%, transparent);--info-border: color-mix(in srgb, var(--color-graphic-secondary) 14%, transparent);--info-surface-top: color-mix(in srgb, var(--color-bg-thirdly) 55%, var(--color-bg-primary));--info-surface-bottom: var(--color-bg-secondary);--info-icon-top: color-mix(in srgb, var(--color-graphic-secondary) 8%, var(--color-bg-primary));--info-icon-bottom: var(--color-bg-thirdly);--info-icon-border: color-mix(in srgb, var(--color-graphic-secondary) 16%, transparent);--info-icon-color: var(--color-graphic-secondary);--info-action-color: var(--color-text-accent)}.iconWrap_hNjZ{position:relative;z-index:1;display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;flex-shrink:0;margin-top:1px;border-radius:var(--radius-s, 8px);color:var(--info-icon-color);background:linear-gradient(160deg,var(--info-icon-top) 0%,var(--info-icon-bottom) 100%);border:1px solid var(--info-icon-border);box-shadow:inset 0 1px color-mix(in srgb,var(--color-bg-primary) 14%,transparent)}.icon_OelS{width:16px;height:16px}.body_wJ5l{position:relative;z-index:1;display:flex;flex:1;flex-direction:column;align-items:flex-start;gap:8px;min-width:0}.withDescription_qBJy .body_wJ5l{gap:10px}.text_vw-f{display:flex;flex-direction:column;gap:4px;min-width:0}.title_vsWo,.description_1kEU{margin:0}.actionLink_FKEf{-webkit-appearance:none;appearance:none;margin:0;padding:0;border:none;background:transparent;font:inherit;font-size:13px;font-weight:600;line-height:1.35;color:var(--info-action-color);cursor:pointer;text-decoration:none;transition:opacity .15s ease}.actionLink_FKEf:hover{opacity:.78;text-decoration:underline;text-underline-offset:2px}.actionLink_FKEf:focus-visible{outline:2px solid color-mix(in srgb,var(--info-icon-color) 45%,transparent);outline-offset:2px;border-radius:4px}.actionSlot_UNOt{display:flex;align-items:center}
@@ -0,0 +1 @@
1
+ export * from './component';
@@ -0,0 +1,4 @@
1
+ import { SettingsInfoBlock as e } from "./component.js";
2
+ export {
3
+ e as SettingsInfoBlock
4
+ };
@@ -0,0 +1,35 @@
1
+ import * as __css from './index.css';
2
+ export const __cssModule = __css;
3
+ const t = "component_o8T0", o = "accent_xPRy", n = "positive_oXy6", c = "attention_YEcR", i = "neutral_kGcO", e = "iconWrap_hNjZ", s = "icon_OelS", a = "body_wJ5l", p = "withDescription_qBJy", _ = "text_vw-f", l = "title_vsWo", r = "description_1kEU", d = "actionLink_FKEf", y = "actionSlot_UNOt", k = {
4
+ component: t,
5
+ accent: o,
6
+ positive: n,
7
+ attention: c,
8
+ neutral: i,
9
+ iconWrap: e,
10
+ icon: s,
11
+ body: a,
12
+ withDescription: p,
13
+ text: _,
14
+ title: l,
15
+ description: r,
16
+ actionLink: d,
17
+ actionSlot: y
18
+ };
19
+ export {
20
+ o as accent,
21
+ d as actionLink,
22
+ y as actionSlot,
23
+ c as attention,
24
+ a as body,
25
+ t as component,
26
+ k as default,
27
+ r as description,
28
+ s as icon,
29
+ e as iconWrap,
30
+ i as neutral,
31
+ n as positive,
32
+ _ as text,
33
+ l as title,
34
+ p as withDescription
35
+ };
@@ -8,7 +8,7 @@ import { useFocus as oe } from "../hooks/useFocus/index.js";
8
8
  import t from "./index.module.css.js";
9
9
  const pe = H.forwardRef(
10
10
  ({
11
- autoComplete: F = "on",
11
+ autoComplete: F = "off",
12
12
  autosize: s = !0,
13
13
  size: x = "s",
14
14
  block: S = !1,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alphakits/ui",
3
- "version": "2.5.15",
3
+ "version": "2.5.16",
4
4
  "files": [
5
5
  "dist"
6
6
  ],