@lazar-ui/kit 0.4.0 → 0.5.1

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/input.js CHANGED
@@ -1,120 +1,211 @@
1
- import { jsxs as v, jsx as o } from "react/jsx-runtime";
2
- import U from "clsx";
3
- import { useState as g, useCallback as N } from "react";
4
- import { g as E } from "./getVariantClassName-D7Nhpuec.mjs";
5
- import { I as f } from "./Icon-DsTlU3j3.mjs";
6
- import { u as S } from "./useLocale-DdHNhmvT.mjs";
1
+ import { jsxs as v, jsx as i } from "react/jsx-runtime";
2
+ import z from "clsx";
3
+ import { useState as N, useCallback as _ } from "react";
4
+ import { g as S } from "./getVariantClassName-D7Nhpuec.mjs";
5
+ import { I as Y } from "./Icon-DsTlU3j3.mjs";
6
+ import { u as A } from "./useLocale-CJh-krrY.mjs";
7
7
  import './input.css';const m = {
8
8
  INPUT: "Input",
9
+ INPUT_DATE: "InputDate",
9
10
  INPUT_EMAIL: "InputEmail",
10
11
  INPUT_NUMBER: "InputNumber",
11
12
  INPUT_PASSWORD: "InputPassword",
12
13
  INPUT_PHONE: "InputPhone"
13
- }, C = "_root_8a405_17", M = "_invalid_8a405_36", T = "_disabled_8a405_42", B = "_sizeSm_8a405_56", L = "_sizeMd_8a405_60", x = "_sizeLg_8a405_64", A = "_control_8a405_68", O = "_before_8a405_100", $ = "_after_8a405_101", k = "_togglePassword_8a405_109", l = {
14
- root: C,
15
- invalid: M,
16
- disabled: T,
14
+ }, E = "_root_8a405_17", U = "_invalid_8a405_36", C = "_disabled_8a405_42", B = "_sizeSm_8a405_56", L = "_sizeMd_8a405_60", k = "_sizeLg_8a405_64", x = "_control_8a405_68", O = "_before_8a405_100", $ = "_after_8a405_101", H = "_togglePassword_8a405_109", p = {
15
+ root: E,
16
+ invalid: U,
17
+ disabled: C,
17
18
  sizeSm: B,
18
19
  sizeMd: L,
19
- sizeLg: x,
20
- control: A,
20
+ sizeLg: k,
21
+ control: x,
21
22
  before: O,
22
23
  after: $,
23
- togglePassword: k
24
- }, d = (t) => {
25
- const { ref: e, invalid: s = !1, size: a = "md", before: r, after: n, className: i, onChange: c, onBlur: u, onFocus: _, ...p } = t, w = U(
26
- l.root,
27
- E("size", a, l),
24
+ togglePassword: H
25
+ }, f = (s) => {
26
+ const { ref: e, invalid: t = !1, size: o = "md", before: r, after: n, className: a, onChange: l, onBlur: c, onFocus: u, ...d } = s, g = z(
27
+ p.root,
28
+ S("size", o, p),
28
29
  {
29
- [l.disabled]: p.disabled === !0,
30
- [l.invalid]: s
30
+ [p.disabled]: d.disabled === !0,
31
+ [p.invalid]: t
31
32
  },
32
- i
33
- ), z = (y) => {
34
- c?.(y.target.value);
33
+ a
34
+ ), I = (h) => {
35
+ l?.(h.target.value);
35
36
  };
36
- return /* @__PURE__ */ v("div", { className: w, children: [
37
- r && /* @__PURE__ */ o("span", { className: l.before, children: r }),
38
- /* @__PURE__ */ o("input", { ref: e, className: l.control, onChange: z, onBlur: u, onFocus: _, ...p }),
39
- n && /* @__PURE__ */ o("span", { className: l.after, children: n })
37
+ return /* @__PURE__ */ v("div", { className: g, children: [
38
+ r && /* @__PURE__ */ i("span", { className: p.before, children: r }),
39
+ /* @__PURE__ */ i("input", { ref: e, className: p.control, onChange: I, onBlur: c, onFocus: u, ...d }),
40
+ n && /* @__PURE__ */ i("span", { className: p.after, children: n })
40
41
  ] });
41
42
  };
42
- d.displayName = m.INPUT;
43
- function D(t) {
44
- const e = t.replace(/\D/g, "").slice(0, 11);
43
+ f.displayName = m.INPUT;
44
+ const R = 8;
45
+ function j(s, e) {
46
+ const t = s.replace(/\D/g, "").slice(0, R);
47
+ if (!t)
48
+ return "";
49
+ const o = e.replace(/[A-Z]/g, "").charAt(0), r = F(e);
50
+ let n = "";
51
+ for (let a = 0; a < t.length; a++)
52
+ r.has(a) && (n += o), n += t[a];
53
+ return n;
54
+ }
55
+ function F(s) {
56
+ switch (s) {
57
+ case "DD/MM/YYYY":
58
+ case "MM/DD/YYYY":
59
+ case "DD.MM.YYYY":
60
+ case "MM.DD.YYYY":
61
+ return /* @__PURE__ */ new Set([2, 4]);
62
+ case "YYYY-MM-DD":
63
+ return /* @__PURE__ */ new Set([4, 6]);
64
+ default:
65
+ return /* @__PURE__ */ new Set([2, 4]);
66
+ }
67
+ }
68
+ function V(s) {
69
+ const e = s.replace(/\D/g, "").slice(0, 11);
45
70
  if (!e)
46
71
  return "";
47
- let s = "+7";
48
- return e.length > 1 && (s += ` (${e.slice(1, 4)}`), e.length >= 4 && (s += `) ${e.slice(4, 7)}`), e.length >= 7 && (s += `-${e.slice(7, 9)}`), e.length >= 9 && (s += `-${e.slice(9, 11)}`), s;
72
+ let t = "+7";
73
+ return e.length > 1 && (t += ` (${e.slice(1, 4)}`), e.length >= 4 && (t += `) ${e.slice(4, 7)}`), e.length >= 7 && (t += `-${e.slice(7, 9)}`), e.length >= 9 && (t += `-${e.slice(9, 11)}`), t;
74
+ }
75
+ const W = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
76
+ function Z(s, e) {
77
+ const o = e.replace(/[A-Z]/g, "").charAt(0);
78
+ if (!o)
79
+ return !1;
80
+ const r = s.split(o);
81
+ if (r.length !== 3)
82
+ return !1;
83
+ const [n, a, l] = r;
84
+ if (!n || !a || !l)
85
+ return !1;
86
+ let c = 0, u = 0, d = 0;
87
+ switch (e) {
88
+ case "DD/MM/YYYY":
89
+ case "DD.MM.YYYY":
90
+ c = parseInt(n, 10), u = parseInt(a, 10), d = parseInt(l, 10);
91
+ break;
92
+ case "MM/DD/YYYY":
93
+ case "MM.DD.YYYY":
94
+ u = parseInt(n, 10), c = parseInt(a, 10), d = parseInt(l, 10);
95
+ break;
96
+ case "YYYY-MM-DD":
97
+ c = parseInt(l, 10), u = parseInt(a, 10), d = parseInt(n, 10);
98
+ break;
99
+ default:
100
+ return !1;
101
+ }
102
+ if (u < 1 || u > 12 || d < 1)
103
+ return !1;
104
+ const I = u === 2 && G(d) ? 29 : W[u] ?? 0;
105
+ return c >= 1 && c <= I;
49
106
  }
50
- function R(t) {
51
- return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t);
107
+ function G(s) {
108
+ return s % 4 === 0 && s % 100 !== 0 || s % 400 === 0;
52
109
  }
53
- const I = (t) => {
54
- const { ref: e, before: s, onBlur: a, invalid: r, ...n } = t, [i, c] = g(!1), u = N(
55
- (p) => {
56
- c(!0), a?.(p);
110
+ function X(s) {
111
+ return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(s);
112
+ }
113
+ const M = (s) => {
114
+ const { ref: e, format: t, before: o, value: r, onChange: n, onBlur: a, invalid: l, ...c } = s, [u, d] = N(!1), g = _(
115
+ (D) => {
116
+ const T = j(D, t);
117
+ n?.(T);
118
+ },
119
+ [t, n]
120
+ ), I = _(
121
+ (D) => {
122
+ d(!0), a?.(D);
57
123
  },
58
124
  [a]
59
- ), _ = r || i && n.value != null && !R(n.value);
60
- return /* @__PURE__ */ o(
61
- d,
125
+ ), h = l || u && typeof r == "string" && r.length > 0 && !Z(r, t);
126
+ return /* @__PURE__ */ i(
127
+ f,
128
+ {
129
+ ref: e,
130
+ type: "text",
131
+ inputMode: "numeric",
132
+ before: o ?? /* @__PURE__ */ i(Y, { name: "calendar", size: 16 }),
133
+ maxLength: 10,
134
+ value: r,
135
+ onChange: g,
136
+ onBlur: I,
137
+ invalid: h,
138
+ ...c
139
+ }
140
+ );
141
+ };
142
+ M.displayName = m.INPUT_DATE;
143
+ const b = (s) => {
144
+ const { ref: e, before: t, onBlur: o, invalid: r, ...n } = s, [a, l] = N(!1), c = _(
145
+ (d) => {
146
+ l(!0), o?.(d);
147
+ },
148
+ [o]
149
+ ), u = r || a && n.value != null && !X(n.value);
150
+ return /* @__PURE__ */ i(
151
+ f,
62
152
  {
63
153
  ref: e,
64
154
  type: "email",
65
- before: s ?? /* @__PURE__ */ o(f, { name: "mail", size: 16 }),
66
- invalid: _,
67
- onBlur: u,
155
+ before: t ?? /* @__PURE__ */ i(Y, { name: "mail", size: 16 }),
156
+ invalid: u,
157
+ onBlur: c,
68
158
  ...n
69
159
  }
70
160
  );
71
161
  };
72
- I.displayName = m.INPUT_EMAIL;
73
- const P = (t) => {
74
- const { ref: e, ...s } = t;
75
- return /* @__PURE__ */ o(d, { ref: e, type: "number", inputMode: "numeric", ...s });
162
+ b.displayName = m.INPUT_EMAIL;
163
+ const P = (s) => {
164
+ const { ref: e, ...t } = s;
165
+ return /* @__PURE__ */ i(f, { ref: e, type: "number", inputMode: "numeric", ...t });
76
166
  };
77
167
  P.displayName = m.INPUT_NUMBER;
78
- const b = (t) => {
79
- const { ref: e, after: s, ...a } = t, r = S(), [n, i] = g(!1), c = N(() => i((u) => !u), []);
80
- return /* @__PURE__ */ o(
81
- d,
168
+ const w = (s) => {
169
+ const { ref: e, after: t, ...o } = s, r = A(), [n, a] = N(!1), l = _(() => a((c) => !c), []);
170
+ return /* @__PURE__ */ i(
171
+ f,
82
172
  {
83
173
  ref: e,
84
174
  type: n ? "text" : "password",
85
- after: s ?? /* @__PURE__ */ o(
175
+ after: t ?? /* @__PURE__ */ i(
86
176
  "button",
87
177
  {
88
178
  type: "button",
89
- className: l.togglePassword,
90
- onClick: c,
179
+ className: p.togglePassword,
180
+ onClick: l,
91
181
  tabIndex: -1,
92
- "aria-label": n ? r.input.passwordHide : r.input.passwordShow,
93
- children: n ? /* @__PURE__ */ o(f, { name: "eye-off", size: 16 }) : /* @__PURE__ */ o(f, { name: "eye", size: 16 })
182
+ "aria-label": n ? r.Input.Password.passwordHide : r.Input.Password.passwordShow,
183
+ children: n ? /* @__PURE__ */ i(Y, { name: "eye-off", size: 16 }) : /* @__PURE__ */ i(Y, { name: "eye", size: 16 })
94
184
  }
95
185
  ),
96
- ...a
186
+ ...o
97
187
  }
98
188
  );
99
189
  };
100
- b.displayName = m.INPUT_PASSWORD;
101
- const h = (t) => {
102
- const { ref: e, before: s, onChange: a, ...r } = t, n = N(
103
- (i) => {
104
- const c = D(i);
105
- a?.(c);
190
+ w.displayName = m.INPUT_PASSWORD;
191
+ const y = (s) => {
192
+ const { ref: e, before: t, onChange: o, ...r } = s, n = _(
193
+ (a) => {
194
+ const l = V(a);
195
+ o?.(l);
106
196
  },
107
- [a]
197
+ [o]
108
198
  );
109
- return /* @__PURE__ */ o(d, { ref: e, type: "tel", before: s ?? /* @__PURE__ */ o(f, { name: "phone", size: 16 }), onChange: n, ...r });
199
+ return /* @__PURE__ */ i(f, { ref: e, type: "tel", before: t ?? /* @__PURE__ */ i(Y, { name: "phone", size: 16 }), onChange: n, ...r });
110
200
  };
111
- h.displayName = m.INPUT_PHONE;
112
- const q = Object.assign(d, {
113
- Email: I,
201
+ y.displayName = m.INPUT_PHONE;
202
+ const te = Object.assign(f, {
203
+ Date: M,
204
+ Email: b,
114
205
  Number: P,
115
- Password: b,
116
- Phone: h
206
+ Password: w,
207
+ Phone: y
117
208
  });
118
209
  export {
119
- q as Input
210
+ te as Input
120
211
  };
@@ -6,24 +6,44 @@ export declare interface IConfigContext {
6
6
  }
7
7
 
8
8
  export declare interface ILocaleMessages {
9
- dialog: {
9
+ Chip: {
10
+ remove: string;
11
+ };
12
+ Dialog: {
10
13
  close: string;
11
14
  };
12
- input: {
13
- passwordHide: string;
14
- passwordShow: string;
15
+ Drawer: {
16
+ Header: {
17
+ close: string;
18
+ };
19
+ };
20
+ Input: {
21
+ Password: {
22
+ passwordHide: string;
23
+ passwordShow: string;
24
+ };
15
25
  };
16
- pagination: {
26
+ Pagination: {
27
+ items: string;
28
+ label: string;
17
29
  next: string;
18
- page: string;
19
- pagination: string;
30
+ of: string;
20
31
  prev: string;
32
+ Item: {
33
+ page: string;
34
+ };
21
35
  };
22
- select: {
36
+ Select: {
23
37
  clear: string;
24
38
  noOptions: string;
25
39
  placeholder: string;
26
40
  };
41
+ Table: {
42
+ ActiveFilters: {
43
+ clearAll: string;
44
+ remove: string;
45
+ };
46
+ };
27
47
  }
28
48
 
29
49
  declare interface IProps extends default_2.PropsWithChildren {
@@ -58,7 +78,7 @@ declare interface IProps extends default_2.PropsWithChildren {
58
78
  * // With custom locale and theme target
59
79
  * <LazarUiProvider
60
80
  * theme="dark"
61
- * locale={{ dialog: { close: 'Закрыть' } }}
81
+ * locale={{ Dialog: { close: 'Закрыть' } }}
62
82
  * themeTarget={document.getElementById('root')}
63
83
  * >
64
84
  * <YourApp />
@@ -1,5 +1,5 @@
1
- import { C as t } from "./useLocale-DdHNhmvT.mjs";
2
- import { L as u, u as x } from "./useLocale-DdHNhmvT.mjs";
1
+ import { C as t } from "./useLocale-CJh-krrY.mjs";
2
+ import { L as u, u as x } from "./useLocale-CJh-krrY.mjs";
3
3
  import { useContext as o } from "react";
4
4
  const i = () => {
5
5
  const r = o(t);
@@ -1,15 +1,15 @@
1
1
  import { jsx as c, jsxs as N } from "react/jsx-runtime";
2
2
  import { createContext as L, useContext as S, useMemo as y, useCallback as R } from "react";
3
3
  import f from "clsx";
4
- import { u as v } from "./useLocale-DdHNhmvT.mjs";
4
+ import { u as v } from "./useLocale-CJh-krrY.mjs";
5
5
  import { g as C } from "./getVariantClassName-D7Nhpuec.mjs";
6
6
  import { I as z } from "./Icon-DsTlU3j3.mjs";
7
- import './pagination.css';const P = L(null), w = P.Provider, I = () => {
7
+ import './pagination.css';const P = L(null), I = P.Provider, w = () => {
8
8
  const n = S(P);
9
9
  if (!n)
10
10
  throw new Error("Pagination sub-component must be used within a Pagination");
11
11
  return n;
12
- }, $ = "_button_nl5gc_14", E = "_active_nl5gc_40", A = "_prevNext_nl5gc_44", j = "_sizeSm_nl5gc_49", k = "_sizeMd_nl5gc_55", B = "_sizeLg_nl5gc_61", m = {
12
+ }, $ = "_button_nl5gc_14", E = "_active_nl5gc_40", A = "_prevNext_nl5gc_44", j = "_sizeSm_nl5gc_49", k = "_sizeMd_nl5gc_55", B = "_sizeLg_nl5gc_61", _ = {
13
13
  button: $,
14
14
  active: E,
15
15
  prevNext: A,
@@ -17,12 +17,12 @@ import './pagination.css';const P = L(null), w = P.Provider, I = () => {
17
17
  sizeMd: k,
18
18
  sizeLg: B
19
19
  }, x = (n) => {
20
- const { page: e, type: a = "page", children: t } = n, { currentPage: r, totalPages: l, disabled: s, onChange: p, size: u } = I(), i = v(), g = e === r, o = s || e < 1 || e > l || g;
21
- let d, _;
22
- a === "prev" ? (d = i.pagination.prev, _ = t ?? /* @__PURE__ */ c(z, { name: "chevron-left", size: 14 })) : a === "next" ? (d = i.pagination.next, _ = t ?? /* @__PURE__ */ c(z, { name: "chevron-right", size: 14 })) : (d = i.pagination.page.replace("{page}", String(e)), _ = t ?? e);
23
- const M = f(m.button, C("size", u, m), {
24
- [m.active]: g,
25
- [m.prevNext]: a !== "page"
20
+ const { page: e, type: a = "page", children: t } = n, { currentPage: l, totalPages: r, disabled: s, onChange: p, size: u } = w(), i = v(), g = e === l, o = s || e < 1 || e > r || g;
21
+ let d, m;
22
+ a === "prev" ? (d = i.Pagination.prev, m = t ?? /* @__PURE__ */ c(z, { name: "chevron-left", size: 14 })) : a === "next" ? (d = i.Pagination.next, m = t ?? /* @__PURE__ */ c(z, { name: "chevron-right", size: 14 })) : (d = i.Pagination.Item.page.replace("{page}", String(e)), m = t ?? e);
23
+ const M = f(_.button, C("size", u, _), {
24
+ [_.active]: g,
25
+ [_.prevNext]: a !== "page"
26
26
  });
27
27
  return /* @__PURE__ */ c(
28
28
  "button",
@@ -33,22 +33,22 @@ import './pagination.css';const P = L(null), w = P.Provider, I = () => {
33
33
  disabled: o,
34
34
  onClick: () => p(e),
35
35
  type: "button",
36
- children: _
36
+ children: m
37
37
  }
38
38
  );
39
39
  }, D = "Pagination", b = (n, e) => Array.from({ length: e - n + 1 }, (a, t) => n + t), V = (n, e) => {
40
40
  if (e <= 7)
41
41
  return b(1, e);
42
- const r = Math.max(n - 1, 1), l = Math.min(n + 1, e), s = r > 2, p = l < e - 1;
42
+ const l = Math.max(n - 1, 1), r = Math.min(n + 1, e), s = l > 2, p = r < e - 1;
43
43
  if (!s && p) {
44
- const i = Math.min(l + 1, e);
44
+ const i = Math.min(r + 1, e);
45
45
  return [...b(1, i), "ellipsis", e];
46
46
  }
47
47
  if (s && !p) {
48
- const i = Math.max(r - 1, 1);
48
+ const i = Math.max(l - 1, 1);
49
49
  return [1, "ellipsis", ...b(i, e)];
50
50
  }
51
- return [1, "ellipsis", ...b(r, l), "ellipsis", e];
51
+ return [1, "ellipsis", ...b(l, r), "ellipsis", e];
52
52
  }, Y = "_root_60eox_6", q = "_disabled_60eox_13", F = "_ellipsis_60eox_18", G = "_sizeSm_60eox_27", H = "_sizeMd_60eox_33", J = "_sizeLg_60eox_39", h = {
53
53
  root: Y,
54
54
  disabled: q,
@@ -57,16 +57,16 @@ import './pagination.css';const P = L(null), w = P.Provider, I = () => {
57
57
  sizeMd: H,
58
58
  sizeLg: J
59
59
  }, K = (n) => {
60
- const { disabled: e = !1, onChange: a, page: t, showPrevNext: r = !0, size: l = "md", totalPages: s } = n, p = v(), u = y(() => V(t, s), [t, s]), i = R(
60
+ const { disabled: e = !1, onChange: a, page: t, showPrevNext: l = !0, size: r = "md", totalPages: s } = n, p = v(), u = y(() => V(t, s), [t, s]), i = R(
61
61
  (o) => {
62
62
  e || o < 1 || o > s || a?.(o);
63
63
  },
64
64
  [e, a, s]
65
- ), g = f(h.root, C("size", l, h), { [h.disabled]: e });
66
- return /* @__PURE__ */ c(w, { value: { currentPage: t, disabled: e, onChange: i, size: l, totalPages: s }, children: /* @__PURE__ */ N("nav", { "aria-label": p.pagination.pagination, className: g, children: [
67
- r && /* @__PURE__ */ c(x, { page: t - 1, type: "prev" }),
65
+ ), g = f(h.root, C("size", r, h), { [h.disabled]: e });
66
+ return /* @__PURE__ */ c(I, { value: { currentPage: t, disabled: e, onChange: i, size: r, totalPages: s }, children: /* @__PURE__ */ N("nav", { "aria-label": p.Pagination.label, className: g, children: [
67
+ l && /* @__PURE__ */ c(x, { page: t - 1, type: "prev" }),
68
68
  u.map((o, d) => o === "ellipsis" ? /* @__PURE__ */ c("span", { "aria-hidden": "true", className: h.ellipsis, children: "…" }, `ellipsis-${d}`) : /* @__PURE__ */ c(x, { page: o, type: "page" }, o)),
69
- r && /* @__PURE__ */ c(x, { page: t + 1, type: "next" })
69
+ l && /* @__PURE__ */ c(x, { page: t + 1, type: "next" })
70
70
  ] }) });
71
71
  };
72
72
  K.displayName = D;
package/dist/select.js CHANGED
@@ -1,9 +1,9 @@
1
- import { jsxs as c, jsx as s } from "react/jsx-runtime";
1
+ import { jsxs as c, jsx as a } from "react/jsx-runtime";
2
2
  import { useState as P, useCallback as h } from "react";
3
3
  import p from "clsx";
4
4
  import { I as m } from "./Icon-DsTlU3j3.mjs";
5
5
  import { Popover as b } from "./popover.js";
6
- import { u as O } from "./useLocale-DdHNhmvT.mjs";
6
+ import { u as O } from "./useLocale-CJh-krrY.mjs";
7
7
  import { g as D } from "./getVariantClassName-D7Nhpuec.mjs";
8
8
  import './select.css';const I = "Select", M = "bottom start", A = "_root_t7wta_7", B = "_disabled_t7wta_28", E = "_invalid_t7wta_35", j = "_sizeSm_t7wta_39", F = "_sizeMd_t7wta_45", U = "_sizeLg_t7wta_51", V = "_displayText_t7wta_57", W = "_displayTextPlaceholder_t7wta_64", Y = "_indicators_t7wta_68", q = "_clearButton_t7wta_74", G = "_chevron_t7wta_92", H = "_optionsList_t7wta_103", J = "_noOptions_t7wta_112", K = "_option_t7wta_103", Q = "_optionSelected_t7wta_132", R = "_optionDisabled_t7wta_138", X = "_optionLabel_t7wta_146", Z = "_checkbox_t7wta_153", $ = "_checkboxChecked_t7wta_165", t = {
9
9
  root: A,
@@ -30,38 +30,38 @@ import './select.css';const I = "Select", M = "bottom start", A = "_root_t7wta_7
30
30
  clearable: w = !1,
31
31
  disabled: i = !1,
32
32
  invalid: u = !1,
33
- multiple: a = !1,
33
+ multiple: s = !1,
34
34
  onChange: o,
35
35
  options: d,
36
36
  placeholder: k,
37
- size: C = "md",
37
+ size: S = "md",
38
38
  value: n
39
- } = v, [g, x] = P(!1), _ = O(), r = a ? d.filter((e) => n?.includes(e.value)) : d.filter((e) => e.value === n), f = r.length > 0 ? r.map((e) => e.label).join(", ") : k ?? _.select.placeholder, L = h(
39
+ } = v, [C, x] = P(!1), _ = O(), r = s ? d.filter((e) => n?.includes(e.value)) : d.filter((e) => e.value === n), f = r.length > 0 ? r.map((e) => e.label).join(", ") : k ?? _.Select.placeholder, g = h(
40
40
  (e) => {
41
41
  if (!e.disabled && o)
42
- if (a) {
42
+ if (s) {
43
43
  const l = n ?? [], y = l.includes(e.value) ? l.filter((T) => T !== e.value) : [...l, e.value];
44
44
  o(y);
45
45
  } else
46
46
  o(e.value), x(!1);
47
47
  },
48
- [a, o, n]
49
- ), N = h(
48
+ [s, o, n]
49
+ ), L = h(
50
50
  (e) => {
51
- e.stopPropagation(), o && o(a ? [] : "");
51
+ e.stopPropagation(), o && o(s ? [] : "");
52
52
  },
53
- [a, o]
54
- ), S = h(
55
- (e) => a ? n?.includes(e) ?? !1 : n === e,
56
- [a, n]
53
+ [s, o]
54
+ ), N = h(
55
+ (e) => s ? n?.includes(e) ?? !1 : n === e,
56
+ [s, n]
57
57
  ), z = p(
58
58
  t.root,
59
- D("size", C, t),
59
+ D("size", S, t),
60
60
  i && t.disabled,
61
61
  u && t.invalid
62
62
  );
63
- return /* @__PURE__ */ c(b, { onOpenChange: x, open: g, placement: M, children: [
64
- /* @__PURE__ */ s(b.Trigger, { children: /* @__PURE__ */ c(
63
+ return /* @__PURE__ */ c(b, { onOpenChange: x, open: C, placement: M, children: [
64
+ /* @__PURE__ */ a(b.Trigger, { children: /* @__PURE__ */ c(
65
65
  "div",
66
66
  {
67
67
  "aria-disabled": i,
@@ -71,34 +71,34 @@ import './select.css';const I = "Select", M = "bottom start", A = "_root_t7wta_7
71
71
  tabIndex: i ? -1 : 0,
72
72
  onClick: i ? (e) => e.stopPropagation() : void 0,
73
73
  children: [
74
- /* @__PURE__ */ s("span", { className: p(t.displayText, !r.length && t.displayTextPlaceholder), children: f }),
74
+ /* @__PURE__ */ a("span", { className: p(t.displayText, !r.length && t.displayTextPlaceholder), children: f }),
75
75
  /* @__PURE__ */ c("span", { className: t.indicators, children: [
76
- w && r.length > 0 && !i && /* @__PURE__ */ s(
76
+ w && r.length > 0 && !i && /* @__PURE__ */ a(
77
77
  "button",
78
78
  {
79
- "aria-label": _.select.clear,
79
+ "aria-label": _.Select.clear,
80
80
  className: t.clearButton,
81
- onClick: N,
81
+ onClick: L,
82
82
  tabIndex: -1,
83
83
  type: "button",
84
- children: /* @__PURE__ */ s(m, { name: "x", size: 14 })
84
+ children: /* @__PURE__ */ a(m, { name: "x", size: 14 })
85
85
  }
86
86
  ),
87
- /* @__PURE__ */ s("span", { className: t.chevron, children: /* @__PURE__ */ s(m, { name: "chevron-down", size: 16 }) })
87
+ /* @__PURE__ */ a("span", { className: t.chevron, children: /* @__PURE__ */ a(m, { name: "chevron-down", size: 16 }) })
88
88
  ] })
89
89
  ]
90
90
  }
91
91
  ) }),
92
- /* @__PURE__ */ s(b.Content, { padding: !1, children: /* @__PURE__ */ c(
92
+ /* @__PURE__ */ a(b.Content, { padding: !1, children: /* @__PURE__ */ c(
93
93
  "ul",
94
94
  {
95
95
  "aria-label": f,
96
96
  className: t.optionsList,
97
97
  role: "listbox",
98
98
  children: [
99
- d.length === 0 && /* @__PURE__ */ s("li", { className: t.noOptions, children: _.select.noOptions }),
99
+ d.length === 0 && /* @__PURE__ */ a("li", { className: t.noOptions, children: _.Select.noOptions }),
100
100
  d.map((e) => {
101
- const l = S(e.value);
101
+ const l = N(e.value);
102
102
  return /* @__PURE__ */ c(
103
103
  "li",
104
104
  {
@@ -110,12 +110,12 @@ import './select.css';const I = "Select", M = "bottom start", A = "_root_t7wta_7
110
110
  e.disabled && t.optionDisabled
111
111
  ),
112
112
  onClick: () => {
113
- L(e);
113
+ g(e);
114
114
  },
115
115
  role: "option",
116
116
  children: [
117
- a && /* @__PURE__ */ s("span", { className: p(t.checkbox, l && t.checkboxChecked), children: l && /* @__PURE__ */ s(m, { name: "check", size: 12, strokeWidth: 3 }) }),
118
- /* @__PURE__ */ s("span", { className: t.optionLabel, children: e.label })
117
+ s && /* @__PURE__ */ a("span", { className: p(t.checkbox, l && t.checkboxChecked), children: l && /* @__PURE__ */ a(m, { name: "check", size: 12, strokeWidth: 3 }) }),
118
+ /* @__PURE__ */ a("span", { className: t.optionLabel, children: e.label })
119
119
  ]
120
120
  },
121
121
  e.value
package/dist/table.css CHANGED
@@ -1 +1 @@
1
- :root{--cell-bg-header: var(--lui-color-background-tertiary);--cell-border-header: var(--lui-color-border-secondary);--cell-padding: var(--lui-space-3) var(--lui-space-4);--cell-max-width: 200px}._root_lmxwt_8{background-color:transparent;border-bottom:1px solid var(--lui-color-border-primary);max-width:var(--cell-max-width);overflow:hidden;padding:var(--cell-padding);text-overflow:ellipsis;white-space:nowrap}._root_lmxwt_8._header_lmxwt_17{background-color:var(--cell-bg-header);border-bottom:2px solid var(--cell-border-header)}._root_lmxwt_8._alignLeft_lmxwt_21{text-align:left}._root_lmxwt_8._alignRight_lmxwt_24{text-align:right}._root_lmxwt_8._alignCenter_lmxwt_27{text-align:center}:root{--table-bg-stripe: var(--lui-color-background-secondary)}._root_t4731_5{background-color:var(--lui-color-background-primary);border-bottom:1px solid var(--lui-color-border-primary);transition:background-color .2s}._root_t4731_5:nth-child(odd){background-color:var(--table-bg-stripe)}._root_t4731_5:hover{background-color:var(--lui-color-background-brand-secondary)}:root{--table-font-size: var(--lui-font-size-md)}._root_k8vfx_5{border-collapse:collapse;font-size:var(--table-font-size);table-layout:fixed;width:100%}
1
+ :root{--active-filters-gap: var(--lui-space-2)}._root_4qb7d_5{align-items:center;display:flex;flex-wrap:wrap;gap:var(--active-filters-gap)}:root{--cell-bg-header: var(--lui-color-background-tertiary);--cell-border-header: var(--lui-color-border-secondary);--cell-padding: var(--lui-space-3) var(--lui-space-4);--cell-max-width: 200px}._root_lmxwt_8{background-color:transparent;border-bottom:1px solid var(--lui-color-border-primary);max-width:var(--cell-max-width);overflow:hidden;padding:var(--cell-padding);text-overflow:ellipsis;white-space:nowrap}._root_lmxwt_8._header_lmxwt_17{background-color:var(--cell-bg-header);border-bottom:2px solid var(--cell-border-header)}._root_lmxwt_8._alignLeft_lmxwt_21{text-align:left}._root_lmxwt_8._alignRight_lmxwt_24{text-align:right}._root_lmxwt_8._alignCenter_lmxwt_27{text-align:center}:root{--table-bg-stripe: var(--lui-color-background-secondary)}._root_t4731_5{background-color:var(--lui-color-background-primary);border-bottom:1px solid var(--lui-color-border-primary);transition:background-color .2s}._root_t4731_5:nth-child(odd){background-color:var(--table-bg-stripe)}._root_t4731_5:hover{background-color:var(--lui-color-background-brand-secondary)}:root{--toolbar-gap: var(--lui-space-3);--toolbar-padding: var(--lui-space-3) 0}._root_d4szt_6{align-items:center;display:flex;gap:var(--toolbar-gap);padding:var(--toolbar-padding)}:root{--table-font-size: var(--lui-font-size-md)}._wrapper_17sd8_5{display:flex;flex-direction:column;gap:var(--lui-space-4)}._root_17sd8_11{border-collapse:collapse;font-size:var(--table-font-size);table-layout:fixed;width:100%}