@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,15 +1,16 @@
1
- import { jsxs as n, jsx as a } from "react/jsx-runtime";
2
- import * as L from "react";
1
+ import { jsxs as n, jsx as e } from "react/jsx-runtime";
2
+ import * as q from "react";
3
3
  import { cn as h } from "../../lib/utils.js";
4
- import { Button as l } from "./button.js";
5
- import { ButtonGroup as I } from "./button-group.js";
4
+ import { Button as c } from "./button.js";
5
+ import { ButtonGroup as A } from "./button-group.js";
6
6
  import { Icon as r } from "./icon.js";
7
- import { DropdownMenu as $, DropdownMenuTrigger as j, DropdownMenuContent as B, DropdownMenuLabel as E, DropdownMenuItem as F } from "./dropdown-menu.js";
8
- const y = /* @__PURE__ */ L.forwardRef(
7
+ import { ArrowLeftToLine as I, ArrowLeft as $, ArrowRight as j, ArrowRightToLine as B, ChevronDown as E, Check as F } from "lucide-react";
8
+ import { DropdownMenu as y, DropdownMenuTrigger as P, DropdownMenuContent as H, DropdownMenuLabel as J, DropdownMenuItem as K } from "./dropdown-menu.js";
9
+ const O = /* @__PURE__ */ q.forwardRef(
9
10
  ({
10
11
  className: w,
11
- variant: p = "default",
12
- currentPage: s,
12
+ variant: d = "default",
13
+ currentPage: a,
13
14
  totalItems: i,
14
15
  pageSize: o,
15
16
  onPageChange: t,
@@ -19,9 +20,9 @@ const y = /* @__PURE__ */ L.forwardRef(
19
20
  onPreviousPageHover: v,
20
21
  ...N
21
22
  }, x) => {
22
- const c = Math.ceil(i / o), b = (s - 1) * o + 1, g = Math.min(s * o, i), D = () => t(1), R = () => t(Math.max(1, s - 1)), k = () => t(Math.min(c, s + 1)), T = () => t(c), m = s === 1, d = s === c || i === 0, C = (e) => {
23
- const G = (s - 1) * o + 1, q = Math.ceil(G / e);
24
- u(e), t(Math.max(1, q));
23
+ const l = Math.ceil(i / o), b = (a - 1) * o + 1, g = Math.min(a * o, i), D = () => t(1), R = () => t(Math.max(1, a - 1)), L = () => t(Math.min(l, a + 1)), T = () => t(l), m = a === 1, p = a === l || i === 0, C = (s) => {
24
+ const k = (a - 1) * o + 1, G = Math.ceil(k / s);
25
+ u(s), t(Math.max(1, G));
25
26
  };
26
27
  return /* @__PURE__ */ n(
27
28
  "div",
@@ -30,71 +31,71 @@ const y = /* @__PURE__ */ L.forwardRef(
30
31
  className: h("flex items-center gap-[var(--space-s)]", w),
31
32
  ...N,
32
33
  children: [
33
- /* @__PURE__ */ n(I, { size: "s", children: [
34
- p === "full" && /* @__PURE__ */ a(
35
- l,
34
+ /* @__PURE__ */ n(A, { size: "s", children: [
35
+ d === "full" && /* @__PURE__ */ e(
36
+ c,
36
37
  {
37
38
  onClick: D,
38
39
  disabled: m,
39
40
  "aria-label": "Go to first page",
40
41
  className: "px-[var(--space-s)] aspect-square",
41
- children: /* @__PURE__ */ a(r, { name: "arrow-left-to-line", className: "w-4 h-4" })
42
+ children: /* @__PURE__ */ e(r, { name: I, className: "w-4 h-4" })
42
43
  }
43
44
  ),
44
- /* @__PURE__ */ a(
45
- l,
45
+ /* @__PURE__ */ e(
46
+ c,
46
47
  {
47
48
  onClick: R,
48
49
  disabled: m,
49
50
  "aria-label": "Go to previous page",
50
51
  className: "px-[var(--space-s)] aspect-square",
51
52
  onMouseEnter: m ? void 0 : v,
52
- children: /* @__PURE__ */ a(r, { name: "arrow-left", className: "w-4 h-4" })
53
+ children: /* @__PURE__ */ e(r, { name: $, className: "w-4 h-4" })
53
54
  }
54
55
  ),
55
- /* @__PURE__ */ a(
56
- l,
56
+ /* @__PURE__ */ e(
57
+ c,
57
58
  {
58
- onClick: k,
59
- disabled: d,
59
+ onClick: L,
60
+ disabled: p,
60
61
  "aria-label": "Go to next page",
61
62
  className: "px-[var(--space-s)] aspect-square",
62
- onMouseEnter: d ? void 0 : M,
63
- children: /* @__PURE__ */ a(r, { name: "arrow-right", className: "w-4 h-4" })
63
+ onMouseEnter: p ? void 0 : M,
64
+ children: /* @__PURE__ */ e(r, { name: j, className: "w-4 h-4" })
64
65
  }
65
66
  ),
66
- p === "full" && /* @__PURE__ */ a(
67
- l,
67
+ d === "full" && /* @__PURE__ */ e(
68
+ c,
68
69
  {
69
70
  onClick: T,
70
- disabled: d,
71
+ disabled: p,
71
72
  "aria-label": "Go to last page",
72
73
  className: "px-[var(--space-s)] aspect-square",
73
- children: /* @__PURE__ */ a(r, { name: "arrow-right-to-line", className: "w-4 h-4" })
74
+ children: /* @__PURE__ */ e(r, { name: B, className: "w-4 h-4" })
74
75
  }
75
76
  )
76
77
  ] }),
77
- /* @__PURE__ */ n($, { children: [
78
- /* @__PURE__ */ a(j, { asChild: !0, children: /* @__PURE__ */ n(l, { variant: "ghost", size: "s", className: "gap-1 min-w-0", children: [
79
- /* @__PURE__ */ a("span", { className: "whitespace-nowrap", children: i === 0 ? "0 of 0" : `${b}-${g} of ${i}` }),
80
- /* @__PURE__ */ a(r, { name: "chevron-down", className: "w-4 h-4" })
78
+ /* @__PURE__ */ n(y, { children: [
79
+ /* @__PURE__ */ e(P, { asChild: !0, children: /* @__PURE__ */ n(c, { variant: "ghost", size: "s", className: "gap-1 min-w-0", children: [
80
+ /* @__PURE__ */ e("span", { className: "whitespace-nowrap", children: i === 0 ? "0 of 0" : `${b}-${g} of ${i}` }),
81
+ /* @__PURE__ */ e(r, { name: E, className: "w-4 h-4" })
81
82
  ] }) }),
82
- /* @__PURE__ */ n(B, { align: "end", className: "min-w-[80px]", children: [
83
- /* @__PURE__ */ a(E, { children: "Items per page" }),
84
- f.map((e) => /* @__PURE__ */ n(
85
- F,
83
+ /* @__PURE__ */ n(H, { align: "end", className: "min-w-[80px]", children: [
84
+ /* @__PURE__ */ e(J, { children: "Items per page" }),
85
+ f.map((s) => /* @__PURE__ */ n(
86
+ K,
86
87
  {
87
- onClick: () => C(e),
88
+ onClick: () => C(s),
88
89
  className: h(
89
90
  "cursor-pointer",
90
- e === o && "font-medium"
91
+ s === o && "font-medium"
91
92
  ),
92
93
  children: [
93
- e,
94
- e === o && /* @__PURE__ */ a(r, { name: "check", className: "w-4 h-4 ml-auto text-[var(--color-icon-brand-bold)]" })
94
+ s,
95
+ s === o && /* @__PURE__ */ e(r, { name: F, className: "w-4 h-4 ml-auto text-[var(--color-icon-brand-bold)]" })
95
96
  ]
96
97
  },
97
- e
98
+ s
98
99
  ))
99
100
  ] })
100
101
  ] })
@@ -103,7 +104,7 @@ const y = /* @__PURE__ */ L.forwardRef(
103
104
  );
104
105
  }
105
106
  );
106
- y.displayName = "Pagination";
107
+ O.displayName = "Pagination";
107
108
  export {
108
- y as Pagination
109
+ O as Pagination
109
110
  };
@@ -1,10 +1,11 @@
1
1
  import { jsx as r, jsxs as m } from "react/jsx-runtime";
2
2
  import * as l from "react";
3
3
  import * as e from "@radix-ui/react-select";
4
- import { cva as d } from "class-variance-authority";
4
+ import { cva as i } from "class-variance-authority";
5
5
  import { cn as s } from "../../lib/utils.js";
6
6
  import { Icon as n } from "./icon.js";
7
- const u = d(
7
+ import { ChevronUp as f, ChevronDown as b, Check as v } from "lucide-react";
8
+ const x = i(
8
9
  "flex w-full items-center justify-between gap-[var(--space-xs)] rounded-s border bg-[var(--color-surface-primary)] text-[var(--color-text-primary)] transition-all duration-150 ease-in-out placeholder:text-[var(--color-text-tertiary)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring-color)] focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-100 disabled:bg-[var(--color-background-disabled)] disabled:text-[var(--color-text-disabled)]",
9
10
  {
10
11
  variants: {
@@ -34,47 +35,47 @@ const u = d(
34
35
  size: "m"
35
36
  }
36
37
  }
37
- ), v = d(
38
+ ), h = i(
38
39
  "relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-m border border-[var(--color-border-primary-medium)] bg-[var(--color-surface-primary)] text-[var(--color-text-primary)] shadow-[0px_0px_12px_-2px_rgba(0,14,20,0.08),0px_16px_24px_-8px_rgba(0,14,20,0.08),0px_4px_8px_-4px_rgba(0,14,20,0.04),0px_1px_1px_0px_rgba(0,14,20,0.02)] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2"
39
- ), f = d(
40
+ ), y = i(
40
41
  "relative flex w-full cursor-default select-none items-center h-8 rounded-s outline-none focus:bg-[var(--color-background-neutral-subtlest-hovered)] focus:text-[var(--color-text-primary)] data-[disabled]:pointer-events-none data-[disabled]:opacity-50 px-2 py-1 text-body-md",
41
42
  {
42
43
  variants: {},
43
44
  defaultVariants: {}
44
45
  }
45
- ), x = d(
46
+ ), g = i(
46
47
  "px-2 py-1 [&]:text-body-medium-sm text-[var(--color-text-tertiary)]"
47
- ), h = d(
48
+ ), w = i(
48
49
  "h-px bg-[var(--color-border-primary-subtle)] my-[var(--space-xs)]"
49
- ), R = e.Root, j = e.Group, k = e.Value, y = /* @__PURE__ */ l.forwardRef(({ className: t, variant: o, size: a, children: i, ...c }, p) => {
50
- const b = a || "m";
50
+ ), T = e.Root, L = e.Group, B = e.Value, N = /* @__PURE__ */ l.forwardRef(({ className: t, variant: o, size: a, children: d, ...c }, p) => {
51
+ const u = a || "m";
51
52
  return /* @__PURE__ */ m(
52
53
  e.Trigger,
53
54
  {
54
55
  ref: p,
55
- className: s(u({ variant: o, size: a }), t),
56
+ className: s(x({ variant: o, size: a }), t),
56
57
  ...c,
57
58
  children: [
58
- i,
59
- /* @__PURE__ */ r(e.Icon, { asChild: !0, children: /* @__PURE__ */ r(n, { name: "chevron-down", size: b }) })
59
+ d,
60
+ /* @__PURE__ */ r(e.Icon, { asChild: !0, children: /* @__PURE__ */ r(n, { name: b, size: u }) })
60
61
  ]
61
62
  }
62
63
  );
63
64
  });
64
- y.displayName = e.Trigger.displayName;
65
- const g = /* @__PURE__ */ l.forwardRef(({ className: t, children: o, position: a = "popper", modal: i = !1, ...c }, p) => /* @__PURE__ */ r(e.Portal, { children: /* @__PURE__ */ m(
65
+ N.displayName = e.Trigger.displayName;
66
+ const S = /* @__PURE__ */ l.forwardRef(({ className: t, children: o, position: a = "popper", modal: d = !1, ...c }, p) => /* @__PURE__ */ r(e.Portal, { children: /* @__PURE__ */ m(
66
67
  e.Content,
67
68
  {
68
69
  ref: p,
69
70
  className: s(
70
- v(),
71
+ h(),
71
72
  a === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
72
73
  t
73
74
  ),
74
75
  position: a,
75
76
  ...c,
76
77
  children: [
77
- /* @__PURE__ */ r(e.ScrollUpButton, { className: "flex cursor-default items-center justify-center py-1", children: /* @__PURE__ */ r(n, { name: "chevron-up", size: "s" }) }),
78
+ /* @__PURE__ */ r(e.ScrollUpButton, { className: "flex cursor-default items-center justify-center py-1", children: /* @__PURE__ */ r(n, { name: f, size: "s" }) }),
78
79
  /* @__PURE__ */ r(
79
80
  e.Viewport,
80
81
  {
@@ -85,52 +86,52 @@ const g = /* @__PURE__ */ l.forwardRef(({ className: t, children: o, position: a
85
86
  children: /* @__PURE__ */ r("div", { className: "flex flex-col gap-1", children: o })
86
87
  }
87
88
  ),
88
- /* @__PURE__ */ r(e.ScrollDownButton, { className: "flex cursor-default items-center justify-center py-1", children: /* @__PURE__ */ r(n, { name: "chevron-down", size: "s" }) })
89
+ /* @__PURE__ */ r(e.ScrollDownButton, { className: "flex cursor-default items-center justify-center py-1", children: /* @__PURE__ */ r(n, { name: b, size: "s" }) })
89
90
  ]
90
91
  }
91
92
  ) }));
92
- g.displayName = e.Content.displayName;
93
- const w = /* @__PURE__ */ l.forwardRef(({ className: t, children: o, ...a }, i) => /* @__PURE__ */ m(
93
+ S.displayName = e.Content.displayName;
94
+ const _ = /* @__PURE__ */ l.forwardRef(({ className: t, children: o, ...a }, d) => /* @__PURE__ */ m(
94
95
  e.Item,
95
96
  {
96
- ref: i,
97
- className: s(f(), t),
97
+ ref: d,
98
+ className: s(y(), t),
98
99
  ...a,
99
100
  children: [
100
101
  /* @__PURE__ */ r(e.ItemText, { children: o }),
101
- /* @__PURE__ */ r("span", { className: "absolute right-2 flex h-4 w-4 items-center justify-center", children: /* @__PURE__ */ r(e.ItemIndicator, { children: /* @__PURE__ */ r(n, { name: "check", size: "s", color: "brand" }) }) })
102
+ /* @__PURE__ */ r("span", { className: "absolute right-2 flex h-4 w-4 items-center justify-center", children: /* @__PURE__ */ r(e.ItemIndicator, { children: /* @__PURE__ */ r(n, { name: v, size: "s", color: "brand" }) }) })
102
103
  ]
103
104
  }
104
105
  ));
105
- w.displayName = e.Item.displayName;
106
- const N = /* @__PURE__ */ l.forwardRef(({ className: t, ...o }, a) => /* @__PURE__ */ r(
106
+ _.displayName = e.Item.displayName;
107
+ const z = /* @__PURE__ */ l.forwardRef(({ className: t, ...o }, a) => /* @__PURE__ */ r(
107
108
  e.Label,
108
109
  {
109
110
  ref: a,
110
- className: s(x(), t),
111
+ className: s(g(), t),
111
112
  ...o
112
113
  }
113
114
  ));
114
- N.displayName = e.Label.displayName;
115
- const S = /* @__PURE__ */ l.forwardRef(({ className: t, ...o }, a) => /* @__PURE__ */ r(
115
+ z.displayName = e.Label.displayName;
116
+ const V = /* @__PURE__ */ l.forwardRef(({ className: t, ...o }, a) => /* @__PURE__ */ r(
116
117
  e.Separator,
117
118
  {
118
119
  ref: a,
119
- className: s(h(), t),
120
+ className: s(w(), t),
120
121
  ...o
121
122
  }
122
123
  ));
123
- S.displayName = e.Separator.displayName;
124
+ V.displayName = e.Separator.displayName;
124
125
  export {
125
- R as Select,
126
- g as SelectContent,
127
- j as SelectGroup,
128
- w as SelectItem,
129
- N as SelectLabel,
130
- S as SelectSeparator,
131
- y as SelectTrigger,
132
- k as SelectValue,
133
- v as selectContentVariants,
134
- f as selectItemVariants,
135
- u as selectTriggerVariants
126
+ T as Select,
127
+ S as SelectContent,
128
+ L as SelectGroup,
129
+ _ as SelectItem,
130
+ z as SelectLabel,
131
+ V as SelectSeparator,
132
+ N as SelectTrigger,
133
+ B as SelectValue,
134
+ h as selectContentVariants,
135
+ y as selectItemVariants,
136
+ x as selectTriggerVariants
136
137
  };
@@ -1,9 +1,10 @@
1
1
  import { jsx as o } from "react/jsx-runtime";
2
2
  import * as p from "react";
3
- import * as m from "@radix-ui/react-separator";
4
- import { cn as l } from "../../lib/utils.js";
5
- import { Icon as c } from "./icon.js";
6
- const f = /* @__PURE__ */ p.forwardRef(
3
+ import * as l from "@radix-ui/react-separator";
4
+ import { cn as m } from "../../lib/utils.js";
5
+ import { Icon as f } from "./icon.js";
6
+ import { Dot as c } from "./custom-icons.js";
7
+ const h = /* @__PURE__ */ p.forwardRef(
7
8
  ({
8
9
  className: t,
9
10
  layout: i = "vertical",
@@ -18,20 +19,20 @@ const f = /* @__PURE__ */ p.forwardRef(
18
19
  ref: n,
19
20
  role: a ? "presentation" : "separator",
20
21
  "aria-orientation": r,
21
- className: l(
22
+ className: m(
22
23
  "flex h-[1em] shrink-0 items-center justify-center",
23
24
  t
24
25
  ),
25
26
  ...e,
26
- children: /* @__PURE__ */ o(c, { name: "dot", size: "l", color: "tertiary" })
27
+ children: /* @__PURE__ */ o(f, { name: c, size: "l", color: "tertiary" })
27
28
  }
28
29
  ) : /* @__PURE__ */ o(
29
- m.Root,
30
+ l.Root,
30
31
  {
31
32
  ref: n,
32
33
  decorative: a,
33
34
  orientation: r,
34
- className: l(
35
+ className: m(
35
36
  "shrink-0 bg-[var(--grey-alpha-100)]",
36
37
  r === "horizontal" ? "h-px w-full" : "h-7 w-px",
37
38
  t
@@ -41,7 +42,7 @@ const f = /* @__PURE__ */ p.forwardRef(
41
42
  );
42
43
  }
43
44
  );
44
- f.displayName = m.Root.displayName;
45
+ h.displayName = l.Root.displayName;
45
46
  export {
46
- f as Separator
47
+ h as Separator
47
48
  };