@dss-kit/ui-kit 1.0.0 → 1.0.2

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 (34) hide show
  1. package/dist/components/builders/Table/Table.js +169 -165
  2. package/dist/components/builders/Table/Table.types.d.ts +5 -1
  3. package/dist/components/builders/Table/TableBodyRow/TableBodyRow.d.ts +5 -0
  4. package/dist/components/builders/Table/TableBodyRow/TableBodyRow.js +23 -9
  5. package/dist/components/builders/Table/TablePlaceholder/TablePlaceholder.js +22 -22
  6. package/dist/components/controls/Switch/Switch.d.ts +3 -3
  7. package/dist/components/controls/Switch/styles.d.ts +1 -0
  8. package/dist/components/controls/Switch/styles.js +44 -34
  9. package/dist/components/controls/Tabs/TabItem/TabItem.d.ts +5 -0
  10. package/dist/components/controls/Tabs/TabItem/TabItem.js +68 -49
  11. package/dist/components/controls/Tabs/Tabs.d.ts +6 -1
  12. package/dist/components/controls/Tabs/Tabs.js +31 -28
  13. package/dist/components/shared/Counter/Counter.const.d.ts +6 -0
  14. package/dist/components/shared/Counter/Counter.const.js +16 -0
  15. package/dist/components/shared/Counter/Counter.d.ts +11 -0
  16. package/dist/components/shared/Counter/Counter.js +58 -0
  17. package/dist/components/shared/Counter/Counter.types.d.ts +29 -0
  18. package/dist/components/shared/Counter/Counter.utils.d.ts +2 -0
  19. package/dist/components/shared/Counter/Counter.utils.js +6 -0
  20. package/dist/components/shared/Counter/index.d.ts +2 -0
  21. package/dist/components/shared/Counter/styles.d.ts +2 -0
  22. package/dist/components/shared/Counter/styles.js +11 -0
  23. package/dist/components/shared/Dot/Dot.const.d.ts +5 -0
  24. package/dist/components/shared/Dot/Dot.const.js +15 -0
  25. package/dist/components/shared/Dot/Dot.d.ts +10 -0
  26. package/dist/components/shared/Dot/Dot.js +32 -0
  27. package/dist/components/shared/Dot/Dot.types.d.ts +17 -0
  28. package/dist/components/shared/Dot/index.d.ts +2 -0
  29. package/dist/components/shared/Dot/styles.d.ts +1 -0
  30. package/dist/components/shared/Dot/styles.js +7 -0
  31. package/dist/components/shared/index.d.ts +2 -0
  32. package/dist/index.js +52 -48
  33. package/dist/ui-kit.cjs +8 -8
  34. package/package.json +1 -1
@@ -1,25 +1,25 @@
1
- import { jsx as o, jsxs as H } from "react/jsx-runtime";
2
- import { cx as p, css as b } from "@emotion/css";
3
- import { useReactTable as Pe, getPaginationRowModel as Me, getSortedRowModel as Ne, getCoreRowModel as _e, flexRender as P, createColumnHelper as ke } from "@tanstack/react-table";
4
- import { useMemo as ze, useImperativeHandle as Ie } from "react";
5
- import Ve from "../../../assets/svg/table/search.svg.js";
1
+ import { jsx as o, jsxs as N } from "react/jsx-runtime";
2
+ import { cx as h, css as u } from "@emotion/css";
3
+ import { useReactTable as ve, getPaginationRowModel as Pe, getSortedRowModel as Me, getCoreRowModel as Ee, flexRender as v, createColumnHelper as Ie } from "@tanstack/react-table";
4
+ import { useMemo as ke, useImperativeHandle as ze } from "react";
5
+ import De from "../../../assets/svg/table/search.svg.js";
6
6
  import { typography as Le } from "../../../styles/utils/typography.js";
7
- import { useControllableState as m } from "./Table.hooks.js";
8
- import { getColumnPinningStyles as f } from "./Table.utils.js";
9
- import { TablePlaceholder as We } from "./TablePlaceholder/TablePlaceholder.js";
10
- import { TableWrapper as Ee } from "./TableWrapper/TableWrapper.js";
11
- import { TableHeadRow as Fe } from "./TableHeadRow/TableHeadRow.js";
12
- import { TablePagination as je } from "./TablePagination/TablePagination.js";
13
- import { TableHeadCell as Be } from "./TableHeadCell/TableHeadCell.js";
14
- import { TableBodyCell as De } from "./TableBodyCell/TableBodyCell.js";
7
+ import { useControllableState as r } from "./Table.hooks.js";
8
+ import { getColumnPinningStyles as b } from "./Table.utils.js";
9
+ import { TablePlaceholder as Ve } from "./TablePlaceholder/TablePlaceholder.js";
10
+ import { TableWrapper as We } from "./TableWrapper/TableWrapper.js";
11
+ import { TableHeadRow as Be } from "./TableHeadRow/TableHeadRow.js";
12
+ import { TablePagination as Fe } from "./TablePagination/TablePagination.js";
13
+ import { TableHeadCell as $e } from "./TableHeadCell/TableHeadCell.js";
14
+ import { TableBodyCell as je } from "./TableBodyCell/TableBodyCell.js";
15
15
  import { TableBodyRow as Ae } from "./TableBodyRow/TableBodyRow.js";
16
- import { TableBodyCellContent as _ } from "./TableBodyCellContent/TableBodyCellContent.js";
16
+ import { TableBodyCellContent as E } from "./TableBodyCellContent/TableBodyCellContent.js";
17
17
  import { Skeleton as Ke } from "../../shared/Skeleton/Skeleton.js";
18
18
  import { TableHeadCellContent as Oe } from "./TableHeadCellContent/TableHeadCellContent.js";
19
- import { TableHeadCellContentSortable as $e } from "./TableHeadCellContentSortable/TableHeadCellContentSortable.js";
20
- import { theme as qe } from "../../../utils/theme/index.js";
21
- import { Box as Ge } from "../Box/Box.js";
22
- const { spacing: M, color: l } = qe, Je = b({
19
+ import { TableHeadCellContentSortable as Ge } from "./TableHeadCellContentSortable/TableHeadCellContentSortable.js";
20
+ import { theme as Ue } from "../../../utils/theme/index.js";
21
+ import { Box as qe } from "../Box/Box.js";
22
+ const { spacing: P, color: n } = Ue, Je = u({
23
23
  ...Le.body2,
24
24
  fontWeight: 500,
25
25
  width: "100%",
@@ -27,36 +27,36 @@ const { spacing: M, color: l } = qe, Je = b({
27
27
  minWidth: "max-content",
28
28
  borderCollapse: "collapse",
29
29
  borderSpacing: 0,
30
- backgroundColor: l.fill.bg_primary
31
- }), Qe = b({
32
- backgroundColor: l.fill.bg_secondary,
33
- color: l.text.tertiary
34
- }), Ue = b({
30
+ backgroundColor: n.fill.bg_primary
31
+ }), Qe = u({
32
+ backgroundColor: n.fill.bg_secondary,
33
+ color: n.text.tertiary
34
+ }), Xe = u({
35
35
  pointerEvents: "none",
36
36
  userSelect: "none"
37
- }), N = ["70%", "55%", "80%", "60%"], c = ({
38
- ref: k,
39
- data: h,
40
- columns: u,
41
- showBorders: g = !0,
42
- enableSorting: z = !1,
43
- enablePagination: S = !1,
44
- enableRowSelection: I = !1,
45
- enableMultiRowSelection: V = !1,
46
- enableColumnPinning: d = !1,
37
+ }), M = ["70%", "55%", "80%", "60%"], Ye = `linear-gradient(${n.fill.accent_tint_low}, ${n.fill.accent_tint_low}), ${n.fill.bg_primary}`, m = ({
38
+ ref: I,
39
+ data: C,
40
+ columns: S,
41
+ showBorders: c = !0,
42
+ enableSorting: k = !1,
43
+ enablePagination: y = !1,
44
+ enableRowSelection: z = !1,
45
+ enableMultiRowSelection: D = !1,
46
+ enableColumnPinning: g = !1,
47
47
  columnPinning: L,
48
- onColumnPinningChange: W,
49
- sorting: E,
50
- onSortingChange: F,
51
- manualSorting: j,
52
- columnFilters: B,
53
- onColumnFiltersChange: D,
48
+ onColumnPinningChange: V,
49
+ sorting: W,
50
+ onSortingChange: B,
51
+ manualSorting: F,
52
+ columnFilters: $,
53
+ onColumnFiltersChange: j,
54
54
  columnVisibility: A,
55
55
  onColumnVisibilityChange: K,
56
56
  pagination: O,
57
- onPaginationChange: $,
58
- rowSelection: q,
59
- onRowSelectionChange: G,
57
+ onPaginationChange: G,
58
+ rowSelection: U,
59
+ onRowSelectionChange: q,
60
60
  totalCount: s,
61
61
  loading: i = !1,
62
62
  loadingRowCount: J = 10,
@@ -65,199 +65,203 @@ const { spacing: M, color: l } = qe, Je = b({
65
65
  description: "Try adjusting your search or filters",
66
66
  action: "Reset"
67
67
  },
68
- className: U,
69
- containerClassName: y,
70
- theadClassName: X,
71
- tbodyClassName: Y,
72
- emptyStateClassName: Z,
73
- emptyStateTitleClassName: ee,
74
- emptyStateDescriptionClassName: oe,
68
+ className: X,
69
+ containerClassName: w,
70
+ theadClassName: Y,
71
+ tbodyClassName: Z,
72
+ emptyStateClassName: ee,
73
+ emptyStateTitleClassName: oe,
74
+ emptyStateDescriptionClassName: te,
75
75
  paginationClassName: ne,
76
- tableOptions: te = {},
77
- onRowClick: w,
78
- getRowId: le,
79
- headCellComponent: ie = Be,
80
- bodyCellComponent: x = De,
81
- headRowComponent: ae = Fe,
82
- bodyRowComponent: R = Ae,
83
- onReset: re,
76
+ tableOptions: le = {},
77
+ onRowClick: R,
78
+ getRowId: ie,
79
+ headCellComponent: ae = $e,
80
+ bodyCellComponent: T = je,
81
+ headRowComponent: re = Be,
82
+ bodyRowComponent: x = Ae,
83
+ onReset: se,
84
84
  paginationVariant: me,
85
- paginationLabels: se,
86
- renderPageSizeSelectorDropdownItem: ce,
87
- renderPageSizeSelectorInputItem: ge
85
+ paginationLabels: ce,
86
+ renderPageSizeSelectorDropdownItem: ge,
87
+ renderPageSizeSelectorInputItem: de
88
88
  }) => {
89
- const [de, pe] = m(
90
- E,
91
- F,
92
- []
93
- ), [he, Ce] = m(
89
+ const [pe, he] = r(
90
+ W,
94
91
  B,
95
- D,
96
92
  []
97
- ), [fe, be] = m(
93
+ ), [Ce, fe] = r(
94
+ $,
95
+ j,
96
+ []
97
+ ), [be, ue] = r(
98
98
  A,
99
99
  K,
100
100
  {}
101
- ), [a, C] = m(
101
+ ), [a, f] = r(
102
102
  O,
103
- $,
103
+ G,
104
104
  { pageIndex: 0, pageSize: 10 }
105
- ), [ue, Se] = m(q, G, {}), [ye, we] = m(
105
+ ), [Se, ye] = r(U, q, {}), [we, Re] = r(
106
106
  L,
107
- W,
107
+ V,
108
108
  { left: [], right: [] }
109
- ), T = j ?? !!s, xe = ze(
110
- () => u.map((e) => ({
109
+ ), _ = F ?? !!s, Te = ke(
110
+ () => S.map((e) => ({
111
111
  enableSorting: !1,
112
112
  ...e
113
113
  })),
114
- [u]
115
- ), t = Pe({
116
- data: h,
117
- columns: xe,
114
+ [S]
115
+ ), l = ve({
116
+ data: C,
117
+ columns: Te,
118
118
  state: {
119
- sorting: de,
120
- columnFilters: he,
121
- columnVisibility: fe,
119
+ sorting: pe,
120
+ columnFilters: Ce,
121
+ columnVisibility: be,
122
122
  pagination: a,
123
- rowSelection: ue,
124
- columnPinning: ye
123
+ rowSelection: Se,
124
+ columnPinning: we
125
125
  },
126
- onSortingChange: pe,
127
- onColumnFiltersChange: Ce,
128
- onColumnVisibilityChange: be,
129
- onPaginationChange: C,
130
- onRowSelectionChange: Se,
131
- onColumnPinningChange: we,
132
- getCoreRowModel: _e(),
133
- getSortedRowModel: z && !T ? Ne() : void 0,
134
- getPaginationRowModel: S ? Me() : void 0,
135
- enableRowSelection: I,
136
- enableMultiRowSelection: V,
137
- enableColumnPinning: d,
138
- getRowId: le,
139
- manualSorting: T,
126
+ onSortingChange: he,
127
+ onColumnFiltersChange: fe,
128
+ onColumnVisibilityChange: ue,
129
+ onPaginationChange: f,
130
+ onRowSelectionChange: ye,
131
+ onColumnPinningChange: Re,
132
+ getCoreRowModel: Ee(),
133
+ getSortedRowModel: k && !_ ? Me() : void 0,
134
+ getPaginationRowModel: y ? Pe() : void 0,
135
+ enableRowSelection: z,
136
+ enableMultiRowSelection: D,
137
+ enableColumnPinning: g,
138
+ getRowId: ie,
139
+ manualSorting: _,
140
140
  manualPagination: !!s,
141
141
  pageCount: s ? Math.ceil(s / a.pageSize) : void 0,
142
- ...te
142
+ ...le
143
143
  });
144
- Ie(k, () => t);
145
- const { rows: v } = t.getRowModel(), Re = (e, n) => {
146
- w && w(e.original, n);
147
- }, Te = (e) => /* @__PURE__ */ o(
148
- ie,
144
+ ze(I, () => l);
145
+ const { rows: H } = l.getRowModel(), xe = (e, t) => {
146
+ R && R(e.original, t);
147
+ }, _e = (e) => /* @__PURE__ */ o(
148
+ ae,
149
149
  {
150
150
  style: {
151
151
  width: e.getSize(),
152
- ...d && f(
153
- t,
152
+ ...g && b(
153
+ l,
154
154
  e.column,
155
- l.fill.bg_secondary
155
+ n.fill.bg_secondary
156
156
  )
157
157
  },
158
158
  onClick: i ? void 0 : e.column.getToggleSortingHandler(),
159
- children: e.isPlaceholder ? null : P(e.column.columnDef.header, e.getContext())
160
- },
161
- e.id
162
- ), ve = (e, n) => /* @__PURE__ */ o(
163
- R,
164
- {
165
- showBorders: g,
166
- onClick: () => Re(e, n),
167
- children: e.getVisibleCells().map((r) => /* @__PURE__ */ o(
168
- x,
169
- {
170
- style: d ? f(
171
- t,
172
- r.column,
173
- l.fill.bg_primary
174
- ) : void 0,
175
- children: P(r.column.columnDef.cell, r.getContext())
176
- },
177
- r.id
178
- ))
159
+ children: e.isPlaceholder ? null : v(e.column.columnDef.header, e.getContext())
179
160
  },
180
161
  e.id
181
- ), He = (e) => /* @__PURE__ */ o(
182
- R,
162
+ ), He = (e, t) => {
163
+ const d = e.getIsSelected();
164
+ return /* @__PURE__ */ o(
165
+ x,
166
+ {
167
+ showBorders: c,
168
+ selected: d,
169
+ onClick: () => xe(e, t),
170
+ children: e.getVisibleCells().map((p) => /* @__PURE__ */ o(
171
+ T,
172
+ {
173
+ style: g ? b(
174
+ l,
175
+ p.column,
176
+ d ? Ye : n.fill.bg_primary
177
+ ) : void 0,
178
+ children: v(p.column.columnDef.cell, p.getContext())
179
+ },
180
+ p.id
181
+ ))
182
+ },
183
+ e.id
184
+ );
185
+ }, Ne = (e) => /* @__PURE__ */ o(
186
+ x,
183
187
  {
184
- showBorders: g,
185
- children: t.getVisibleLeafColumns().map((n, r) => /* @__PURE__ */ o(
186
- x,
188
+ showBorders: c,
189
+ children: l.getVisibleLeafColumns().map((t, d) => /* @__PURE__ */ o(
190
+ T,
187
191
  {
188
- style: d ? f(t, n, l.fill.bg_primary) : void 0,
189
- children: /* @__PURE__ */ o(_, { children: /* @__PURE__ */ o(
192
+ style: g ? b(l, t, n.fill.bg_primary) : void 0,
193
+ children: /* @__PURE__ */ o(E, { children: /* @__PURE__ */ o(
190
194
  Ke,
191
195
  {
192
196
  variant: "text",
193
197
  height: 16,
194
- width: N[r % N.length]
198
+ width: M[d % M.length]
195
199
  }
196
200
  ) })
197
201
  },
198
- n.id
202
+ t.id
199
203
  ))
200
204
  },
201
205
  `skeleton-row-${e}`
202
206
  );
203
- return !i && !v.length ? /* @__PURE__ */ o(
204
- We,
207
+ return !i && !H.length ? /* @__PURE__ */ o(
208
+ Ve,
205
209
  {
206
210
  icon: /* @__PURE__ */ o(
207
- Ve,
211
+ De,
208
212
  {
209
213
  width: 24,
210
214
  height: 24,
211
- style: { color: l.icon.tertiary, marginBottom: M.sm }
215
+ style: { color: n.icon.tertiary, marginBottom: P.sm }
212
216
  }
213
217
  ),
214
218
  labels: Q,
215
- onReset: re,
216
- className: p(y, Z),
217
- titleClassName: ee,
218
- descriptionClassName: oe
219
+ onReset: se,
220
+ className: h(w, ee),
221
+ titleClassName: oe,
222
+ descriptionClassName: te
219
223
  }
220
- ) : /* @__PURE__ */ H(Ge, { w: "full", gap: M.xl, className: p(y), children: [
221
- /* @__PURE__ */ o(Ee, { data: h, showBorders: g, children: /* @__PURE__ */ H("table", { className: p(Je, U), children: [
224
+ ) : /* @__PURE__ */ N(qe, { w: "full", gap: P.xl, className: h(w), children: [
225
+ /* @__PURE__ */ o(We, { data: C, showBorders: c, children: /* @__PURE__ */ N("table", { className: h(Je, X), children: [
222
226
  /* @__PURE__ */ o(
223
227
  "thead",
224
228
  {
225
- className: p(
229
+ className: h(
226
230
  Qe,
227
- { [Ue]: i },
228
- X
231
+ { [Xe]: i },
232
+ Y
229
233
  ),
230
234
  "aria-busy": i,
231
- children: t.getHeaderGroups().map((e) => /* @__PURE__ */ o(ae, { showBorders: g, children: e.headers.map(Te) }, e.id))
235
+ children: l.getHeaderGroups().map((e) => /* @__PURE__ */ o(re, { showBorders: c, children: e.headers.map(_e) }, e.id))
232
236
  }
233
237
  ),
234
- /* @__PURE__ */ o("tbody", { className: Y, children: i ? Array.from(
238
+ /* @__PURE__ */ o("tbody", { className: Z, children: i ? Array.from(
235
239
  { length: J },
236
- (e, n) => He(n)
237
- ) : v.map((e, n) => ve(e, n)) })
240
+ (e, t) => Ne(t)
241
+ ) : H.map((e, t) => He(e, t)) })
238
242
  ] }) }),
239
- S && !i && /* @__PURE__ */ o(
240
- je,
243
+ y && !i && /* @__PURE__ */ o(
244
+ Fe,
241
245
  {
242
246
  pageIndex: a.pageIndex,
243
247
  pageSize: a.pageSize,
244
- totalCount: s || h.length,
248
+ totalCount: s || C.length,
245
249
  variant: me,
246
- labels: se,
247
- renderPageSizeSelectorDropdownItem: ce,
248
- renderPageSizeSelectorInputItem: ge,
249
- onPageChange: (e) => C({ ...a, pageIndex: e }),
250
- onPageSizeChange: (e) => C({ ...a, pageSize: e, pageIndex: 0 }),
250
+ labels: ce,
251
+ renderPageSizeSelectorDropdownItem: ge,
252
+ renderPageSizeSelectorInputItem: de,
253
+ onPageChange: (e) => f({ ...a, pageIndex: e }),
254
+ onPageSizeChange: (e) => f({ ...a, pageSize: e, pageIndex: 0 }),
251
255
  className: ne
252
256
  }
253
257
  )
254
258
  ] });
255
259
  };
256
- c.displayName = "Table";
257
- c.HeadCellContent = Oe;
258
- c.BodyCellContent = _;
259
- c.HeadCellContentSortable = $e;
260
- c.createColumnHelper = ke;
260
+ m.displayName = "Table";
261
+ m.HeadCellContent = Oe;
262
+ m.BodyCellContent = E;
263
+ m.HeadCellContentSortable = Ge;
264
+ m.createColumnHelper = Ie;
261
265
  export {
262
- c as Table
266
+ m as Table
263
267
  };
@@ -128,7 +128,11 @@ export interface TableProps<TData> {
128
128
  bodyCellComponent?: ComponentType<TableBodyCellProps>;
129
129
  /** Компонент для строки заголовка */
130
130
  headRowComponent?: ComponentType<TableHeadRowProps>;
131
- /** Компонент для строки тела */
131
+ /**
132
+ * Компонент для строки тела. Выбранные строки (`row.getIsSelected()`)
133
+ * подсвечиваются автоматически; в кастомный компонент признак выбранной
134
+ * строки приходит пропсом `selected`.
135
+ */
132
136
  bodyRowComponent?: ComponentType<TableBodyRowProps>;
133
137
  /** Callback при сбросе фильтров */
134
138
  onReset?: (e: React.MouseEvent<HTMLElement, MouseEvent>) => void;
@@ -4,5 +4,10 @@ export interface TableBodyRowProps extends React.HTMLAttributes<HTMLTableRowElem
4
4
  * @default false
5
5
  */
6
6
  showBorders?: boolean;
7
+ /**
8
+ * Подсвечивать ли строку как выбранную
9
+ * @default false
10
+ */
11
+ selected?: boolean;
7
12
  }
8
13
  export declare const TableBodyRow: import('react').ForwardRefExoticComponent<TableBodyRowProps & import('react').RefAttributes<HTMLTableRowElement>>;
@@ -1,17 +1,31 @@
1
- import { jsx as n } from "react/jsx-runtime";
2
- import { css as m, cx as c } from "@emotion/css";
3
- import { forwardRef as i } from "react";
4
- import { theme as d } from "../../../../utils/theme/index.js";
5
- const { color: o } = d, p = i(
6
- ({ children: r, className: e, showBorders: t = !1, ...a }, l) => {
7
- const s = m({
8
- borderBottom: t ? `1px solid ${o.border.neutral_alpha_low}` : "none",
1
+ import { jsx as d } from "react/jsx-runtime";
2
+ import { css as e, cx as m } from "@emotion/css";
3
+ import { forwardRef as f } from "react";
4
+ import { theme as b } from "../../../../utils/theme/index.js";
5
+ const { color: o } = b, p = f(
6
+ ({ children: t, className: l, showBorders: a = !1, selected: r = !1, ...n }, s) => {
7
+ const c = e({
8
+ borderBottom: a ? `1px solid ${o.border.neutral_alpha_low}` : "none",
9
9
  transition: "background-color 0.15s ease-in-out",
10
10
  "&:hover": {
11
11
  backgroundColor: o.fill.neutral_primary_hover
12
12
  }
13
+ }), i = e({
14
+ backgroundColor: o.fill.accent_tint_low,
15
+ "&:hover": {
16
+ backgroundColor: o.fill.accent_tint
17
+ }
13
18
  });
14
- return /* @__PURE__ */ n("tr", { ref: l, className: c(s, e), ...a, children: r });
19
+ return /* @__PURE__ */ d(
20
+ "tr",
21
+ {
22
+ ref: s,
23
+ "data-selected": r || void 0,
24
+ className: m(c, { [i]: r }, l),
25
+ ...n,
26
+ children: t
27
+ }
28
+ );
15
29
  }
16
30
  );
17
31
  p.displayName = "TableBodyRow";
@@ -1,30 +1,30 @@
1
- import { jsxs as d, jsx as o } from "react/jsx-runtime";
2
- import { Button as l } from "../../../controls/Button/Button.js";
3
- import { Box as s } from "../../Box/Box.js";
4
- import { theme as p } from "../../../../utils/theme/index.js";
1
+ import { jsxs as d, jsx as e } from "react/jsx-runtime";
2
+ import { cx as s, css as l } from "@emotion/css";
3
+ import { Button as p } from "../../../controls/Button/Button.js";
4
+ import { Box as h } from "../../Box/Box.js";
5
+ import { theme as f } from "../../../../utils/theme/index.js";
5
6
  import { Text as r } from "../../Text/Text.js";
6
- const { spacing: e, cornerRadius: h } = p, f = ({
7
+ const { spacing: o, cornerRadius: x } = f, u = ({
7
8
  icon: i,
8
9
  labels: t,
9
- onReset: n,
10
- className: c,
10
+ onReset: c,
11
+ className: n,
11
12
  titleClassName: m,
12
13
  descriptionClassName: a
13
14
  }) => /* @__PURE__ */ d(
14
- s,
15
+ h,
15
16
  {
16
17
  w: "full",
17
- borderRadius: h.md,
18
- py: e["5xl"],
19
- px: e["10xl"],
18
+ borderRadius: x.md,
19
+ py: o["5xl"],
20
20
  alignItems: "center",
21
- className: c,
21
+ className: n,
22
22
  children: [
23
23
  i,
24
- /* @__PURE__ */ o(
24
+ /* @__PURE__ */ e(
25
25
  r,
26
26
  {
27
- mb: e.xs,
27
+ mb: o.xs,
28
28
  variant: "title-3",
29
29
  fontWeight: "semibold",
30
30
  className: m,
@@ -32,23 +32,23 @@ const { spacing: e, cornerRadius: h } = p, f = ({
32
32
  children: t.title
33
33
  }
34
34
  ),
35
- /* @__PURE__ */ o(
35
+ /* @__PURE__ */ e(
36
36
  r,
37
37
  {
38
- mb: e.md,
38
+ mb: o.md,
39
39
  colorName: "tertiary",
40
40
  variant: "body-1",
41
41
  fontWeight: "medium",
42
- className: a,
42
+ className: s(l({ maxWidth: 400 }), a),
43
43
  center: !0,
44
44
  children: t.description
45
45
  }
46
46
  ),
47
- typeof t.action == "string" ? /* @__PURE__ */ o(
48
- l,
47
+ typeof t.action == "string" ? /* @__PURE__ */ e(
48
+ p,
49
49
  {
50
50
  width: "auto",
51
- onClick: n,
51
+ onClick: c,
52
52
  intensity: "secondary",
53
53
  color: "accent",
54
54
  children: t.action
@@ -57,7 +57,7 @@ const { spacing: e, cornerRadius: h } = p, f = ({
57
57
  ]
58
58
  }
59
59
  );
60
- f.displayName = "TablePlaceholder";
60
+ u.displayName = "TablePlaceholder";
61
61
  export {
62
- f as TablePlaceholder
62
+ u as TablePlaceholder
63
63
  };
@@ -1,7 +1,7 @@
1
- import { AccentType, SecondaryType, Size } from '../../../types/tokens.types';
1
+ import { AccentType, PositiveType, SecondaryType, Size } from '../../../types/tokens.types';
2
2
  type SwitchSizes = Extract<Size, "sm" | "md" | "lg">;
3
3
  type ThemeType = "theme";
4
- export type SwitchVariant = AccentType | SecondaryType | ThemeType;
4
+ export type SwitchVariant = AccentType | SecondaryType | PositiveType | ThemeType;
5
5
  export interface SwitchRef {
6
6
  /** Фокус на переключателе */
7
7
  focus: () => void;
@@ -33,7 +33,7 @@ interface SwitchProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>,
33
33
  size?: SwitchSizes;
34
34
  /**
35
35
  * Вариант переключателя.
36
- * Доступны: `accent`, `secondary`, `theme`.
36
+ * Доступны: `accent`, `secondary`, `positive`, `theme`.
37
37
  * @default "accent"
38
38
  */
39
39
  variant?: SwitchVariant;
@@ -5,6 +5,7 @@ export declare const styles: {
5
5
  switchContainer: string;
6
6
  variant_accent: string;
7
7
  variant_secondary: string;
8
+ variant_positive: string;
8
9
  variant_theme: string;
9
10
  size_sm: string;
10
11
  size_md: string;