@rafal.lemieszewski/tide-ui 0.85.1 → 0.87.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/dist/cjs/components/fundamental/breadcrumb.cjs +1 -1
  2. package/dist/cjs/components/fundamental/button.cjs +1 -1
  3. package/dist/cjs/components/fundamental/calendar.cjs +1 -1
  4. package/dist/cjs/components/fundamental/country-dropdown.cjs +1 -1
  5. package/dist/cjs/components/fundamental/custom-icons.cjs +1 -1
  6. package/dist/cjs/components/fundamental/dialog.cjs +1 -1
  7. package/dist/cjs/components/fundamental/file-upload.cjs +1 -1
  8. package/dist/cjs/components/fundamental/icon.cjs +1 -1
  9. package/dist/cjs/components/fundamental/month-picker.cjs +1 -1
  10. package/dist/cjs/components/fundamental/pagination.cjs +1 -1
  11. package/dist/cjs/components/fundamental/select.cjs +1 -1
  12. package/dist/cjs/components/fundamental/separator.cjs +1 -1
  13. package/dist/cjs/components/fundamental/sidebar.cjs +1 -1
  14. package/dist/cjs/components/fundamental/toast.cjs +1 -1
  15. package/dist/cjs/components/fundamental/tree.cjs +1 -1
  16. package/dist/cjs/components/product/app-frame.cjs +1 -1
  17. package/dist/cjs/components/product/attributes-list.cjs +1 -1
  18. package/dist/cjs/components/product/bookmarks.cjs +1 -1
  19. package/dist/cjs/components/product/data-table-settings-menu.cjs +1 -1
  20. package/dist/cjs/components/product/data-table.cjs +1 -1
  21. package/dist/cjs/components/product/filters.cjs +1 -1
  22. package/dist/cjs/components/product/fixture-status.cjs +1 -1
  23. package/dist/cjs/components/product/linked-chart.cjs +1 -1
  24. package/dist/cjs/components/product/view-mode-menu.cjs +1 -1
  25. package/dist/es/components/fundamental/button.js +10 -9
  26. package/dist/es/components/fundamental/calendar.js +18 -17
  27. package/dist/es/components/fundamental/custom-icons.js +283 -517
  28. package/dist/es/components/fundamental/dialog.js +25 -24
  29. package/dist/es/components/fundamental/file-upload.js +17 -16
  30. package/dist/es/components/fundamental/icon.js +68 -147
  31. package/dist/es/components/fundamental/month-picker.js +21 -20
  32. package/dist/es/components/fundamental/pagination.js +44 -43
  33. package/dist/es/components/fundamental/select.js +40 -39
  34. package/dist/es/components/fundamental/separator.js +11 -10
  35. package/dist/es/components/fundamental/sidebar.js +85 -84
  36. package/dist/es/components/fundamental/toast.js +8 -7
  37. package/dist/es/components/product/app-frame.js +83 -82
  38. package/dist/es/components/product/attributes-list.js +61 -60
  39. package/dist/es/components/product/bookmarks.js +170 -169
  40. package/dist/es/components/product/data-table-settings-menu.js +38 -37
  41. package/dist/es/components/product/data-table.js +374 -373
  42. package/dist/es/components/product/filters.js +93 -92
  43. package/dist/es/components/product/fixture-status.js +89 -87
  44. package/dist/es/components/product/linked-chart.js +54 -53
  45. package/dist/es/components/product/view-mode-menu.js +176 -175
  46. package/dist/types/components/core-index.d.cts +1 -1
  47. package/dist/types/components/core-index.d.ts +1 -1
  48. package/dist/types/components/fundamental/custom-icons.d.ts +32 -36
  49. package/dist/types/components/fundamental/dropdown-menu.d.ts +2 -1
  50. package/dist/types/components/fundamental/icon.d.ts +1 -3
  51. package/dist/types/components/index.d.ts +2 -1
  52. package/dist/types/components/product/fixture-status.d.ts +2 -2
  53. package/dist/types/lib/index.d.cts +1 -1
  54. package/dist/types/lib/index.d.ts +1 -1
  55. package/package.json +1 -1
@@ -1,11 +1,12 @@
1
1
  import { jsxs as i, jsx as n } from "react/jsx-runtime";
2
- import { useState as I, useId as m, useCallback as u, useMemo as v } from "react";
3
- import { Button as W } from "../fundamental/button.js";
2
+ import { useState as I, useId as m, useCallback as u, useMemo as f } from "react";
3
+ import { Button as U } from "../fundamental/button.js";
4
4
  import { DropdownMenu as X, DropdownMenuTrigger as Y, DropdownMenuContent as _, DropdownMenuSeparator as ee } from "../fundamental/dropdown-menu.js";
5
- import { Select as f, SelectTrigger as b, SelectValue as w, SelectContent as x, SelectItem as o } from "../fundamental/select.js";
5
+ import { Select as v, SelectTrigger as b, SelectValue as w, SelectContent as x, SelectItem as o } from "../fundamental/select.js";
6
6
  import { Toggle as ne } from "../fundamental/toggle.js";
7
7
  import { Icon as R } from "../fundamental/icon.js";
8
- import { Input as ie } from "../fundamental/input.js";
8
+ import { ArrowDownNarrowWide as ie, ArrowDownWideNarrow as ae } from "lucide-react";
9
+ import { Input as re } from "../fundamental/input.js";
9
10
  function j(a) {
10
11
  if (a?.directionOptions)
11
12
  return a.directionOptions;
@@ -22,7 +23,7 @@ function j(a) {
22
23
  }
23
24
  return { asc: "Ascending", desc: "Descending" };
24
25
  }
25
- function he({
26
+ function ge({
26
27
  sortableColumns: a,
27
28
  selectedSortColumn: l,
28
29
  sortDirection: C = "asc",
@@ -32,18 +33,18 @@ function he({
32
33
  selectedGroupColumn: O,
33
34
  onGroupChange: S,
34
35
  columns: t,
35
- visibleColumns: Z,
36
+ visibleColumns: W,
36
37
  onColumnVisibilityChange: D,
37
- align: k = "end",
38
- triggerClassName: B
38
+ align: Z = "end",
39
+ triggerClassName: k
39
40
  }) {
40
- const [h, F] = I(""), [P, c] = I(""), L = m(), M = m(), T = m(), q = u((e) => {
41
+ const [h, B] = I(""), [F, c] = I(""), L = m(), M = m(), T = m(), P = u((e) => {
41
42
  const r = a.find((s) => s.id === e)?.label;
42
43
  c(`Sorting by ${r}`), y?.(e);
43
- }, [a, y]), E = u((e) => {
44
- const r = a.find((U) => U.id === l), s = j(r), g = e === "asc" ? s.asc : s.desc;
44
+ }, [a, y]), q = u((e) => {
45
+ const r = a.find((Q) => Q.id === l), s = j(r), g = e === "asc" ? s.asc : s.desc;
45
46
  c(`Sort direction: ${g}`), N?.(e);
46
- }, [a, l, N]), J = u((e) => {
47
+ }, [a, l, N]), E = u((e) => {
47
48
  if (e === "none")
48
49
  c("Grouping cleared");
49
50
  else {
@@ -51,55 +52,55 @@ function he({
51
52
  c(`Grouping by ${r}`);
52
53
  }
53
54
  S?.(e);
54
- }, [d, S]), K = u((e, r) => {
55
+ }, [d, S]), J = u((e, r) => {
55
56
  const s = t.find((g) => g.id === e)?.label;
56
57
  c(r ? `${s} column shown` : `${s} column hidden`), D?.(e, r);
57
- }, [t, D]), z = a.length > 0, $ = d.length > 0, V = t.length > 0, A = z || $, G = v(
58
+ }, [t, D]), z = a.length > 0, A = d.length > 0, $ = t.length > 0, V = z || A, G = f(
58
59
  () => a.find((e) => e.id === l),
59
60
  [a, l]
60
- ), H = v(
61
+ ), H = f(
61
62
  () => j(G),
62
63
  [G]
63
- ), p = v(() => {
64
+ ), p = f(() => {
64
65
  if (!h) return t;
65
66
  const e = h.toLowerCase();
66
67
  return t.filter(
67
68
  (r) => r.label.toLowerCase().includes(e)
68
69
  );
69
- }, [t, h]), Q = t.length >= 20;
70
+ }, [t, h]), K = t.length >= 20;
70
71
  return /* @__PURE__ */ i(X, { children: [
71
72
  /* @__PURE__ */ n(Y, { asChild: !0, children: /* @__PURE__ */ n(
72
- W,
73
+ U,
73
74
  {
74
75
  size: "m",
75
76
  icon: "settings",
76
77
  "aria-label": "Table settings",
77
- className: B
78
+ className: k
78
79
  }
79
80
  ) }),
80
- /* @__PURE__ */ i(_, { align: k, className: "w-72 max-w-[90vw]", children: [
81
- A && /* @__PURE__ */ n("div", { className: "p-3", children: /* @__PURE__ */ i("div", { className: "space-y-4", children: [
81
+ /* @__PURE__ */ i(_, { align: Z, className: "w-72 max-w-[90vw]", children: [
82
+ V && /* @__PURE__ */ n("div", { className: "p-3", children: /* @__PURE__ */ i("div", { className: "space-y-4", children: [
82
83
  z && /* @__PURE__ */ i("div", { className: "space-y-2", role: "group", "aria-labelledby": L, children: [
83
84
  /* @__PURE__ */ n("h4", { id: L, className: "text-label-sm text-[var(--color-text-tertiary)]", children: "Sorting" }),
84
85
  /* @__PURE__ */ i("div", { className: "flex flex-col gap-2", children: [
85
- /* @__PURE__ */ i(f, { value: l, onValueChange: q, children: [
86
+ /* @__PURE__ */ i(v, { value: l, onValueChange: P, children: [
86
87
  /* @__PURE__ */ n(b, { size: "s", children: /* @__PURE__ */ n(w, { placeholder: "Select column to sort" }) }),
87
88
  /* @__PURE__ */ n(x, { children: a.map((e) => /* @__PURE__ */ n(o, { value: e.id, children: e.label }, e.id)) })
88
89
  ] }),
89
90
  l && /* @__PURE__ */ i(
90
- f,
91
+ v,
91
92
  {
92
93
  value: C,
93
- onValueChange: (e) => E(e),
94
+ onValueChange: (e) => q(e),
94
95
  children: [
95
96
  /* @__PURE__ */ n(b, { size: "s", children: /* @__PURE__ */ n(w, {}) }),
96
97
  /* @__PURE__ */ i(x, { children: [
97
98
  /* @__PURE__ */ n(o, { value: "asc", children: /* @__PURE__ */ i("div", { className: "flex items-center gap-2", children: [
98
- /* @__PURE__ */ n(R, { name: "arrow-down-narrow-wide", size: "s" }),
99
+ /* @__PURE__ */ n(R, { name: ie, size: "s" }),
99
100
  /* @__PURE__ */ n("span", { children: H.asc })
100
101
  ] }) }),
101
102
  /* @__PURE__ */ n(o, { value: "desc", children: /* @__PURE__ */ i("div", { className: "flex items-center gap-2", children: [
102
- /* @__PURE__ */ n(R, { name: "arrow-down-wide-narrow", size: "s" }),
103
+ /* @__PURE__ */ n(R, { name: ae, size: "s" }),
103
104
  /* @__PURE__ */ n("span", { children: H.desc })
104
105
  ] }) })
105
106
  ] })
@@ -108,9 +109,9 @@ function he({
108
109
  )
109
110
  ] })
110
111
  ] }),
111
- $ && /* @__PURE__ */ i("div", { className: "space-y-2", role: "group", "aria-labelledby": M, children: [
112
+ A && /* @__PURE__ */ i("div", { className: "space-y-2", role: "group", "aria-labelledby": M, children: [
112
113
  /* @__PURE__ */ n("h4", { id: M, className: "text-label-sm text-[var(--color-text-tertiary)]", children: "Grouping" }),
113
- /* @__PURE__ */ i(f, { value: O || "none", onValueChange: J, children: [
114
+ /* @__PURE__ */ i(v, { value: O || "none", onValueChange: E, children: [
114
115
  /* @__PURE__ */ n(b, { size: "s", children: /* @__PURE__ */ n(w, { placeholder: "Select column to group by" }) }),
115
116
  /* @__PURE__ */ i(x, { children: [
116
117
  /* @__PURE__ */ n(o, { value: "none", children: "None" }),
@@ -119,18 +120,18 @@ function he({
119
120
  ] })
120
121
  ] })
121
122
  ] }) }),
122
- A && V && /* @__PURE__ */ n(ee, {}),
123
- V && /* @__PURE__ */ n("div", { className: "p-3", children: /* @__PURE__ */ i("div", { className: "space-y-2", role: "group", "aria-labelledby": T, children: [
123
+ V && $ && /* @__PURE__ */ n(ee, {}),
124
+ $ && /* @__PURE__ */ n("div", { className: "p-3", children: /* @__PURE__ */ i("div", { className: "space-y-2", role: "group", "aria-labelledby": T, children: [
124
125
  /* @__PURE__ */ n("h4", { id: T, className: "text-label-sm text-[var(--color-text-tertiary)]", children: "Display columns" }),
125
- Q && /* @__PURE__ */ n(
126
- ie,
126
+ K && /* @__PURE__ */ n(
127
+ re,
127
128
  {
128
129
  type: "search",
129
130
  size: "s",
130
131
  placeholder: "Search columns...",
131
132
  "aria-label": "Search columns",
132
133
  value: h,
133
- onChange: (e) => F(e.target.value)
134
+ onChange: (e) => B(e.target.value)
134
135
  }
135
136
  ),
136
137
  /* @__PURE__ */ n(
@@ -141,7 +142,7 @@ function he({
141
142
  "aria-label": p.length > 15 ? "Column visibility toggles, scrollable" : void 0,
142
143
  tabIndex: p.length > 15 ? 0 : void 0,
143
144
  children: p.map((e) => {
144
- const r = Z.includes(e.id);
145
+ const r = W.includes(e.id);
145
146
  return /* @__PURE__ */ n(
146
147
  ne,
147
148
  {
@@ -150,7 +151,7 @@ function he({
150
151
  pressed: r,
151
152
  "aria-label": r ? `Hide ${e.label} column` : `Show ${e.label} column`,
152
153
  onPressedChange: (s) => {
153
- K(e.id, s);
154
+ J(e.id, s);
154
155
  },
155
156
  children: e.label
156
157
  },
@@ -160,10 +161,10 @@ function he({
160
161
  }
161
162
  )
162
163
  ] }) }),
163
- /* @__PURE__ */ n("div", { "aria-live": "polite", "aria-atomic": "true", className: "sr-only", children: P })
164
+ /* @__PURE__ */ n("div", { "aria-live": "polite", "aria-atomic": "true", className: "sr-only", children: F })
164
165
  ] })
165
166
  ] });
166
167
  }
167
168
  export {
168
- he as DataTableSettingsMenu
169
+ ge as DataTableSettingsMenu
169
170
  };