@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.
- package/dist/cjs/components/fundamental/breadcrumb.cjs +1 -1
- package/dist/cjs/components/fundamental/button.cjs +1 -1
- package/dist/cjs/components/fundamental/calendar.cjs +1 -1
- package/dist/cjs/components/fundamental/country-dropdown.cjs +1 -1
- package/dist/cjs/components/fundamental/custom-icons.cjs +1 -1
- package/dist/cjs/components/fundamental/dialog.cjs +1 -1
- package/dist/cjs/components/fundamental/file-upload.cjs +1 -1
- package/dist/cjs/components/fundamental/icon.cjs +1 -1
- package/dist/cjs/components/fundamental/month-picker.cjs +1 -1
- package/dist/cjs/components/fundamental/pagination.cjs +1 -1
- package/dist/cjs/components/fundamental/select.cjs +1 -1
- package/dist/cjs/components/fundamental/separator.cjs +1 -1
- package/dist/cjs/components/fundamental/sidebar.cjs +1 -1
- package/dist/cjs/components/fundamental/toast.cjs +1 -1
- package/dist/cjs/components/fundamental/tree.cjs +1 -1
- package/dist/cjs/components/product/app-frame.cjs +1 -1
- package/dist/cjs/components/product/attributes-list.cjs +1 -1
- package/dist/cjs/components/product/bookmarks.cjs +1 -1
- package/dist/cjs/components/product/data-table-settings-menu.cjs +1 -1
- package/dist/cjs/components/product/data-table.cjs +1 -1
- package/dist/cjs/components/product/filters.cjs +1 -1
- package/dist/cjs/components/product/fixture-status.cjs +1 -1
- package/dist/cjs/components/product/linked-chart.cjs +1 -1
- package/dist/cjs/components/product/view-mode-menu.cjs +1 -1
- package/dist/es/components/fundamental/button.js +10 -9
- package/dist/es/components/fundamental/calendar.js +18 -17
- package/dist/es/components/fundamental/custom-icons.js +283 -517
- package/dist/es/components/fundamental/dialog.js +25 -24
- package/dist/es/components/fundamental/file-upload.js +17 -16
- package/dist/es/components/fundamental/icon.js +68 -147
- package/dist/es/components/fundamental/month-picker.js +21 -20
- package/dist/es/components/fundamental/pagination.js +44 -43
- package/dist/es/components/fundamental/select.js +40 -39
- package/dist/es/components/fundamental/separator.js +11 -10
- package/dist/es/components/fundamental/sidebar.js +85 -84
- package/dist/es/components/fundamental/toast.js +8 -7
- package/dist/es/components/product/app-frame.js +83 -82
- package/dist/es/components/product/attributes-list.js +61 -60
- package/dist/es/components/product/bookmarks.js +170 -169
- package/dist/es/components/product/data-table-settings-menu.js +38 -37
- package/dist/es/components/product/data-table.js +374 -373
- package/dist/es/components/product/filters.js +93 -92
- package/dist/es/components/product/fixture-status.js +89 -87
- package/dist/es/components/product/linked-chart.js +54 -53
- package/dist/es/components/product/view-mode-menu.js +176 -175
- package/dist/types/components/core-index.d.cts +1 -1
- package/dist/types/components/core-index.d.ts +1 -1
- package/dist/types/components/fundamental/custom-icons.d.ts +32 -36
- package/dist/types/components/fundamental/dropdown-menu.d.ts +2 -1
- package/dist/types/components/fundamental/icon.d.ts +1 -3
- package/dist/types/components/index.d.ts +2 -1
- package/dist/types/components/product/fixture-status.d.ts +2 -2
- package/dist/types/lib/index.d.cts +1 -1
- package/dist/types/lib/index.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import { jsxs as n, jsx as
|
|
2
|
-
import * as
|
|
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
|
|
5
|
-
import { ButtonGroup as
|
|
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 {
|
|
8
|
-
|
|
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:
|
|
12
|
-
currentPage:
|
|
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
|
|
23
|
-
const
|
|
24
|
-
u(
|
|
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(
|
|
34
|
-
|
|
35
|
-
|
|
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__ */
|
|
42
|
+
children: /* @__PURE__ */ e(r, { name: I, className: "w-4 h-4" })
|
|
42
43
|
}
|
|
43
44
|
),
|
|
44
|
-
/* @__PURE__ */
|
|
45
|
-
|
|
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__ */
|
|
53
|
+
children: /* @__PURE__ */ e(r, { name: $, className: "w-4 h-4" })
|
|
53
54
|
}
|
|
54
55
|
),
|
|
55
|
-
/* @__PURE__ */
|
|
56
|
-
|
|
56
|
+
/* @__PURE__ */ e(
|
|
57
|
+
c,
|
|
57
58
|
{
|
|
58
|
-
onClick:
|
|
59
|
-
disabled:
|
|
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:
|
|
63
|
-
children: /* @__PURE__ */
|
|
63
|
+
onMouseEnter: p ? void 0 : M,
|
|
64
|
+
children: /* @__PURE__ */ e(r, { name: j, className: "w-4 h-4" })
|
|
64
65
|
}
|
|
65
66
|
),
|
|
66
|
-
|
|
67
|
-
|
|
67
|
+
d === "full" && /* @__PURE__ */ e(
|
|
68
|
+
c,
|
|
68
69
|
{
|
|
69
70
|
onClick: T,
|
|
70
|
-
disabled:
|
|
71
|
+
disabled: p,
|
|
71
72
|
"aria-label": "Go to last page",
|
|
72
73
|
className: "px-[var(--space-s)] aspect-square",
|
|
73
|
-
children: /* @__PURE__ */
|
|
74
|
+
children: /* @__PURE__ */ e(r, { name: B, className: "w-4 h-4" })
|
|
74
75
|
}
|
|
75
76
|
)
|
|
76
77
|
] }),
|
|
77
|
-
/* @__PURE__ */ n(
|
|
78
|
-
/* @__PURE__ */
|
|
79
|
-
/* @__PURE__ */
|
|
80
|
-
/* @__PURE__ */
|
|
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(
|
|
83
|
-
/* @__PURE__ */
|
|
84
|
-
f.map((
|
|
85
|
-
|
|
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(
|
|
88
|
+
onClick: () => C(s),
|
|
88
89
|
className: h(
|
|
89
90
|
"cursor-pointer",
|
|
90
|
-
|
|
91
|
+
s === o && "font-medium"
|
|
91
92
|
),
|
|
92
93
|
children: [
|
|
93
|
-
|
|
94
|
-
|
|
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
|
-
|
|
98
|
+
s
|
|
98
99
|
))
|
|
99
100
|
] })
|
|
100
101
|
] })
|
|
@@ -103,7 +104,7 @@ const y = /* @__PURE__ */ L.forwardRef(
|
|
|
103
104
|
);
|
|
104
105
|
}
|
|
105
106
|
);
|
|
106
|
-
|
|
107
|
+
O.displayName = "Pagination";
|
|
107
108
|
export {
|
|
108
|
-
|
|
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
|
|
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
|
-
|
|
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
|
-
),
|
|
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
|
-
),
|
|
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
|
-
),
|
|
46
|
+
), g = i(
|
|
46
47
|
"px-2 py-1 [&]:text-body-medium-sm text-[var(--color-text-tertiary)]"
|
|
47
|
-
),
|
|
48
|
+
), w = i(
|
|
48
49
|
"h-px bg-[var(--color-border-primary-subtle)] my-[var(--space-xs)]"
|
|
49
|
-
),
|
|
50
|
-
const
|
|
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(
|
|
56
|
+
className: s(x({ variant: o, size: a }), t),
|
|
56
57
|
...c,
|
|
57
58
|
children: [
|
|
58
|
-
|
|
59
|
-
/* @__PURE__ */ r(e.Icon, { asChild: !0, children: /* @__PURE__ */ r(n, { name:
|
|
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
|
-
|
|
65
|
-
const
|
|
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
|
-
|
|
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:
|
|
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:
|
|
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
|
-
|
|
93
|
-
const
|
|
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:
|
|
97
|
-
className: s(
|
|
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:
|
|
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
|
-
|
|
106
|
-
const
|
|
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(
|
|
111
|
+
className: s(g(), t),
|
|
111
112
|
...o
|
|
112
113
|
}
|
|
113
114
|
));
|
|
114
|
-
|
|
115
|
-
const
|
|
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(
|
|
120
|
+
className: s(w(), t),
|
|
120
121
|
...o
|
|
121
122
|
}
|
|
122
123
|
));
|
|
123
|
-
|
|
124
|
+
V.displayName = e.Separator.displayName;
|
|
124
125
|
export {
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
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
|
|
4
|
-
import { cn as
|
|
5
|
-
import { Icon as
|
|
6
|
-
|
|
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:
|
|
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(
|
|
27
|
+
children: /* @__PURE__ */ o(f, { name: c, size: "l", color: "tertiary" })
|
|
27
28
|
}
|
|
28
29
|
) : /* @__PURE__ */ o(
|
|
29
|
-
|
|
30
|
+
l.Root,
|
|
30
31
|
{
|
|
31
32
|
ref: n,
|
|
32
33
|
decorative: a,
|
|
33
34
|
orientation: r,
|
|
34
|
-
className:
|
|
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
|
-
|
|
45
|
+
h.displayName = l.Root.displayName;
|
|
45
46
|
export {
|
|
46
|
-
|
|
47
|
+
h as Separator
|
|
47
48
|
};
|