@naeil/ui 0.5.0 → 0.7.1
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/CHANGELOG.md +21 -0
- package/DESIGN.md +7 -3
- package/README.md +19 -10
- package/contracts/naeil-chrome.v1.json +12 -0
- package/dist/chunk-HSTDPY56.js +74 -0
- package/dist/chunk-OLKTEYLS.js +413 -0
- package/dist/{chunk-CE73AEJZ.js → chunk-QQQQZEPV.js} +249 -3
- package/dist/{chunk-S64H3OYQ.js → chunk-VWIUN35X.js} +4 -343
- package/dist/components/index.d.ts +2 -2
- package/dist/components/index.js +11 -9
- package/dist/components/naeil-footer.d.ts +16 -0
- package/dist/components/naeil-footer.js +76 -0
- package/dist/components/naeil-header.d.ts +23 -5
- package/dist/components/naeil-header.js +5 -2
- package/dist/components/ui/index.d.ts +2 -2
- package/dist/components/ui/index.js +6 -6
- package/dist/lib/ui-release.d.ts +1 -0
- package/dist/lib/ui-release.js +1 -0
- package/dist/naeil-header-content-BvISJ4RV.d.ts +4 -0
- package/dist/{navigation-CL10a6Eb.d.ts → navigation-CgPeL9tF.d.ts} +1 -1
- package/dist/{site-footer-B67meCDv.d.ts → site-footer-vXDa_6yr.d.ts} +4 -2
- package/dist/source/components/footer.js +1 -2
- package/dist/source/components/naeil-footer.d.ts +16 -0
- package/dist/source/components/naeil-footer.js +95 -0
- package/dist/source/components/naeil-header-account.d.ts +26 -0
- package/dist/source/components/naeil-header-account.js +67 -0
- package/dist/source/components/naeil-header.d.ts +2 -1
- package/dist/source/components/naeil-header.js +6 -1
- package/dist/source/components/ui/site-footer.d.ts +4 -2
- package/dist/source/components/ui/site-footer.js +6 -2
- package/dist/source/lib/ui-release.d.ts +6 -0
- package/dist/source/lib/ui-release.js +4 -0
- package/docs/components/README.md +4 -1
- package/docs/components/application-layout.md +103 -0
- package/docs/components/common.md +2 -2
- package/docs/components/naeil-footer.md +20 -0
- package/docs/components/naeil-header.md +22 -6
- package/docs/components/navigation.md +8 -8
- package/docs/design/v2-migration.md +24 -25
- package/docs/package-release.md +12 -6
- package/package.json +16 -4
- package/src/styles/components.css +39 -4
- package/src/styles/theme.css +3 -1
- package/dist/chunk-QSTGUEEI.js +0 -323
package/src/styles/theme.css
CHANGED
|
@@ -152,7 +152,9 @@
|
|
|
152
152
|
--ui-field-gap-compact: 16px;
|
|
153
153
|
--ui-width-reading: 640px;
|
|
154
154
|
--ui-width-settings: 640px;
|
|
155
|
-
--ui-width-list:
|
|
155
|
+
--ui-width-list: 1600px;
|
|
156
|
+
--ui-width-frame: 1600px;
|
|
157
|
+
--ui-frame-gutter: clamp(16px, 2.4vw, 40px);
|
|
156
158
|
--ui-width-short-form: 480px;
|
|
157
159
|
--ui-motion-fast: 120ms;
|
|
158
160
|
--ui-motion-standard: 180ms;
|
package/dist/chunk-QSTGUEEI.js
DELETED
|
@@ -1,323 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import {
|
|
3
|
-
useOverlayRef,
|
|
4
|
-
useRadixHiddenInert
|
|
5
|
-
} from "./chunk-CE73AEJZ.js";
|
|
6
|
-
import {
|
|
7
|
-
__objRest,
|
|
8
|
-
__spreadProps,
|
|
9
|
-
__spreadValues,
|
|
10
|
-
cn
|
|
11
|
-
} from "./chunk-JBTDRVZ7.js";
|
|
12
|
-
|
|
13
|
-
// src/components/ui/site-footer.tsx
|
|
14
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
15
|
-
function SiteFooter(_a) {
|
|
16
|
-
var _b = _a, {
|
|
17
|
-
brand,
|
|
18
|
-
description,
|
|
19
|
-
groups = [],
|
|
20
|
-
Link,
|
|
21
|
-
meta,
|
|
22
|
-
children,
|
|
23
|
-
containerClassName,
|
|
24
|
-
className,
|
|
25
|
-
variant = "full"
|
|
26
|
-
} = _b, props = __objRest(_b, [
|
|
27
|
-
"brand",
|
|
28
|
-
"description",
|
|
29
|
-
"groups",
|
|
30
|
-
"Link",
|
|
31
|
-
"meta",
|
|
32
|
-
"children",
|
|
33
|
-
"containerClassName",
|
|
34
|
-
"className",
|
|
35
|
-
"variant"
|
|
36
|
-
]);
|
|
37
|
-
return /* @__PURE__ */ jsx(
|
|
38
|
-
"footer",
|
|
39
|
-
__spreadProps(__spreadValues({
|
|
40
|
-
"data-slot": "site-footer",
|
|
41
|
-
"data-variant": variant,
|
|
42
|
-
className: cn("ui-site-footer", className)
|
|
43
|
-
}, props), {
|
|
44
|
-
children: /* @__PURE__ */ jsxs("div", { className: cn("ui-site-footer-frame", containerClassName), children: [
|
|
45
|
-
/* @__PURE__ */ jsxs("div", { className: "ui-site-footer-brand", children: [
|
|
46
|
-
brand,
|
|
47
|
-
description && /* @__PURE__ */ jsx("div", { className: "ui-site-footer-description", children: description }),
|
|
48
|
-
children
|
|
49
|
-
] }),
|
|
50
|
-
groups.map((group) => /* @__PURE__ */ jsxs("nav", { "aria-label": group.label, children: [
|
|
51
|
-
/* @__PURE__ */ jsx("h2", { className: "ui-site-footer-label", children: group.label }),
|
|
52
|
-
group.links.map((item) => {
|
|
53
|
-
const Component = !item.external && Link ? Link : "a";
|
|
54
|
-
return /* @__PURE__ */ jsx(
|
|
55
|
-
Component,
|
|
56
|
-
{
|
|
57
|
-
href: item.href,
|
|
58
|
-
target: item.target,
|
|
59
|
-
rel: item.target === "_blank" ? "noopener noreferrer" : void 0,
|
|
60
|
-
className: "ui-site-footer-link ui-focus",
|
|
61
|
-
children: item.label
|
|
62
|
-
},
|
|
63
|
-
item.id
|
|
64
|
-
);
|
|
65
|
-
})
|
|
66
|
-
] }, group.id)),
|
|
67
|
-
meta && /* @__PURE__ */ jsx("div", { className: "ui-site-footer-meta", children: meta })
|
|
68
|
-
] })
|
|
69
|
-
})
|
|
70
|
-
);
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
// src/components/ui/dropdown-menu.tsx
|
|
74
|
-
import { CheckIcon, ChevronRightIcon, CircleIcon } from "lucide-react";
|
|
75
|
-
import { DropdownMenu as DropdownMenuPrimitive } from "radix-ui";
|
|
76
|
-
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
77
|
-
function DropdownMenu(_a) {
|
|
78
|
-
var props = __objRest(_a, []);
|
|
79
|
-
return /* @__PURE__ */ jsx2(DropdownMenuPrimitive.Root, __spreadValues({ "data-slot": "dropdown-menu" }, props));
|
|
80
|
-
}
|
|
81
|
-
function DropdownMenuPortal(_a) {
|
|
82
|
-
var props = __objRest(_a, []);
|
|
83
|
-
return /* @__PURE__ */ jsx2(DropdownMenuPrimitive.Portal, __spreadValues({ "data-slot": "dropdown-menu-portal" }, props));
|
|
84
|
-
}
|
|
85
|
-
function DropdownMenuTrigger(_a) {
|
|
86
|
-
var props = __objRest(_a, []);
|
|
87
|
-
return /* @__PURE__ */ jsx2(
|
|
88
|
-
DropdownMenuPrimitive.Trigger,
|
|
89
|
-
__spreadValues({
|
|
90
|
-
"data-slot": "dropdown-menu-trigger"
|
|
91
|
-
}, props)
|
|
92
|
-
);
|
|
93
|
-
}
|
|
94
|
-
function DropdownMenuContent(_a) {
|
|
95
|
-
var _b = _a, {
|
|
96
|
-
ref,
|
|
97
|
-
className,
|
|
98
|
-
sideOffset = 4
|
|
99
|
-
} = _b, props = __objRest(_b, [
|
|
100
|
-
"ref",
|
|
101
|
-
"className",
|
|
102
|
-
"sideOffset"
|
|
103
|
-
]);
|
|
104
|
-
const [content, contentRef] = useOverlayRef(ref);
|
|
105
|
-
useRadixHiddenInert(content);
|
|
106
|
-
return /* @__PURE__ */ jsx2(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx2(
|
|
107
|
-
DropdownMenuPrimitive.Content,
|
|
108
|
-
__spreadValues({
|
|
109
|
-
ref: contentRef,
|
|
110
|
-
"data-slot": "dropdown-menu-content",
|
|
111
|
-
sideOffset,
|
|
112
|
-
className: cn(
|
|
113
|
-
"ui-menu ui-popup z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border border-border-strong p-1 shadow-md",
|
|
114
|
-
className
|
|
115
|
-
)
|
|
116
|
-
}, props)
|
|
117
|
-
) });
|
|
118
|
-
}
|
|
119
|
-
function DropdownMenuGroup(_a) {
|
|
120
|
-
var props = __objRest(_a, []);
|
|
121
|
-
return /* @__PURE__ */ jsx2(DropdownMenuPrimitive.Group, __spreadValues({ "data-slot": "dropdown-menu-group" }, props));
|
|
122
|
-
}
|
|
123
|
-
function DropdownMenuItem(_a) {
|
|
124
|
-
var _b = _a, {
|
|
125
|
-
className,
|
|
126
|
-
inset,
|
|
127
|
-
variant = "default"
|
|
128
|
-
} = _b, props = __objRest(_b, [
|
|
129
|
-
"className",
|
|
130
|
-
"inset",
|
|
131
|
-
"variant"
|
|
132
|
-
]);
|
|
133
|
-
return /* @__PURE__ */ jsx2(
|
|
134
|
-
DropdownMenuPrimitive.Item,
|
|
135
|
-
__spreadValues({
|
|
136
|
-
"data-slot": "dropdown-menu-item",
|
|
137
|
-
"data-inset": inset,
|
|
138
|
-
"data-variant": variant,
|
|
139
|
-
className: cn(
|
|
140
|
-
"focus:bg-surface-subtle data-[variant=destructive]:text-error data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-error data-[variant=destructive]:*:[svg]:!text-error [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-md px-2 py-1.5 text-base outline-hidden select-none transition-colors duration-(--ui-motion-fast) data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
141
|
-
className
|
|
142
|
-
)
|
|
143
|
-
}, props)
|
|
144
|
-
);
|
|
145
|
-
}
|
|
146
|
-
function DropdownMenuCheckboxItem(_a) {
|
|
147
|
-
var _b = _a, {
|
|
148
|
-
className,
|
|
149
|
-
children,
|
|
150
|
-
checked
|
|
151
|
-
} = _b, props = __objRest(_b, [
|
|
152
|
-
"className",
|
|
153
|
-
"children",
|
|
154
|
-
"checked"
|
|
155
|
-
]);
|
|
156
|
-
return /* @__PURE__ */ jsxs2(
|
|
157
|
-
DropdownMenuPrimitive.CheckboxItem,
|
|
158
|
-
__spreadProps(__spreadValues({
|
|
159
|
-
"data-slot": "dropdown-menu-checkbox-item",
|
|
160
|
-
className: cn(
|
|
161
|
-
"focus:bg-surface-subtle relative flex cursor-default items-center gap-2 rounded-md py-1.5 pr-2 pl-8 text-base outline-hidden select-none transition-colors duration-(--ui-motion-fast) data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
162
|
-
className
|
|
163
|
-
),
|
|
164
|
-
checked
|
|
165
|
-
}, props), {
|
|
166
|
-
children: [
|
|
167
|
-
/* @__PURE__ */ jsx2("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx2(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx2(CheckIcon, { className: "size-4" }) }) }),
|
|
168
|
-
children
|
|
169
|
-
]
|
|
170
|
-
})
|
|
171
|
-
);
|
|
172
|
-
}
|
|
173
|
-
function DropdownMenuRadioGroup(_a) {
|
|
174
|
-
var props = __objRest(_a, []);
|
|
175
|
-
return /* @__PURE__ */ jsx2(
|
|
176
|
-
DropdownMenuPrimitive.RadioGroup,
|
|
177
|
-
__spreadValues({
|
|
178
|
-
"data-slot": "dropdown-menu-radio-group"
|
|
179
|
-
}, props)
|
|
180
|
-
);
|
|
181
|
-
}
|
|
182
|
-
function DropdownMenuRadioItem(_a) {
|
|
183
|
-
var _b = _a, {
|
|
184
|
-
className,
|
|
185
|
-
children
|
|
186
|
-
} = _b, props = __objRest(_b, [
|
|
187
|
-
"className",
|
|
188
|
-
"children"
|
|
189
|
-
]);
|
|
190
|
-
return /* @__PURE__ */ jsxs2(
|
|
191
|
-
DropdownMenuPrimitive.RadioItem,
|
|
192
|
-
__spreadProps(__spreadValues({
|
|
193
|
-
"data-slot": "dropdown-menu-radio-item",
|
|
194
|
-
className: cn(
|
|
195
|
-
"focus:bg-surface-subtle relative flex cursor-default items-center gap-2 rounded-md py-1.5 pr-2 pl-8 text-base outline-hidden select-none transition-colors duration-(--ui-motion-fast) data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
196
|
-
className
|
|
197
|
-
)
|
|
198
|
-
}, props), {
|
|
199
|
-
children: [
|
|
200
|
-
/* @__PURE__ */ jsx2("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx2(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx2(CircleIcon, { className: "size-2 fill-current" }) }) }),
|
|
201
|
-
children
|
|
202
|
-
]
|
|
203
|
-
})
|
|
204
|
-
);
|
|
205
|
-
}
|
|
206
|
-
function DropdownMenuLabel(_a) {
|
|
207
|
-
var _b = _a, {
|
|
208
|
-
className,
|
|
209
|
-
inset
|
|
210
|
-
} = _b, props = __objRest(_b, [
|
|
211
|
-
"className",
|
|
212
|
-
"inset"
|
|
213
|
-
]);
|
|
214
|
-
return /* @__PURE__ */ jsx2(
|
|
215
|
-
DropdownMenuPrimitive.Label,
|
|
216
|
-
__spreadValues({
|
|
217
|
-
"data-slot": "dropdown-menu-label",
|
|
218
|
-
"data-inset": inset,
|
|
219
|
-
className: cn(
|
|
220
|
-
"px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",
|
|
221
|
-
className
|
|
222
|
-
)
|
|
223
|
-
}, props)
|
|
224
|
-
);
|
|
225
|
-
}
|
|
226
|
-
function DropdownMenuSeparator(_a) {
|
|
227
|
-
var _b = _a, {
|
|
228
|
-
className
|
|
229
|
-
} = _b, props = __objRest(_b, [
|
|
230
|
-
"className"
|
|
231
|
-
]);
|
|
232
|
-
return /* @__PURE__ */ jsx2(
|
|
233
|
-
DropdownMenuPrimitive.Separator,
|
|
234
|
-
__spreadValues({
|
|
235
|
-
"data-slot": "dropdown-menu-separator",
|
|
236
|
-
className: cn("bg-border-subtle -mx-1 my-1 h-px", className)
|
|
237
|
-
}, props)
|
|
238
|
-
);
|
|
239
|
-
}
|
|
240
|
-
function DropdownMenuShortcut(_a) {
|
|
241
|
-
var _b = _a, {
|
|
242
|
-
className
|
|
243
|
-
} = _b, props = __objRest(_b, [
|
|
244
|
-
"className"
|
|
245
|
-
]);
|
|
246
|
-
return /* @__PURE__ */ jsx2(
|
|
247
|
-
"span",
|
|
248
|
-
__spreadValues({
|
|
249
|
-
"data-slot": "dropdown-menu-shortcut",
|
|
250
|
-
className: cn(
|
|
251
|
-
"text-muted-foreground ml-auto text-xs tracking-widest",
|
|
252
|
-
className
|
|
253
|
-
)
|
|
254
|
-
}, props)
|
|
255
|
-
);
|
|
256
|
-
}
|
|
257
|
-
function DropdownMenuSub(_a) {
|
|
258
|
-
var props = __objRest(_a, []);
|
|
259
|
-
return /* @__PURE__ */ jsx2(DropdownMenuPrimitive.Sub, __spreadValues({ "data-slot": "dropdown-menu-sub" }, props));
|
|
260
|
-
}
|
|
261
|
-
function DropdownMenuSubTrigger(_a) {
|
|
262
|
-
var _b = _a, {
|
|
263
|
-
className,
|
|
264
|
-
inset,
|
|
265
|
-
children
|
|
266
|
-
} = _b, props = __objRest(_b, [
|
|
267
|
-
"className",
|
|
268
|
-
"inset",
|
|
269
|
-
"children"
|
|
270
|
-
]);
|
|
271
|
-
return /* @__PURE__ */ jsxs2(
|
|
272
|
-
DropdownMenuPrimitive.SubTrigger,
|
|
273
|
-
__spreadProps(__spreadValues({
|
|
274
|
-
"data-slot": "dropdown-menu-sub-trigger",
|
|
275
|
-
"data-inset": inset,
|
|
276
|
-
className: cn(
|
|
277
|
-
"focus:bg-surface-subtle data-[state=open]:bg-surface-subtle [&_svg:not([class*='text-'])]:text-muted-foreground flex cursor-default items-center gap-2 rounded-md px-2 py-1.5 text-base outline-hidden select-none transition-colors duration-(--ui-motion-fast) data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
278
|
-
className
|
|
279
|
-
)
|
|
280
|
-
}, props), {
|
|
281
|
-
children: [
|
|
282
|
-
children,
|
|
283
|
-
/* @__PURE__ */ jsx2(ChevronRightIcon, { className: "ml-auto size-4" })
|
|
284
|
-
]
|
|
285
|
-
})
|
|
286
|
-
);
|
|
287
|
-
}
|
|
288
|
-
function DropdownMenuSubContent(_a) {
|
|
289
|
-
var _b = _a, {
|
|
290
|
-
className
|
|
291
|
-
} = _b, props = __objRest(_b, [
|
|
292
|
-
"className"
|
|
293
|
-
]);
|
|
294
|
-
return /* @__PURE__ */ jsx2(
|
|
295
|
-
DropdownMenuPrimitive.SubContent,
|
|
296
|
-
__spreadValues({
|
|
297
|
-
"data-slot": "dropdown-menu-sub-content",
|
|
298
|
-
className: cn(
|
|
299
|
-
"ui-menu ui-popup z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border border-border-strong p-1 shadow-lg",
|
|
300
|
-
className
|
|
301
|
-
)
|
|
302
|
-
}, props)
|
|
303
|
-
);
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
export {
|
|
307
|
-
SiteFooter,
|
|
308
|
-
DropdownMenu,
|
|
309
|
-
DropdownMenuPortal,
|
|
310
|
-
DropdownMenuTrigger,
|
|
311
|
-
DropdownMenuContent,
|
|
312
|
-
DropdownMenuGroup,
|
|
313
|
-
DropdownMenuItem,
|
|
314
|
-
DropdownMenuCheckboxItem,
|
|
315
|
-
DropdownMenuRadioGroup,
|
|
316
|
-
DropdownMenuRadioItem,
|
|
317
|
-
DropdownMenuLabel,
|
|
318
|
-
DropdownMenuSeparator,
|
|
319
|
-
DropdownMenuShortcut,
|
|
320
|
-
DropdownMenuSub,
|
|
321
|
-
DropdownMenuSubTrigger,
|
|
322
|
-
DropdownMenuSubContent
|
|
323
|
-
};
|