@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,246 +1,66 @@
1
- import { c as _c } from "react/compiler-runtime";
2
1
  import { cn } from "cn";
3
2
  import * as React from "react";
4
3
  import { jsx as _jsx } from "react/jsx-runtime";
5
- function MessageGroup(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-col gap-2", 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": "message-group",
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 MessageGroup({
5
+ className,
6
+ ...props
7
+ }) {
8
+ return /*#__PURE__*/_jsx("div", {
9
+ "data-slot": "message-group",
10
+ className: cn("flex min-w-0 flex-col gap-2", className),
11
+ ...props
12
+ });
43
13
  }
44
- function Message(t0) {
45
- const $ = _c(10);
46
- let className;
47
- let props;
48
- let t1;
49
- if ($[0] !== t0) {
50
- ({
51
- className,
52
- align: t1,
53
- ...props
54
- } = t0);
55
- $[0] = t0;
56
- $[1] = className;
57
- $[2] = props;
58
- $[3] = t1;
59
- } else {
60
- className = $[1];
61
- props = $[2];
62
- t1 = $[3];
63
- }
64
- const align = t1 === undefined ? "start" : t1;
65
- let t2;
66
- if ($[4] !== className) {
67
- t2 = cn("group/message relative flex w-full min-w-0 gap-2 text-sm data-[align=end]:flex-row-reverse", className);
68
- $[4] = className;
69
- $[5] = t2;
70
- } else {
71
- t2 = $[5];
72
- }
73
- let t3;
74
- if ($[6] !== align || $[7] !== props || $[8] !== t2) {
75
- t3 = /*#__PURE__*/_jsx("div", {
76
- "data-slot": "message",
77
- "data-align": align,
78
- className: t2,
79
- ...props
80
- });
81
- $[6] = align;
82
- $[7] = props;
83
- $[8] = t2;
84
- $[9] = t3;
85
- } else {
86
- t3 = $[9];
87
- }
88
- return t3;
14
+ function Message({
15
+ className,
16
+ align = "start",
17
+ ...props
18
+ }) {
19
+ return /*#__PURE__*/_jsx("div", {
20
+ "data-slot": "message",
21
+ "data-align": align,
22
+ className: cn("group/message relative flex w-full min-w-0 gap-2 text-sm data-[align=end]:flex-row-reverse", className),
23
+ ...props
24
+ });
89
25
  }
90
- function MessageAvatar(t0) {
91
- const $ = _c(8);
92
- let className;
93
- let props;
94
- if ($[0] !== t0) {
95
- ({
96
- className,
97
- ...props
98
- } = t0);
99
- $[0] = t0;
100
- $[1] = className;
101
- $[2] = props;
102
- } else {
103
- className = $[1];
104
- props = $[2];
105
- }
106
- let t1;
107
- if ($[3] !== className) {
108
- t1 = cn("flex w-fit min-w-8 shrink-0 items-center justify-center self-end overflow-hidden rounded-full bg-muted group-has-data-[slot=message-footer]/message:-translate-y-8", className);
109
- $[3] = className;
110
- $[4] = t1;
111
- } else {
112
- t1 = $[4];
113
- }
114
- let t2;
115
- if ($[5] !== props || $[6] !== t1) {
116
- t2 = /*#__PURE__*/_jsx("div", {
117
- "data-slot": "message-avatar",
118
- className: t1,
119
- ...props
120
- });
121
- $[5] = props;
122
- $[6] = t1;
123
- $[7] = t2;
124
- } else {
125
- t2 = $[7];
126
- }
127
- return t2;
26
+ function MessageAvatar({
27
+ className,
28
+ ...props
29
+ }) {
30
+ return /*#__PURE__*/_jsx("div", {
31
+ "data-slot": "message-avatar",
32
+ className: cn("flex w-fit min-w-8 shrink-0 items-center justify-center self-end overflow-hidden rounded-full bg-muted group-has-data-[slot=message-footer]/message:-translate-y-8", className),
33
+ ...props
34
+ });
128
35
  }
129
- function MessageContent(t0) {
130
- const $ = _c(8);
131
- let className;
132
- let props;
133
- if ($[0] !== t0) {
134
- ({
135
- className,
136
- ...props
137
- } = t0);
138
- $[0] = t0;
139
- $[1] = className;
140
- $[2] = props;
141
- } else {
142
- className = $[1];
143
- props = $[2];
144
- }
145
- let t1;
146
- if ($[3] !== className) {
147
- t1 = cn("flex w-full min-w-0 flex-col gap-2.5 wrap-break-word group-data-[align=end]/message:*:data-slot:self-end", className);
148
- $[3] = className;
149
- $[4] = t1;
150
- } else {
151
- t1 = $[4];
152
- }
153
- let t2;
154
- if ($[5] !== props || $[6] !== t1) {
155
- t2 = /*#__PURE__*/_jsx("div", {
156
- "data-slot": "message-content",
157
- className: t1,
158
- ...props
159
- });
160
- $[5] = props;
161
- $[6] = t1;
162
- $[7] = t2;
163
- } else {
164
- t2 = $[7];
165
- }
166
- return t2;
36
+ function MessageContent({
37
+ className,
38
+ ...props
39
+ }) {
40
+ return /*#__PURE__*/_jsx("div", {
41
+ "data-slot": "message-content",
42
+ className: cn("flex w-full min-w-0 flex-col gap-2.5 wrap-break-word group-data-[align=end]/message:*:data-slot:self-end", className),
43
+ ...props
44
+ });
167
45
  }
168
- function MessageHeader(t0) {
169
- const $ = _c(8);
170
- let className;
171
- let props;
172
- if ($[0] !== t0) {
173
- ({
174
- className,
175
- ...props
176
- } = t0);
177
- $[0] = t0;
178
- $[1] = className;
179
- $[2] = props;
180
- } else {
181
- className = $[1];
182
- props = $[2];
183
- }
184
- let t1;
185
- if ($[3] !== className) {
186
- t1 = cn("flex max-w-full min-w-0 items-center px-3 text-xs font-medium text-muted-foreground", className);
187
- $[3] = className;
188
- $[4] = t1;
189
- } else {
190
- t1 = $[4];
191
- }
192
- let t2;
193
- if ($[5] !== props || $[6] !== t1) {
194
- t2 = /*#__PURE__*/_jsx("div", {
195
- "data-slot": "message-header",
196
- className: t1,
197
- ...props
198
- });
199
- $[5] = props;
200
- $[6] = t1;
201
- $[7] = t2;
202
- } else {
203
- t2 = $[7];
204
- }
205
- return t2;
46
+ function MessageHeader({
47
+ className,
48
+ ...props
49
+ }) {
50
+ return /*#__PURE__*/_jsx("div", {
51
+ "data-slot": "message-header",
52
+ className: cn("flex max-w-full min-w-0 items-center px-3 text-xs font-medium text-muted-foreground", className),
53
+ ...props
54
+ });
206
55
  }
207
- function MessageFooter(t0) {
208
- const $ = _c(8);
209
- let className;
210
- let props;
211
- if ($[0] !== t0) {
212
- ({
213
- className,
214
- ...props
215
- } = t0);
216
- $[0] = t0;
217
- $[1] = className;
218
- $[2] = props;
219
- } else {
220
- className = $[1];
221
- props = $[2];
222
- }
223
- let t1;
224
- if ($[3] !== className) {
225
- t1 = cn("flex max-w-full min-w-0 items-center px-3 text-xs font-medium text-muted-foreground group-data-[align=end]/message:justify-end", className);
226
- $[3] = className;
227
- $[4] = t1;
228
- } else {
229
- t1 = $[4];
230
- }
231
- let t2;
232
- if ($[5] !== props || $[6] !== t1) {
233
- t2 = /*#__PURE__*/_jsx("div", {
234
- "data-slot": "message-footer",
235
- className: t1,
236
- ...props
237
- });
238
- $[5] = props;
239
- $[6] = t1;
240
- $[7] = t2;
241
- } else {
242
- t2 = $[7];
243
- }
244
- return t2;
56
+ function MessageFooter({
57
+ className,
58
+ ...props
59
+ }) {
60
+ return /*#__PURE__*/_jsx("div", {
61
+ "data-slot": "message-footer",
62
+ className: cn("flex max-w-full min-w-0 items-center px-3 text-xs font-medium text-muted-foreground group-data-[align=end]/message:justify-end", className),
63
+ ...props
64
+ });
245
65
  }
246
66
  export { Message, MessageAvatar, MessageContent, MessageFooter, MessageGroup, MessageHeader };