@locusgraph/components 0.2.1 → 0.2.2

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 (43) hide show
  1. package/dist/action/button-group.js +33 -136
  2. package/dist/action/button.js +15 -62
  3. package/dist/display/badge.js +13 -54
  4. package/dist/display/chat/attachment/attachment-parts.js +52 -218
  5. package/dist/display/chat/attachment/attachment.js +46 -186
  6. package/dist/display/chat/bubble.js +47 -192
  7. package/dist/display/chat/marker.js +32 -131
  8. package/dist/display/chat/message.js +56 -236
  9. package/dist/display/content/item.js +101 -415
  10. package/dist/display/content/kbd.js +18 -77
  11. package/dist/display/rule-grid/rule-grid.js +69 -292
  12. package/dist/display/skeletons/layouts/skeleton-rule-grid.js +25 -74
  13. package/dist/display/skeletons/layouts/skeleton-table.js +38 -158
  14. package/dist/display/skeletons/shapes/skeleton-avatar.js +19 -83
  15. package/dist/display/skeletons/shapes/skeleton-button.js +19 -83
  16. package/dist/display/skeletons/shapes/skeleton-text.js +18 -71
  17. package/dist/display/skeletons/skeleton-parts.js +17 -58
  18. package/dist/display/status/alert.js +30 -122
  19. package/dist/display/status/empty.js +57 -238
  20. package/dist/display/status/skeleton.js +9 -39
  21. package/dist/display/status/spinner.js +10 -40
  22. package/dist/display/table.js +75 -308
  23. package/dist/form/field/field-error.js +24 -107
  24. package/dist/form/field/field-separator.js +14 -65
  25. package/dist/form/field/field-set.js +20 -84
  26. package/dist/form/field/field-text.js +27 -115
  27. package/dist/form/field/field.js +31 -125
  28. package/dist/form/input.js +11 -45
  29. package/dist/form/native-select.js +31 -139
  30. package/dist/form/textarea.js +9 -39
  31. package/dist/layout/use-mobile.js +7 -20
  32. package/dist/navigation/breadcrumb.js +75 -294
  33. package/dist/navigation/navigation-menu.js +83 -359
  34. package/dist/navigation/pagination.js +78 -315
  35. package/dist/shell/app-header.js +21 -73
  36. package/dist/shell/app-shell.js +17 -56
  37. package/dist/shell/breadcrumbs.js +39 -97
  38. package/dist/shell/docs/docs-shell.js +35 -99
  39. package/dist/shell/docs/docs-sidebar.js +39 -86
  40. package/dist/shell/docs/use-active-section.js +31 -75
  41. package/dist/shell/navigation/app-sidebar.js +52 -174
  42. package/dist/shell/navigation/nav-group.js +40 -149
  43. package/package.json +1 -1
@@ -1,84 +1,25 @@
1
- import { c as _c } from "react/compiler-runtime";
2
1
  import { cva } from "class-variance-authority";
3
2
  import { cn } from "cn";
4
3
  import { jsx as _jsx } from "react/jsx-runtime";
5
- function Empty(t0) {
6
- const $ = _c(8);
7
- let className;
8
- let props;
9
- if ($[0] !== t0) {
10
- ({
11
- className,
12
- ...props
13
- } = t0);
14
- $[0] = t0;
15
- $[1] = className;
16
- $[2] = props;
17
- } else {
18
- className = $[1];
19
- props = $[2];
20
- }
21
- let t1;
22
- if ($[3] !== className) {
23
- t1 = cn("flex min-w-0 flex-1 flex-col items-center justify-center gap-6 p-6 text-center text-balance md:p-12", className);
24
- $[3] = className;
25
- $[4] = t1;
26
- } else {
27
- t1 = $[4];
28
- }
29
- let t2;
30
- if ($[5] !== props || $[6] !== t1) {
31
- t2 = /*#__PURE__*/_jsx("div", {
32
- "data-slot": "empty",
33
- className: t1,
34
- ...props
35
- });
36
- $[5] = props;
37
- $[6] = t1;
38
- $[7] = t2;
39
- } else {
40
- t2 = $[7];
41
- }
42
- return t2;
4
+ function Empty({
5
+ className,
6
+ ...props
7
+ }) {
8
+ return /*#__PURE__*/_jsx("div", {
9
+ "data-slot": "empty",
10
+ className: cn("flex min-w-0 flex-1 flex-col items-center justify-center gap-6 p-6 text-center text-balance md:p-12", className),
11
+ ...props
12
+ });
43
13
  }
44
- function EmptyHeader(t0) {
45
- const $ = _c(8);
46
- let className;
47
- let props;
48
- if ($[0] !== t0) {
49
- ({
50
- className,
51
- ...props
52
- } = t0);
53
- $[0] = t0;
54
- $[1] = className;
55
- $[2] = props;
56
- } else {
57
- className = $[1];
58
- props = $[2];
59
- }
60
- let t1;
61
- if ($[3] !== className) {
62
- t1 = cn("flex max-w-sm flex-col items-center gap-2 text-center", className);
63
- $[3] = className;
64
- $[4] = t1;
65
- } else {
66
- t1 = $[4];
67
- }
68
- let t2;
69
- if ($[5] !== props || $[6] !== t1) {
70
- t2 = /*#__PURE__*/_jsx("div", {
71
- "data-slot": "empty-header",
72
- className: t1,
73
- ...props
74
- });
75
- $[5] = props;
76
- $[6] = t1;
77
- $[7] = t2;
78
- } else {
79
- t2 = $[7];
80
- }
81
- return t2;
14
+ function EmptyHeader({
15
+ className,
16
+ ...props
17
+ }) {
18
+ return /*#__PURE__*/_jsx("div", {
19
+ "data-slot": "empty-header",
20
+ className: cn("flex max-w-sm flex-col items-center gap-2 text-center", className),
21
+ ...props
22
+ });
82
23
  }
83
24
  const emptyMediaVariants = cva("mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0", {
84
25
  variants: {
@@ -91,171 +32,49 @@ const emptyMediaVariants = cva("mb-2 flex shrink-0 items-center justify-center [
91
32
  variant: "default"
92
33
  }
93
34
  });
94
- function EmptyMedia(t0) {
95
- const $ = _c(11);
96
- let className;
97
- let props;
98
- let t1;
99
- if ($[0] !== t0) {
100
- ({
101
- className,
102
- variant: t1,
103
- ...props
104
- } = t0);
105
- $[0] = t0;
106
- $[1] = className;
107
- $[2] = props;
108
- $[3] = t1;
109
- } else {
110
- className = $[1];
111
- props = $[2];
112
- t1 = $[3];
113
- }
114
- const variant = t1 === undefined ? "default" : t1;
115
- let t2;
116
- if ($[4] !== className || $[5] !== variant) {
117
- t2 = cn(emptyMediaVariants({
35
+ function EmptyMedia({
36
+ className,
37
+ variant = "default",
38
+ ...props
39
+ }) {
40
+ return /*#__PURE__*/_jsx("div", {
41
+ "data-slot": "empty-icon",
42
+ "data-variant": variant,
43
+ className: cn(emptyMediaVariants({
118
44
  variant,
119
45
  className
120
- }));
121
- $[4] = className;
122
- $[5] = variant;
123
- $[6] = t2;
124
- } else {
125
- t2 = $[6];
126
- }
127
- let t3;
128
- if ($[7] !== props || $[8] !== t2 || $[9] !== variant) {
129
- t3 = /*#__PURE__*/_jsx("div", {
130
- "data-slot": "empty-icon",
131
- "data-variant": variant,
132
- className: t2,
133
- ...props
134
- });
135
- $[7] = props;
136
- $[8] = t2;
137
- $[9] = variant;
138
- $[10] = t3;
139
- } else {
140
- t3 = $[10];
141
- }
142
- return t3;
46
+ })),
47
+ ...props
48
+ });
143
49
  }
144
- function EmptyTitle(t0) {
145
- const $ = _c(8);
146
- let className;
147
- let props;
148
- if ($[0] !== t0) {
149
- ({
150
- className,
151
- ...props
152
- } = t0);
153
- $[0] = t0;
154
- $[1] = className;
155
- $[2] = props;
156
- } else {
157
- className = $[1];
158
- props = $[2];
159
- }
160
- let t1;
161
- if ($[3] !== className) {
162
- t1 = cn("text-lg font-medium tracking-tight", className);
163
- $[3] = className;
164
- $[4] = t1;
165
- } else {
166
- t1 = $[4];
167
- }
168
- let t2;
169
- if ($[5] !== props || $[6] !== t1) {
170
- t2 = /*#__PURE__*/_jsx("div", {
171
- "data-slot": "empty-title",
172
- className: t1,
173
- ...props
174
- });
175
- $[5] = props;
176
- $[6] = t1;
177
- $[7] = t2;
178
- } else {
179
- t2 = $[7];
180
- }
181
- return t2;
50
+ function EmptyTitle({
51
+ className,
52
+ ...props
53
+ }) {
54
+ return /*#__PURE__*/_jsx("div", {
55
+ "data-slot": "empty-title",
56
+ className: cn("text-lg font-medium tracking-tight", className),
57
+ ...props
58
+ });
182
59
  }
183
- function EmptyDescription(t0) {
184
- const $ = _c(8);
185
- let className;
186
- let props;
187
- if ($[0] !== t0) {
188
- ({
189
- className,
190
- ...props
191
- } = t0);
192
- $[0] = t0;
193
- $[1] = className;
194
- $[2] = props;
195
- } else {
196
- className = $[1];
197
- props = $[2];
198
- }
199
- let t1;
200
- if ($[3] !== className) {
201
- t1 = cn("text-sm/relaxed text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary", className);
202
- $[3] = className;
203
- $[4] = t1;
204
- } else {
205
- t1 = $[4];
206
- }
207
- let t2;
208
- if ($[5] !== props || $[6] !== t1) {
209
- t2 = /*#__PURE__*/_jsx("div", {
210
- "data-slot": "empty-description",
211
- className: t1,
212
- ...props
213
- });
214
- $[5] = props;
215
- $[6] = t1;
216
- $[7] = t2;
217
- } else {
218
- t2 = $[7];
219
- }
220
- return t2;
60
+ function EmptyDescription({
61
+ className,
62
+ ...props
63
+ }) {
64
+ return /*#__PURE__*/_jsx("div", {
65
+ "data-slot": "empty-description",
66
+ className: cn("text-sm/relaxed text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary", className),
67
+ ...props
68
+ });
221
69
  }
222
- function EmptyContent(t0) {
223
- const $ = _c(8);
224
- let className;
225
- let props;
226
- if ($[0] !== t0) {
227
- ({
228
- className,
229
- ...props
230
- } = t0);
231
- $[0] = t0;
232
- $[1] = className;
233
- $[2] = props;
234
- } else {
235
- className = $[1];
236
- props = $[2];
237
- }
238
- let t1;
239
- if ($[3] !== className) {
240
- t1 = cn("flex w-full max-w-sm min-w-0 flex-col items-center gap-4 text-sm text-balance", className);
241
- $[3] = className;
242
- $[4] = t1;
243
- } else {
244
- t1 = $[4];
245
- }
246
- let t2;
247
- if ($[5] !== props || $[6] !== t1) {
248
- t2 = /*#__PURE__*/_jsx("div", {
249
- "data-slot": "empty-content",
250
- className: t1,
251
- ...props
252
- });
253
- $[5] = props;
254
- $[6] = t1;
255
- $[7] = t2;
256
- } else {
257
- t2 = $[7];
258
- }
259
- return t2;
70
+ function EmptyContent({
71
+ className,
72
+ ...props
73
+ }) {
74
+ return /*#__PURE__*/_jsx("div", {
75
+ "data-slot": "empty-content",
76
+ className: cn("flex w-full max-w-sm min-w-0 flex-col items-center gap-4 text-sm text-balance", className),
77
+ ...props
78
+ });
260
79
  }
261
80
  export { Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle };
@@ -1,43 +1,13 @@
1
- import { c as _c } from "react/compiler-runtime";
2
1
  import { cn } from "cn";
3
2
  import { jsx as _jsx } from "react/jsx-runtime";
4
- function Skeleton(t0) {
5
- const $ = _c(8);
6
- let className;
7
- let props;
8
- if ($[0] !== t0) {
9
- ({
10
- className,
11
- ...props
12
- } = t0);
13
- $[0] = t0;
14
- $[1] = className;
15
- $[2] = props;
16
- } else {
17
- className = $[1];
18
- props = $[2];
19
- }
20
- let t1;
21
- if ($[3] !== className) {
22
- t1 = cn("animate-pulse rounded-md bg-skeleton", className);
23
- $[3] = className;
24
- $[4] = t1;
25
- } else {
26
- t1 = $[4];
27
- }
28
- let t2;
29
- if ($[5] !== props || $[6] !== t1) {
30
- t2 = /*#__PURE__*/_jsx("div", {
31
- "data-slot": "skeleton",
32
- className: t1,
33
- ...props
34
- });
35
- $[5] = props;
36
- $[6] = t1;
37
- $[7] = t2;
38
- } else {
39
- t2 = $[7];
40
- }
41
- return t2;
3
+ function Skeleton({
4
+ className,
5
+ ...props
6
+ }) {
7
+ return /*#__PURE__*/_jsx("div", {
8
+ "data-slot": "skeleton",
9
+ className: cn("animate-pulse rounded-md bg-skeleton", className),
10
+ ...props
11
+ });
42
12
  }
43
13
  export { Skeleton };
@@ -1,45 +1,15 @@
1
- import { c as _c } from "react/compiler-runtime";
2
1
  import { InProgress as Loader2Icon } from "@carbon/icons-react";
3
2
  import { cn } from "cn";
4
3
  import { jsx as _jsx } from "react/jsx-runtime";
5
- function Spinner(t0) {
6
- const $ = _c(8);
7
- let className;
8
- let props;
9
- if ($[0] !== t0) {
10
- ({
11
- className,
12
- ...props
13
- } = t0);
14
- $[0] = t0;
15
- $[1] = className;
16
- $[2] = props;
17
- } else {
18
- className = $[1];
19
- props = $[2];
20
- }
21
- let t1;
22
- if ($[3] !== className) {
23
- t1 = cn("size-4 animate-spin", className);
24
- $[3] = className;
25
- $[4] = t1;
26
- } else {
27
- t1 = $[4];
28
- }
29
- let t2;
30
- if ($[5] !== props || $[6] !== t1) {
31
- t2 = /*#__PURE__*/_jsx(Loader2Icon, {
32
- role: "status",
33
- "aria-label": "Loading",
34
- className: t1,
35
- ...props
36
- });
37
- $[5] = props;
38
- $[6] = t1;
39
- $[7] = t2;
40
- } else {
41
- t2 = $[7];
42
- }
43
- return t2;
4
+ function Spinner({
5
+ className,
6
+ ...props
7
+ }) {
8
+ return /*#__PURE__*/_jsx(Loader2Icon, {
9
+ role: "status",
10
+ "aria-label": "Loading",
11
+ className: cn("size-4 animate-spin", className),
12
+ ...props
13
+ });
44
14
  }
45
15
  export { Spinner };