@lablup/ui-common 0.1.0-alpha.5 → 0.1.0-alpha.7

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 (36) hide show
  1. package/dist/assets/components/BaseCard/BaseCard.css +1 -1
  2. package/dist/assets/components/Button/Button.css +1 -1
  3. package/dist/assets/components/DataTable/DataTable.css +1 -1
  4. package/dist/assets/components/Drawer/Drawer.css +1 -1
  5. package/dist/assets/components/EmptyState/EmptyState.css +1 -1
  6. package/dist/assets/components/ErrorState/ErrorState.css +1 -1
  7. package/dist/assets/components/Tabs/Tabs.css +1 -1
  8. package/dist/assets/components/Tooltip/Tooltip.css +1 -1
  9. package/dist/components/DataTable/DataTable.d.ts +16 -5
  10. package/dist/components/DataTable/DataTable2.js +31 -64
  11. package/dist/components/DataTable/DataTable2.js.map +1 -1
  12. package/dist/components/EmptyState/EmptyState.d.ts +10 -3
  13. package/dist/components/EmptyState/EmptyState2.js +31 -48
  14. package/dist/components/EmptyState/EmptyState2.js.map +1 -1
  15. package/dist/components/EmptyState/index.d.ts +6 -12
  16. package/dist/components/EmptyState/index.js +2 -3
  17. package/dist/components/ErrorState/ErrorState.d.ts +17 -4
  18. package/dist/components/ErrorState/ErrorState2.js +20 -23
  19. package/dist/components/ErrorState/ErrorState2.js.map +1 -1
  20. package/dist/components/ErrorState/index.d.ts +1 -1
  21. package/dist/components/Tabs/Tabs.d.ts +10 -23
  22. package/dist/components/Tabs/Tabs2.js +127 -146
  23. package/dist/components/Tabs/Tabs2.js.map +1 -1
  24. package/dist/components/Tabs/index.d.ts +2 -2
  25. package/dist/components/Tabs/index.js +2 -3
  26. package/dist/index.js +18 -20
  27. package/dist/styles/base.css +30 -8
  28. package/dist/styles/themes/orange-dark.css +3 -0
  29. package/dist/styles/themes/orange-light.css +6 -1
  30. package/package.json +1 -1
  31. package/dist/components/EmptyState/illustrations.d.ts +0 -50
  32. package/dist/components/EmptyState/illustrations.js +0 -571
  33. package/dist/components/EmptyState/illustrations.js.map +0 -1
  34. package/dist/components/Tabs/tabTags.d.ts +0 -9
  35. package/dist/components/Tabs/tabTags.js +0 -11
  36. package/dist/components/Tabs/tabTags.js.map +0 -1
@@ -1,54 +1,46 @@
1
- import { Badge as e } from "../Badge/Badge2.js";
2
- import { TAG_CONFIG as t } from "./tabTags.js";
3
1
  /* empty css */
4
- import { useCallback as n, useEffect as r, useMemo as i, useRef as a, useState as o } from "react";
5
- import { Fragment as s, jsx as c, jsxs as l } from "react/jsx-runtime";
2
+ import { useCallback as e, useEffect as t, useMemo as n, useRef as r, useState as i } from "react";
3
+ import { Fragment as ee, jsx as a, jsxs as o } from "react/jsx-runtime";
6
4
  //#region src/components/Tabs/Tabs.tsx
7
- var ee = {
8
- required: "Required",
9
- recommended: "Recommended",
10
- beta: "Beta",
11
- experimental: "Experimental"
12
- };
13
- function u({ tabs: u, groups: d = [], defaultTab: te, activeTab: f, onTabChange: p, className: m = "", panelClassName: h = "", ariaLabel: ne, showOverflowControls: g = !0, showGroupLabels: _ = !0, overflowMode: re, variant: v = "underlined", fillContainer: ie = !1, renderPanel: y = !0, moreTabsLabel: ae = "More tabs", selectTabLabel: oe = "Select tab", scrollLeftLabel: se = "Scroll left", scrollRightLabel: ce = "Scroll right", tagLabels: b = ee }) {
14
- let x = re ?? (d.length > 0 ? "menu" : "dropdown"), [le, ue] = o(te || u[0]?.id || ""), [de, S] = o(!1), [fe, C] = o(!1), [w, pe] = o(!1), [T, E] = o(!1), [D, O] = o(!1), [me, k] = o(-1), A = a(null), j = a(/* @__PURE__ */ new Map()), M = a(null), N = a(null), P = a(null), F = a([]), I = a(null), L = a(0), R = a(0), z = f ?? le, B = i(() => d.length > 0 ? d.map((e) => ({
5
+ function s({ tabs: s, groups: c = [], defaultTab: te, activeTab: l, onTabChange: u, className: d = "", panelClassName: f = "", ariaLabel: p, showOverflowControls: m = !0, showGroupLabels: h = !0, overflowMode: g, variant: _ = "underlined", fillContainer: ne = !1, renderPanel: v = !0, moreTabsLabel: re = "More tabs", selectTabLabel: ie = "Select tab", scrollLeftLabel: y = "Scroll left", scrollRightLabel: ae = "Scroll right" }) {
6
+ let b = g ?? (c.length > 0 ? "menu" : "dropdown"), [x, oe] = i(te || s[0]?.id || ""), [se, S] = i(!1), [ce, C] = i(!1), [w, le] = i(!1), [T, E] = i(!1), [D, O] = i(!1), [ue, k] = i(-1), A = r(null), j = r(/* @__PURE__ */ new Map()), M = r(null), N = r(null), P = r(null), F = r([]), I = r(null), L = r(0), R = r(0), z = l ?? x, B = n(() => c.length > 0 ? c.map((e) => ({
15
7
  group: e,
16
- tabs: u.filter((t) => t.groupId === e.id)
8
+ tabs: s.filter((t) => t.groupId === e.id)
17
9
  })) : [{
18
10
  group: null,
19
- tabs: u
20
- }], [d, u]), V = i(() => B.flatMap(({ tabs: e }) => e), [B]), H = n((e) => {
21
- f || ue(e), p?.(e), O(!1);
22
- }, [f, p]), U = n((e, t) => {
11
+ tabs: s
12
+ }], [c, s]), V = n(() => B.flatMap(({ tabs: e }) => e), [B]), H = e((e) => {
13
+ l || oe(e), u?.(e), O(!1);
14
+ }, [l, u]), U = e((e, t) => {
23
15
  let n;
24
16
  switch (e.key) {
25
17
  case "ArrowRight":
26
- e.preventDefault(), n = t === u.length - 1 ? 0 : t + 1;
18
+ e.preventDefault(), n = t === s.length - 1 ? 0 : t + 1;
27
19
  break;
28
20
  case "ArrowLeft":
29
- e.preventDefault(), n = t === 0 ? u.length - 1 : t - 1;
21
+ e.preventDefault(), n = t === 0 ? s.length - 1 : t - 1;
30
22
  break;
31
23
  case "Home":
32
24
  e.preventDefault(), n = 0;
33
25
  break;
34
26
  case "End":
35
- e.preventDefault(), n = u.length - 1;
27
+ e.preventDefault(), n = s.length - 1;
36
28
  break;
37
29
  default: return;
38
30
  }
39
- let r = u[n];
31
+ let r = s[n];
40
32
  r && (H(r.id), j.current.get(r.id)?.focus());
41
- }, [u, H]), he = n((e, t) => {
33
+ }, [s, H]), de = e((e, t) => {
42
34
  t ? j.current.set(e, t) : j.current.delete(e);
43
- }, []), W = n(() => {
35
+ }, []), W = e(() => {
44
36
  let e = A.current;
45
- if (!e || !g) {
37
+ if (!e || !m) {
46
38
  S(!1), C(!1);
47
39
  return;
48
40
  }
49
41
  let { scrollLeft: t, scrollWidth: n, clientWidth: r } = e;
50
42
  S(t > 0), C(t + r < n - 1);
51
- }, [g]), G = n((e) => {
43
+ }, [m]), G = e((e) => {
52
44
  let t = A.current;
53
45
  if (!t) return;
54
46
  let n = t.clientWidth * .75;
@@ -56,35 +48,35 @@ function u({ tabs: u, groups: d = [], defaultTab: te, activeTab: f, onTabChange:
56
48
  left: e === "left" ? -n : n,
57
49
  behavior: "smooth"
58
50
  }), I.current !== null && clearTimeout(I.current), I.current = setTimeout(W, 300);
59
- }, [W]), K = n(() => {
51
+ }, [W]), K = e(() => {
60
52
  if (!A.current || w) return;
61
53
  let e = j.current.get(z);
62
54
  if (!e) return;
63
55
  let t = A.current, n = e.getBoundingClientRect(), r = t.getBoundingClientRect();
64
56
  n.left < r.left ? t.scrollLeft -= r.left - n.left + 8 : n.right > r.right && (t.scrollLeft += n.right - r.right + 8);
65
- }, [z, w]), q = n(() => {
66
- typeof window > "u" || x !== "dropdown" || pe(window.innerWidth < 480);
67
- }, [x]), ge = n(() => {
57
+ }, [z, w]), q = e(() => {
58
+ typeof window > "u" || b !== "dropdown" || le(window.innerWidth < 480);
59
+ }, [b]), fe = e(() => {
68
60
  E((e) => !e);
69
- }, []), _e = n((e) => {
61
+ }, []), pe = e((e) => {
70
62
  e.key === "Escape" && T && (e.preventDefault(), E(!1));
71
- }, [T]), J = n((e) => {
63
+ }, [T]), J = e((e) => {
72
64
  e.touches[0] && (L.current = e.touches[0].clientX);
73
- }, []), Y = n((e) => {
65
+ }, []), Y = e((e) => {
74
66
  e.touches[0] && (R.current = e.touches[0].clientX);
75
- }, []), X = n(() => {
67
+ }, []), X = e(() => {
76
68
  if (!L.current || !R.current) return;
77
69
  let e = L.current - R.current;
78
70
  if (Math.abs(e) > 50) {
79
- let t = u.findIndex((e) => e.id === z), n = u[t + 1], r = u[t - 1];
71
+ let t = s.findIndex((e) => e.id === z), n = s[t + 1], r = s[t - 1];
80
72
  e > 0 && n ? H(n.id) : e < 0 && r && H(r.id);
81
73
  }
82
74
  L.current = 0, R.current = 0;
83
75
  }, [
84
76
  z,
85
- u,
77
+ s,
86
78
  H
87
- ]), ve = n((e) => {
79
+ ]), me = e((e) => {
88
80
  let t = V.length;
89
81
  switch (e.key) {
90
82
  case "Escape":
@@ -107,10 +99,10 @@ function u({ tabs: u, groups: d = [], defaultTab: te, activeTab: f, onTabChange:
107
99
  break;
108
100
  case "End": e.preventDefault(), k(t - 1), F.current[t - 1]?.focus();
109
101
  }
110
- }, [V.length]), ye = n((e) => {
102
+ }, [V.length]), he = e((e) => {
111
103
  e.key === "Escape" && D && (e.preventDefault(), O(!1), k(-1));
112
104
  }, [D]);
113
- r(() => {
105
+ t(() => {
114
106
  if (!T) return;
115
107
  let e = (e) => {
116
108
  M.current && !M.current.contains(e.target) && E(!1);
@@ -118,7 +110,7 @@ function u({ tabs: u, groups: d = [], defaultTab: te, activeTab: f, onTabChange:
118
110
  return document.addEventListener("mousedown", e), () => {
119
111
  document.removeEventListener("mousedown", e);
120
112
  };
121
- }, [T]), r(() => {
113
+ }, [T]), t(() => {
122
114
  if (!D) return;
123
115
  let e = (e) => {
124
116
  N.current && !N.current.contains(e.target) && (O(!1), k(-1));
@@ -128,7 +120,7 @@ function u({ tabs: u, groups: d = [], defaultTab: te, activeTab: f, onTabChange:
128
120
  return document.addEventListener("mousedown", e), document.addEventListener("keydown", t), () => {
129
121
  document.removeEventListener("mousedown", e), document.removeEventListener("keydown", t);
130
122
  };
131
- }, [D]), r(() => {
123
+ }, [D]), t(() => {
132
124
  if (D && F.current.length > 0) {
133
125
  let e = V.findIndex((e) => e.id === z), t = e >= 0 ? e : 0;
134
126
  k(t), requestAnimationFrame(() => {
@@ -139,16 +131,16 @@ function u({ tabs: u, groups: d = [], defaultTab: te, activeTab: f, onTabChange:
139
131
  D,
140
132
  V,
141
133
  z
142
- ]), r(() => {
143
- if (!u.find((e) => e.id === z)) {
144
- let e = u[0];
134
+ ]), t(() => {
135
+ if (!s.find((e) => e.id === z)) {
136
+ let e = s[0];
145
137
  e && H(e.id);
146
138
  }
147
139
  }, [
148
- u,
140
+ s,
149
141
  z,
150
142
  H
151
- ]), r(() => {
143
+ ]), t(() => {
152
144
  q(), W();
153
145
  let e = () => {
154
146
  q(), W();
@@ -156,79 +148,73 @@ function u({ tabs: u, groups: d = [], defaultTab: te, activeTab: f, onTabChange:
156
148
  return window.addEventListener("resize", e), () => {
157
149
  window.removeEventListener("resize", e);
158
150
  };
159
- }, [q, W]), r(() => {
151
+ }, [q, W]), t(() => {
160
152
  K();
161
- }, [z, K]), r(() => {
153
+ }, [z, K]), t(() => {
162
154
  W();
163
- }, [u, W]), r(() => () => {
155
+ }, [s, W]), t(() => () => {
164
156
  I.current !== null && clearTimeout(I.current);
165
157
  }, []);
166
- let Z = u.find((e) => e.id === z)?.content, be = u.find((e) => e.id === z)?.label, xe = d.length > 0;
158
+ let Z = s.find((e) => e.id === z)?.content, ge = s.find((e) => e.id === z)?.label, _e = c.length > 0;
167
159
  F.current = [];
168
- let Q = (e) => e.tag ? e.tag : e.required ? "required" : null, Se = (n, r) => {
169
- let i = n.id === z, a = Q(n), o = a ? t[a] : null, s = a ? b[a] : null;
170
- return /* @__PURE__ */ l("button", {
171
- ref: (e) => {
172
- he(n.id, e);
160
+ let Q = (e, t) => {
161
+ let n = e.id === z;
162
+ return /* @__PURE__ */ o("button", {
163
+ ref: (t) => {
164
+ de(e.id, t);
173
165
  },
174
166
  role: "tab",
175
- "aria-selected": i,
176
- "aria-controls": y ? `tabpanel-${n.id}` : void 0,
177
- id: `tab-${n.id}`,
178
- tabIndex: i ? 0 : -1,
179
- className: `tabs__tab${i ? " tabs__tab--active" : ""}`,
167
+ "aria-selected": n,
168
+ "aria-controls": v ? `tabpanel-${e.id}` : void 0,
169
+ id: `tab-${e.id}`,
170
+ tabIndex: n ? 0 : -1,
171
+ className: `tabs__tab${n ? " tabs__tab--active" : ""}`,
180
172
  onClick: () => {
181
- H(n.id);
173
+ H(e.id);
182
174
  },
183
175
  onKeyDown: (e) => {
184
- U(e, r), (e.key === "ArrowLeft" || e.key === "ArrowRight" || e.key === "Home" || e.key === "End") && e.stopPropagation();
176
+ U(e, t), (e.key === "ArrowLeft" || e.key === "ArrowRight" || e.key === "Home" || e.key === "End") && e.stopPropagation();
185
177
  },
186
178
  children: [
187
- n.labelPrefix,
188
- /* @__PURE__ */ c("span", {
179
+ e.labelPrefix,
180
+ /* @__PURE__ */ a("span", {
189
181
  className: "tabs__tab-label",
190
- children: n.label
191
- }),
192
- o && /* @__PURE__ */ c(e, {
193
- variant: o.variant,
194
- size: "small",
195
- className: "tabs__tag-badge",
196
- children: s
182
+ children: e.label
197
183
  }),
198
- n.labelExtra
184
+ e.labelExtra
199
185
  ]
200
- }, n.id);
201
- }, Ce = () => xe ? B.map(({ group: e, tabs: t }, n) => /* @__PURE__ */ l("div", {
186
+ }, e.id);
187
+ }, ve = () => _e ? B.map(({ group: e, tabs: t }, n) => /* @__PURE__ */ o("div", {
202
188
  className: "tabs__group",
203
- children: [e && /* @__PURE__ */ l(s, { children: [n > 0 && /* @__PURE__ */ c("div", {
189
+ children: [e && /* @__PURE__ */ o(ee, { children: [n > 0 && /* @__PURE__ */ a("div", {
204
190
  className: "tabs__separator",
205
191
  role: "separator",
206
192
  "aria-hidden": "true"
207
- }), _ && /* @__PURE__ */ c("span", {
193
+ }), h && /* @__PURE__ */ a("span", {
208
194
  className: "tabs__group-label",
209
195
  children: e.label
210
- })] }), /* @__PURE__ */ c("div", {
196
+ })] }), /* @__PURE__ */ a("div", {
211
197
  className: "tabs__group-tabs",
212
198
  children: t.map((e) => {
213
- let t = u.findIndex((t) => t.id === e.id);
214
- return Se(e, t);
199
+ let t = s.findIndex((t) => t.id === e.id);
200
+ return Q(e, t);
215
201
  })
216
202
  })]
217
- }, e?.id || "default")) : u.map((e, t) => Se(e, t)), we = () => x !== "menu" || !g ? null : /* @__PURE__ */ l("div", {
203
+ }, e?.id || "default")) : s.map((e, t) => Q(e, t)), ye = () => b !== "menu" || !m ? null : /* @__PURE__ */ o("div", {
218
204
  className: "tabs__overflow",
219
205
  ref: N,
220
- children: [/* @__PURE__ */ c("button", {
206
+ children: [/* @__PURE__ */ a("button", {
221
207
  ref: P,
222
208
  type: "button",
223
209
  className: "tabs__overflow-btn",
224
210
  onClick: () => {
225
211
  O(!D);
226
212
  },
227
- onKeyDown: ye,
228
- "aria-label": ae,
213
+ onKeyDown: he,
214
+ "aria-label": re,
229
215
  "aria-expanded": D,
230
216
  "aria-haspopup": "menu",
231
- children: /* @__PURE__ */ l("svg", {
217
+ children: /* @__PURE__ */ o("svg", {
232
218
  width: "20",
233
219
  height: "20",
234
220
  viewBox: "0 0 24 24",
@@ -238,75 +224,70 @@ function u({ tabs: u, groups: d = [], defaultTab: te, activeTab: f, onTabChange:
238
224
  strokeLinecap: "round",
239
225
  strokeLinejoin: "round",
240
226
  children: [
241
- /* @__PURE__ */ c("circle", {
227
+ /* @__PURE__ */ a("circle", {
242
228
  cx: "12",
243
229
  cy: "12",
244
230
  r: "1"
245
231
  }),
246
- /* @__PURE__ */ c("circle", {
232
+ /* @__PURE__ */ a("circle", {
247
233
  cx: "12",
248
234
  cy: "5",
249
235
  r: "1"
250
236
  }),
251
- /* @__PURE__ */ c("circle", {
237
+ /* @__PURE__ */ a("circle", {
252
238
  cx: "12",
253
239
  cy: "19",
254
240
  r: "1"
255
241
  })
256
242
  ]
257
243
  })
258
- }), D && /* @__PURE__ */ c("div", {
244
+ }), D && /* @__PURE__ */ a("div", {
259
245
  className: "tabs__overflow-menu",
260
246
  role: "menu",
261
- onKeyDown: ve,
262
- children: B.map(({ group: n, tabs: r }) => /* @__PURE__ */ l("div", {
247
+ onKeyDown: me,
248
+ children: B.map(({ group: e, tabs: t }) => /* @__PURE__ */ o("div", {
263
249
  className: "tabs__overflow-group",
264
- children: [n && _ && /* @__PURE__ */ c("div", {
250
+ children: [e && h && /* @__PURE__ */ a("div", {
265
251
  className: "tabs__overflow-group-label",
266
- children: n.label
267
- }), r.map((n) => {
268
- let r = n.id === z, i = V.findIndex((e) => e.id === n.id), a = Q(n), o = a ? t[a] : null, s = a ? b[a] : null;
269
- return /* @__PURE__ */ l("button", {
252
+ children: e.label
253
+ }), t.map((e) => {
254
+ let t = e.id === z, n = V.findIndex((t) => t.id === e.id);
255
+ return /* @__PURE__ */ o("button", {
270
256
  ref: (e) => {
271
- e && (F.current[i] = e);
257
+ e && (F.current[n] = e);
272
258
  },
273
259
  role: "menuitem",
274
- tabIndex: me === i ? 0 : -1,
275
- className: `tabs__overflow-item ${r ? "tabs__overflow-item--active" : ""}`,
260
+ tabIndex: ue === n ? 0 : -1,
261
+ className: `tabs__overflow-item ${t ? "tabs__overflow-item--active" : ""}`,
276
262
  onClick: () => {
277
- H(n.id);
263
+ H(e.id);
278
264
  },
279
265
  children: [
280
- n.labelPrefix,
281
- /* @__PURE__ */ c("span", { children: n.label }),
282
- o && /* @__PURE__ */ c(e, {
283
- variant: o.variant,
284
- size: "small",
285
- children: s
286
- }),
287
- n.labelExtra
266
+ e.labelPrefix,
267
+ /* @__PURE__ */ a("span", { children: e.label }),
268
+ e.labelExtra
288
269
  ]
289
- }, n.id);
270
+ }, e.id);
290
271
  })]
291
- }, n?.id || "default"))
272
+ }, e?.id || "default"))
292
273
  })]
293
- }), $ = v === "segmented" || v === "compact";
294
- return x === "dropdown" && w && !$ ? /* @__PURE__ */ l("div", {
295
- className: `tabs tabs--mobile-dropdown ${m}`,
296
- children: [/* @__PURE__ */ l("div", {
274
+ }), $ = _ === "segmented" || _ === "compact";
275
+ return b === "dropdown" && w && !$ ? /* @__PURE__ */ o("div", {
276
+ className: `tabs tabs--mobile-dropdown ${d}`,
277
+ children: [/* @__PURE__ */ o("div", {
297
278
  className: "tabs__dropdown-container",
298
279
  ref: M,
299
- children: [/* @__PURE__ */ l("button", {
280
+ children: [/* @__PURE__ */ o("button", {
300
281
  className: "tabs__dropdown-trigger",
301
- onClick: ge,
302
- onKeyDown: _e,
282
+ onClick: fe,
283
+ onKeyDown: pe,
303
284
  "aria-expanded": T,
304
285
  "aria-haspopup": "listbox",
305
- "aria-label": ne || oe,
306
- children: [/* @__PURE__ */ c("span", {
286
+ "aria-label": p || ie,
287
+ children: [/* @__PURE__ */ a("span", {
307
288
  className: "tabs__dropdown-label",
308
- children: be
309
- }), /* @__PURE__ */ c("svg", {
289
+ children: ge
290
+ }), /* @__PURE__ */ a("svg", {
310
291
  className: `tabs__dropdown-arrow ${T ? "tabs__dropdown-arrow--open" : ""}`,
311
292
  width: "16",
312
293
  height: "16",
@@ -314,7 +295,7 @@ function u({ tabs: u, groups: d = [], defaultTab: te, activeTab: f, onTabChange:
314
295
  fill: "none",
315
296
  xmlns: "http://www.w3.org/2000/svg",
316
297
  "aria-hidden": "true",
317
- children: /* @__PURE__ */ c("path", {
298
+ children: /* @__PURE__ */ a("path", {
318
299
  d: "M4 6L8 10L12 6",
319
300
  stroke: "currentColor",
320
301
  strokeWidth: "2",
@@ -322,10 +303,10 @@ function u({ tabs: u, groups: d = [], defaultTab: te, activeTab: f, onTabChange:
322
303
  strokeLinejoin: "round"
323
304
  })
324
305
  })]
325
- }), T && /* @__PURE__ */ c("div", {
306
+ }), T && /* @__PURE__ */ a("div", {
326
307
  className: "tabs__dropdown-menu",
327
308
  role: "listbox",
328
- children: u.map((e) => /* @__PURE__ */ c("button", {
309
+ children: s.map((e) => /* @__PURE__ */ a("button", {
329
310
  role: "option",
330
311
  "aria-selected": e.id === z,
331
312
  className: `tabs__dropdown-item ${e.id === z ? "tabs__dropdown-item--active" : ""}`,
@@ -335,37 +316,37 @@ function u({ tabs: u, groups: d = [], defaultTab: te, activeTab: f, onTabChange:
335
316
  children: e.label
336
317
  }, e.id))
337
318
  })]
338
- }), y && /* @__PURE__ */ c("div", {
319
+ }), v && /* @__PURE__ */ a("div", {
339
320
  id: `tabpanel-${z}`,
340
321
  role: "tabpanel",
341
322
  "aria-labelledby": `tab-${z}`,
342
- className: `tabs__panel ${h}`.trim(),
323
+ className: `tabs__panel ${f}`.trim(),
343
324
  tabIndex: 0,
344
325
  onTouchStart: J,
345
326
  onTouchMove: Y,
346
327
  onTouchEnd: X,
347
328
  children: Z
348
329
  })]
349
- }) : /* @__PURE__ */ l("div", {
350
- className: `tabs ${x === "menu" ? "tabs--overflow-menu" : ""} ${v === "segmented" ? "tabs--variant-segmented" : v === "compact" ? "tabs--variant-compact" : ""} ${$ && ie ? "tabs--fill-container" : ""} ${m}`.replace(/\s+/g, " ").trim(),
351
- children: [/* @__PURE__ */ l("div", {
330
+ }) : /* @__PURE__ */ o("div", {
331
+ className: `tabs ${b === "menu" ? "tabs--overflow-menu" : ""} ${_ === "segmented" ? "tabs--variant-segmented" : _ === "compact" ? "tabs--variant-compact" : ""} ${$ && ne ? "tabs--fill-container" : ""} ${d}`.replace(/\s+/g, " ").trim(),
332
+ children: [/* @__PURE__ */ o("div", {
352
333
  className: "tabs__container",
353
334
  children: [
354
- g && de && /* @__PURE__ */ c("button", {
335
+ m && se && /* @__PURE__ */ a("button", {
355
336
  className: "tabs__scroll-arrow tabs__scroll-arrow--left",
356
337
  onClick: () => {
357
338
  G("left");
358
339
  },
359
- "aria-label": se,
340
+ "aria-label": y,
360
341
  tabIndex: -1,
361
- children: /* @__PURE__ */ c("svg", {
342
+ children: /* @__PURE__ */ a("svg", {
362
343
  width: "20",
363
344
  height: "20",
364
345
  viewBox: "0 0 20 20",
365
346
  fill: "none",
366
347
  xmlns: "http://www.w3.org/2000/svg",
367
348
  "aria-hidden": "true",
368
- children: /* @__PURE__ */ c("path", {
349
+ children: /* @__PURE__ */ a("path", {
369
350
  d: "M12 15L7 10L12 5",
370
351
  stroke: "currentColor",
371
352
  strokeWidth: "2",
@@ -374,36 +355,36 @@ function u({ tabs: u, groups: d = [], defaultTab: te, activeTab: f, onTabChange:
374
355
  })
375
356
  })
376
357
  }),
377
- /* @__PURE__ */ c("div", {
358
+ /* @__PURE__ */ a("div", {
378
359
  ref: A,
379
360
  className: "tabs__list",
380
361
  role: "tablist",
381
- "aria-label": ne,
362
+ "aria-label": p,
382
363
  onScroll: W,
383
364
  onKeyDown: (e) => {
384
- let t = u.findIndex((e) => e.id === z);
365
+ let t = s.findIndex((e) => e.id === z);
385
366
  t < 0 || U(e, t);
386
367
  },
387
- onTouchStart: x === "dropdown" ? J : void 0,
388
- onTouchMove: x === "dropdown" ? Y : void 0,
389
- onTouchEnd: x === "dropdown" ? X : void 0,
390
- children: Ce()
368
+ onTouchStart: b === "dropdown" ? J : void 0,
369
+ onTouchMove: b === "dropdown" ? Y : void 0,
370
+ onTouchEnd: b === "dropdown" ? X : void 0,
371
+ children: ve()
391
372
  }),
392
- g && fe && /* @__PURE__ */ c("button", {
373
+ m && ce && /* @__PURE__ */ a("button", {
393
374
  className: "tabs__scroll-arrow tabs__scroll-arrow--right",
394
375
  onClick: () => {
395
376
  G("right");
396
377
  },
397
- "aria-label": ce,
378
+ "aria-label": ae,
398
379
  tabIndex: -1,
399
- children: /* @__PURE__ */ c("svg", {
380
+ children: /* @__PURE__ */ a("svg", {
400
381
  width: "20",
401
382
  height: "20",
402
383
  viewBox: "0 0 20 20",
403
384
  fill: "none",
404
385
  xmlns: "http://www.w3.org/2000/svg",
405
386
  "aria-hidden": "true",
406
- children: /* @__PURE__ */ c("path", {
387
+ children: /* @__PURE__ */ a("path", {
407
388
  d: "M8 5L13 10L8 15",
408
389
  stroke: "currentColor",
409
390
  strokeWidth: "2",
@@ -412,20 +393,20 @@ function u({ tabs: u, groups: d = [], defaultTab: te, activeTab: f, onTabChange:
412
393
  })
413
394
  })
414
395
  }),
415
- we()
396
+ ye()
416
397
  ]
417
- }), y && /* @__PURE__ */ c("div", {
398
+ }), v && /* @__PURE__ */ a("div", {
418
399
  id: `tabpanel-${z}`,
419
400
  role: "tabpanel",
420
401
  "aria-labelledby": `tab-${z}`,
421
- className: `tabs__panel ${h}`.trim(),
402
+ className: `tabs__panel ${f}`.trim(),
422
403
  tabIndex: 0,
423
404
  children: Z
424
405
  })]
425
406
  });
426
407
  }
427
408
  //#endregion
428
- export { t as TAG_CONFIG, u as Tabs };
409
+ export { s as Tabs };
429
410
 
430
411
  //# sourceMappingURL=Tabs2.js.map
431
412
  import "../../assets/components/Tabs/Tabs.css";