@naeil/ui 0.2.0 → 0.3.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/CHANGELOG.md +18 -0
- package/DESIGN.md +186 -0
- package/LICENSE +21 -0
- package/README.md +77 -53
- package/THIRD_PARTY_NOTICES.md +49 -0
- package/dist/{chunk-SYI3IKIC.js → chunk-QKVN6Q6C.js} +102 -19
- package/dist/components/index.d.ts +2 -2
- package/dist/components/index.js +9 -9
- package/dist/components/ui/index.d.ts +26 -4
- package/dist/components/ui/index.js +288 -33
- package/dist/source/components/footer.d.ts +15 -0
- package/dist/source/components/footer.js +172 -0
- package/dist/source/components/index.d.ts +11 -0
- package/dist/source/components/index.js +26 -0
- package/dist/source/components/locale-switcher.d.ts +17 -0
- package/dist/source/components/locale-switcher.js +66 -0
- package/dist/source/components/logo.d.ts +9 -0
- package/dist/source/components/logo.js +52 -0
- package/dist/source/components/nav.d.ts +39 -0
- package/dist/source/components/nav.js +412 -0
- package/dist/source/components/theme-provider.d.ts +6 -0
- package/dist/source/components/theme-provider.js +45 -0
- package/dist/source/components/theme-toggle-icon.d.ts +5 -0
- package/dist/source/components/theme-toggle-icon.js +62 -0
- package/dist/source/components/theme-toggle.d.ts +5 -0
- package/dist/source/components/theme-toggle.js +34 -0
- package/dist/source/components/typography.d.ts +12 -0
- package/dist/source/components/typography.js +49 -0
- package/dist/source/components/ui/avatar.d.ts +14 -0
- package/dist/source/components/ui/avatar.js +137 -0
- package/dist/source/components/ui/badge.d.ts +13 -0
- package/dist/source/components/ui/badge.js +76 -0
- package/dist/source/components/ui/button.d.ts +14 -0
- package/dist/source/components/ui/button.js +88 -0
- package/dist/source/components/ui/card.d.ts +13 -0
- package/dist/source/components/ui/card.js +135 -0
- package/dist/source/components/ui/checkbox.d.ts +7 -0
- package/dist/source/components/ui/checkbox.js +58 -0
- package/dist/source/components/ui/dialog.d.ts +20 -0
- package/dist/source/components/ui/dialog.js +182 -0
- package/dist/source/components/ui/dropdown-menu.d.ts +28 -0
- package/dist/source/components/ui/dropdown-menu.js +282 -0
- package/dist/source/components/ui/index.d.ts +19 -0
- package/dist/source/components/ui/index.js +131 -0
- package/dist/source/components/ui/input.d.ts +6 -0
- package/dist/source/components/ui/input.js +49 -0
- package/dist/source/components/ui/select.d.ts +16 -0
- package/dist/source/components/ui/select.js +197 -0
- package/dist/source/components/ui/sonner.d.ts +6 -0
- package/dist/source/components/ui/sonner.js +80 -0
- package/dist/source/components/ui/switch.d.ts +7 -0
- package/dist/source/components/ui/switch.js +54 -0
- package/dist/source/components/ui/tabs.d.ts +10 -0
- package/dist/source/components/ui/tabs.js +57 -0
- package/dist/source/components/ui/textarea.d.ts +6 -0
- package/dist/source/components/ui/textarea.js +46 -0
- package/dist/source/i18n/config.d.ts +6 -0
- package/dist/source/i18n/config.js +12 -0
- package/dist/source/i18n/routing.d.ts +371 -0
- package/dist/source/i18n/routing.js +17 -0
- package/dist/source/lib/design/modal-inert.d.ts +6 -0
- package/dist/source/lib/design/modal-inert.js +73 -0
- package/dist/source/lib/utils.d.ts +5 -0
- package/dist/source/lib/utils.js +8 -0
- package/dist/tokens.ts +217 -0
- package/docs/components/README.md +21 -0
- package/docs/components/avatar.md +47 -0
- package/docs/components/badge.md +29 -0
- package/docs/components/button.md +39 -0
- package/docs/components/card.md +32 -0
- package/docs/components/checkbox.md +35 -0
- package/docs/components/common.md +31 -0
- package/docs/components/composition.md +68 -0
- package/docs/components/dialog.md +41 -0
- package/docs/components/dropdown-menu.md +38 -0
- package/docs/components/input.md +32 -0
- package/docs/components/select.md +39 -0
- package/docs/components/sonner.md +37 -0
- package/docs/components/switch.md +33 -0
- package/docs/components/tabs.md +40 -0
- package/docs/components/textarea.md +35 -0
- package/docs/design/component-demand.md +30 -0
- package/docs/design/public-ui-final-verification.md +96 -0
- package/docs/design/public-ui-release-validation.md +86 -0
- package/docs/design/public-ui-stage3-verification.md +98 -0
- package/docs/design/public-ui-stage4-verification.md +129 -0
- package/docs/design/public-ui-support.md +40 -0
- package/docs/design/v2-migration.md +199 -0
- package/docs/package-release.md +89 -0
- package/licenses/Noto-Sans-JP-OFL.txt +93 -0
- package/licenses/Nunito-Sans-OFL.txt +93 -0
- package/licenses/Pretendard-OFL.txt +94 -0
- package/licenses/React-MIT.txt +21 -0
- package/licenses/Storybook-MIT.txt +21 -0
- package/licenses/popper-MIT.txt +25 -0
- package/licenses/react-remove-scroll-bar-MIT.txt +21 -0
- package/licenses/store2-MIT.txt +22 -0
- package/licenses/toggle-selection-MIT.txt +21 -0
- package/package.json +182 -34
- package/src/styles/components.css +276 -0
- package/src/styles/globals.css +18 -0
- package/src/styles/theme.css +185 -98
- package/messages/en.json +0 -221
- package/messages/ja.json +0 -221
- package/messages/ko.json +0 -221
- package/src/app/globals.css +0 -32
|
@@ -11,10 +11,14 @@ import { cva } from "class-variance-authority";
|
|
|
11
11
|
import { Slot } from "radix-ui";
|
|
12
12
|
import { jsx } from "react/jsx-runtime";
|
|
13
13
|
var badgeVariants = cva(
|
|
14
|
-
"inline-flex items-center justify-center rounded-sm border px-2 py-0.5 text-
|
|
14
|
+
"inline-flex items-center justify-center rounded-sm border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none ui-focus aria-invalid:border-error transition-colors overflow-hidden",
|
|
15
15
|
{
|
|
16
16
|
variants: {
|
|
17
17
|
variant: {
|
|
18
|
+
success: "bg-success-bg text-success border-transparent",
|
|
19
|
+
warning: "bg-warning-bg text-warning border-transparent",
|
|
20
|
+
error: "bg-error-bg text-error border-transparent",
|
|
21
|
+
info: "bg-info-bg text-info border-transparent",
|
|
18
22
|
default: "bg-primary text-primary-foreground border-transparent [a&]:hover:bg-primary/90",
|
|
19
23
|
secondary: "bg-secondary text-secondary-foreground border-transparent [a&]:hover:bg-secondary/80",
|
|
20
24
|
outline: "border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",
|
|
@@ -50,6 +54,78 @@ function Badge(_a) {
|
|
|
50
54
|
// src/components/ui/dropdown-menu.tsx
|
|
51
55
|
import { CheckIcon, ChevronRightIcon, CircleIcon } from "lucide-react";
|
|
52
56
|
import { DropdownMenu as DropdownMenuPrimitive } from "radix-ui";
|
|
57
|
+
|
|
58
|
+
// src/lib/design/modal-inert.ts
|
|
59
|
+
import { useEffect, useMemo, useState } from "react";
|
|
60
|
+
var ownershipKey = /* @__PURE__ */ Symbol.for("@naeil/ui/radix-hidden-inert/v1");
|
|
61
|
+
function ownershipFor(doc) {
|
|
62
|
+
var _a;
|
|
63
|
+
const shared = doc;
|
|
64
|
+
return (_a = shared[ownershipKey]) != null ? _a : shared[ownershipKey] = /* @__PURE__ */ new WeakMap();
|
|
65
|
+
}
|
|
66
|
+
function useRadixHiddenInert(content) {
|
|
67
|
+
useEffect(() => {
|
|
68
|
+
if (!content) return;
|
|
69
|
+
const doc = content.ownerDocument;
|
|
70
|
+
const ownership = ownershipFor(doc);
|
|
71
|
+
const held = /* @__PURE__ */ new Set();
|
|
72
|
+
function release(element) {
|
|
73
|
+
held.delete(element);
|
|
74
|
+
const state = ownership.get(element);
|
|
75
|
+
if (!state || --state.users > 0) return;
|
|
76
|
+
element.inert = state.original;
|
|
77
|
+
ownership.delete(element);
|
|
78
|
+
}
|
|
79
|
+
function sync() {
|
|
80
|
+
const hidden = (content == null ? void 0 : content.isConnected) && content.dataset.state === "open" ? [...doc.querySelectorAll('[data-aria-hidden="true"][aria-hidden="true"]')].filter((element) => !element.contains(content)) : [];
|
|
81
|
+
const desired = new Set(hidden);
|
|
82
|
+
for (const element of held) if (!desired.has(element)) release(element);
|
|
83
|
+
for (const element of desired) {
|
|
84
|
+
if (held.has(element)) continue;
|
|
85
|
+
let state = ownership.get(element);
|
|
86
|
+
if (!state) {
|
|
87
|
+
state = { users: 0, original: element.inert };
|
|
88
|
+
ownership.set(element, state);
|
|
89
|
+
}
|
|
90
|
+
state.users++;
|
|
91
|
+
held.add(element);
|
|
92
|
+
element.inert = true;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
const observer = new MutationObserver(sync);
|
|
96
|
+
observer.observe(doc.body, {
|
|
97
|
+
subtree: true,
|
|
98
|
+
childList: true,
|
|
99
|
+
attributes: true,
|
|
100
|
+
attributeFilter: ["aria-hidden", "data-aria-hidden", "data-state"]
|
|
101
|
+
});
|
|
102
|
+
sync();
|
|
103
|
+
return () => {
|
|
104
|
+
observer.disconnect();
|
|
105
|
+
for (const element of held) release(element);
|
|
106
|
+
};
|
|
107
|
+
}, [content]);
|
|
108
|
+
}
|
|
109
|
+
function assignObjectRef(ref, node) {
|
|
110
|
+
ref.current = node;
|
|
111
|
+
}
|
|
112
|
+
function useOverlayRef(consumerRef) {
|
|
113
|
+
const [node, setNode] = useState(null);
|
|
114
|
+
const ref = useMemo(() => (value) => {
|
|
115
|
+
setNode(value);
|
|
116
|
+
const cleanup = typeof consumerRef === "function" ? consumerRef(value) : void 0;
|
|
117
|
+
if (consumerRef && typeof consumerRef !== "function") assignObjectRef(consumerRef, value);
|
|
118
|
+
return () => {
|
|
119
|
+
setNode(null);
|
|
120
|
+
if (typeof cleanup === "function") cleanup();
|
|
121
|
+
else if (typeof consumerRef === "function") consumerRef(null);
|
|
122
|
+
else if (consumerRef) assignObjectRef(consumerRef, null);
|
|
123
|
+
};
|
|
124
|
+
}, [consumerRef]);
|
|
125
|
+
return [node, ref];
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
// src/components/ui/dropdown-menu.tsx
|
|
53
129
|
import { jsx as jsx2, jsxs } from "react/jsx-runtime";
|
|
54
130
|
function DropdownMenu(_a) {
|
|
55
131
|
var props = __objRest(_a, []);
|
|
@@ -70,19 +146,24 @@ function DropdownMenuTrigger(_a) {
|
|
|
70
146
|
}
|
|
71
147
|
function DropdownMenuContent(_a) {
|
|
72
148
|
var _b = _a, {
|
|
149
|
+
ref,
|
|
73
150
|
className,
|
|
74
151
|
sideOffset = 4
|
|
75
152
|
} = _b, props = __objRest(_b, [
|
|
153
|
+
"ref",
|
|
76
154
|
"className",
|
|
77
155
|
"sideOffset"
|
|
78
156
|
]);
|
|
157
|
+
const [content, contentRef] = useOverlayRef(ref);
|
|
158
|
+
useRadixHiddenInert(content);
|
|
79
159
|
return /* @__PURE__ */ jsx2(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx2(
|
|
80
160
|
DropdownMenuPrimitive.Content,
|
|
81
161
|
__spreadValues({
|
|
162
|
+
ref: contentRef,
|
|
82
163
|
"data-slot": "dropdown-menu-content",
|
|
83
164
|
sideOffset,
|
|
84
165
|
className: cn(
|
|
85
|
-
"
|
|
166
|
+
"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",
|
|
86
167
|
className
|
|
87
168
|
)
|
|
88
169
|
}, props)
|
|
@@ -109,7 +190,7 @@ function DropdownMenuItem(_a) {
|
|
|
109
190
|
"data-inset": inset,
|
|
110
191
|
"data-variant": variant,
|
|
111
192
|
className: cn(
|
|
112
|
-
"focus:bg-surface-subtle data-[variant=destructive]:text-
|
|
193
|
+
"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",
|
|
113
194
|
className
|
|
114
195
|
)
|
|
115
196
|
}, props)
|
|
@@ -130,7 +211,7 @@ function DropdownMenuCheckboxItem(_a) {
|
|
|
130
211
|
__spreadProps(__spreadValues({
|
|
131
212
|
"data-slot": "dropdown-menu-checkbox-item",
|
|
132
213
|
className: cn(
|
|
133
|
-
"focus:bg-surface-subtle relative flex cursor-default items-center gap-2 rounded-md py-1.5 pr-2 pl-8 text-
|
|
214
|
+
"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",
|
|
134
215
|
className
|
|
135
216
|
),
|
|
136
217
|
checked
|
|
@@ -164,7 +245,7 @@ function DropdownMenuRadioItem(_a) {
|
|
|
164
245
|
__spreadProps(__spreadValues({
|
|
165
246
|
"data-slot": "dropdown-menu-radio-item",
|
|
166
247
|
className: cn(
|
|
167
|
-
"focus:bg-surface-subtle relative flex cursor-default items-center gap-2 rounded-md py-1.5 pr-2 pl-8 text-
|
|
248
|
+
"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",
|
|
168
249
|
className
|
|
169
250
|
)
|
|
170
251
|
}, props), {
|
|
@@ -246,7 +327,7 @@ function DropdownMenuSubTrigger(_a) {
|
|
|
246
327
|
"data-slot": "dropdown-menu-sub-trigger",
|
|
247
328
|
"data-inset": inset,
|
|
248
329
|
className: cn(
|
|
249
|
-
"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-
|
|
330
|
+
"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",
|
|
250
331
|
className
|
|
251
332
|
)
|
|
252
333
|
}, props), {
|
|
@@ -268,7 +349,7 @@ function DropdownMenuSubContent(_a) {
|
|
|
268
349
|
__spreadValues({
|
|
269
350
|
"data-slot": "dropdown-menu-sub-content",
|
|
270
351
|
className: cn(
|
|
271
|
-
"
|
|
352
|
+
"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",
|
|
272
353
|
className
|
|
273
354
|
)
|
|
274
355
|
}, props)
|
|
@@ -280,26 +361,26 @@ import { cva as cva2 } from "class-variance-authority";
|
|
|
280
361
|
import { Slot as Slot2 } from "radix-ui";
|
|
281
362
|
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
282
363
|
var buttonVariants = cva2(
|
|
283
|
-
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-
|
|
364
|
+
"inline-flex items-center justify-center gap-2 whitespace-nowrap ui-control ui-focus rounded-md text-base font-medium transition-colors duration-(--ui-motion-fast) cursor-pointer disabled:pointer-events-none disabled:opacity-50 disabled:cursor-not-allowed [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 ui-focus aria-invalid:border-error",
|
|
284
365
|
{
|
|
285
366
|
variants: {
|
|
286
367
|
variant: {
|
|
287
|
-
default: "bg-primary text-primary-foreground
|
|
288
|
-
destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90
|
|
289
|
-
outline: "border border-border-
|
|
368
|
+
default: "bg-primary text-primary-foreground hover:bg-primary-hover",
|
|
369
|
+
destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90 ",
|
|
370
|
+
outline: "border border-border-strong bg-background hover:bg-surface-subtle",
|
|
290
371
|
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
291
372
|
ghost: "hover:bg-surface-subtle",
|
|
292
373
|
link: "text-primary underline-offset-4 hover:underline"
|
|
293
374
|
},
|
|
294
375
|
size: {
|
|
295
|
-
default: "
|
|
296
|
-
xs: "
|
|
297
|
-
sm: "
|
|
298
|
-
lg: "
|
|
299
|
-
icon: "
|
|
300
|
-
"icon-xs": "
|
|
301
|
-
"icon-sm": "
|
|
302
|
-
"icon-lg": "
|
|
376
|
+
default: "px-4 has-[>svg]:px-3",
|
|
377
|
+
xs: "gap-1 rounded-md px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3",
|
|
378
|
+
sm: "rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",
|
|
379
|
+
lg: "rounded-md px-6 has-[>svg]:px-4",
|
|
380
|
+
icon: "",
|
|
381
|
+
"icon-xs": "rounded-md [&_svg:not([class*='size-'])]:size-3",
|
|
382
|
+
"icon-sm": "",
|
|
383
|
+
"icon-lg": ""
|
|
303
384
|
}
|
|
304
385
|
},
|
|
305
386
|
defaultVariants: {
|
|
@@ -335,6 +416,8 @@ function Button(_a) {
|
|
|
335
416
|
export {
|
|
336
417
|
badgeVariants,
|
|
337
418
|
Badge,
|
|
419
|
+
useRadixHiddenInert,
|
|
420
|
+
useOverlayRef,
|
|
338
421
|
DropdownMenu,
|
|
339
422
|
DropdownMenuPortal,
|
|
340
423
|
DropdownMenuTrigger,
|
|
@@ -79,8 +79,8 @@ declare function Logo({ size, mono, className, }: {
|
|
|
79
79
|
type HeadingProps = React$1.HTMLAttributes<HTMLHeadingElement> & {
|
|
80
80
|
children: React$1.ReactNode;
|
|
81
81
|
};
|
|
82
|
-
declare const pageTitleClass = "text-foreground text-
|
|
83
|
-
declare const sectionTitleClass = "text-foreground text-
|
|
82
|
+
declare const pageTitleClass = "text-foreground text-3xl font-semibold leading-tight";
|
|
83
|
+
declare const sectionTitleClass = "text-foreground text-xl font-semibold";
|
|
84
84
|
declare function PageTitle({ className, children, ...props }: HeadingProps): react_jsx_runtime.JSX.Element;
|
|
85
85
|
declare function SectionTitle({ className, children, ...props }: HeadingProps): react_jsx_runtime.JSX.Element;
|
|
86
86
|
|
package/dist/components/index.js
CHANGED
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
DropdownMenuContent,
|
|
7
7
|
DropdownMenuItem,
|
|
8
8
|
DropdownMenuTrigger
|
|
9
|
-
} from "../chunk-
|
|
9
|
+
} from "../chunk-QKVN6Q6C.js";
|
|
10
10
|
import {
|
|
11
11
|
__objRest,
|
|
12
12
|
__spreadProps,
|
|
@@ -665,7 +665,7 @@ function useIsMounted() {
|
|
|
665
665
|
);
|
|
666
666
|
}
|
|
667
667
|
function ThemeToggle() {
|
|
668
|
-
const {
|
|
668
|
+
const { resolvedTheme, setTheme } = useTheme();
|
|
669
669
|
const mounted = useIsMounted();
|
|
670
670
|
if (!mounted) {
|
|
671
671
|
return /* @__PURE__ */ jsx4(Button, { variant: "outline", size: "sm", className: "w-24", children: "\u2026" });
|
|
@@ -676,8 +676,8 @@ function ThemeToggle() {
|
|
|
676
676
|
variant: "outline",
|
|
677
677
|
size: "sm",
|
|
678
678
|
className: "w-24",
|
|
679
|
-
onClick: () => setTheme(
|
|
680
|
-
children:
|
|
679
|
+
onClick: () => setTheme(resolvedTheme === "dark" ? "light" : "dark"),
|
|
680
|
+
children: resolvedTheme === "dark" ? "\u2600\uFE0F Light" : "\u{1F319} Dark"
|
|
681
681
|
}
|
|
682
682
|
);
|
|
683
683
|
}
|
|
@@ -708,17 +708,17 @@ function useIsMounted2() {
|
|
|
708
708
|
);
|
|
709
709
|
}
|
|
710
710
|
function ThemeToggleIcon() {
|
|
711
|
-
const {
|
|
711
|
+
const { resolvedTheme, setTheme } = useTheme2();
|
|
712
712
|
const mounted = useIsMounted2();
|
|
713
713
|
if (!mounted) {
|
|
714
714
|
return /* @__PURE__ */ jsx6("div", { className: "h-4 w-4" });
|
|
715
715
|
}
|
|
716
|
-
const isDark =
|
|
716
|
+
const isDark = resolvedTheme === "dark";
|
|
717
717
|
return /* @__PURE__ */ jsx6(
|
|
718
718
|
"button",
|
|
719
719
|
{
|
|
720
720
|
onClick: () => setTheme(isDark ? "light" : "dark"),
|
|
721
|
-
className: "text-muted-foreground hover:text-foreground
|
|
721
|
+
className: "ui-control ui-focus inline-flex w-11 items-center justify-center text-muted-foreground hover:text-foreground",
|
|
722
722
|
"aria-label": isDark ? "Switch to light mode" : "Switch to dark mode",
|
|
723
723
|
children: isDark ? /* @__PURE__ */ jsxs4(
|
|
724
724
|
"svg",
|
|
@@ -807,8 +807,8 @@ function Logo3({
|
|
|
807
807
|
|
|
808
808
|
// src/components/typography.tsx
|
|
809
809
|
import { jsx as jsx8 } from "react/jsx-runtime";
|
|
810
|
-
var pageTitleClass = "text-foreground text-
|
|
811
|
-
var sectionTitleClass = "text-foreground text-
|
|
810
|
+
var pageTitleClass = "text-foreground text-3xl font-semibold leading-tight";
|
|
811
|
+
var sectionTitleClass = "text-foreground text-xl font-semibold";
|
|
812
812
|
function PageTitle(_a) {
|
|
813
813
|
var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
|
|
814
814
|
return /* @__PURE__ */ jsx8("h1", __spreadProps(__spreadValues({ className: cn(pageTitleClass, className) }, props), { children }));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import { Avatar as Avatar$1, Dialog as Dialog$1, DropdownMenu as DropdownMenu$1 } from 'radix-ui';
|
|
3
|
+
import { Avatar as Avatar$1, Dialog as Dialog$1, DropdownMenu as DropdownMenu$1, Select as Select$1, Switch as Switch$1, Checkbox as Checkbox$1, Tabs as Tabs$1 } from 'radix-ui';
|
|
4
4
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
5
5
|
import { VariantProps } from 'class-variance-authority';
|
|
6
6
|
import { ToasterProps } from 'sonner';
|
|
@@ -15,7 +15,7 @@ declare function AvatarGroup({ className, ...props }: React.ComponentProps<"div"
|
|
|
15
15
|
declare function AvatarGroupCount({ className, ...props }: React.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
|
16
16
|
|
|
17
17
|
declare const badgeVariants: (props?: ({
|
|
18
|
-
variant?: "default" | "secondary" | "outline" | "destructive" | null | undefined;
|
|
18
|
+
variant?: "success" | "warning" | "error" | "info" | "default" | "secondary" | "outline" | "destructive" | null | undefined;
|
|
19
19
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
20
20
|
declare function Badge({ className, variant, asChild, ...props }: React.ComponentProps<"span"> & VariantProps<typeof badgeVariants> & {
|
|
21
21
|
asChild?: boolean;
|
|
@@ -56,7 +56,7 @@ declare function DialogDescription({ className, ...props }: React.ComponentProps
|
|
|
56
56
|
declare function DropdownMenu({ ...props }: React.ComponentProps<typeof DropdownMenu$1.Root>): react_jsx_runtime.JSX.Element;
|
|
57
57
|
declare function DropdownMenuPortal({ ...props }: React.ComponentProps<typeof DropdownMenu$1.Portal>): react_jsx_runtime.JSX.Element;
|
|
58
58
|
declare function DropdownMenuTrigger({ ...props }: React.ComponentProps<typeof DropdownMenu$1.Trigger>): react_jsx_runtime.JSX.Element;
|
|
59
|
-
declare function DropdownMenuContent({ className, sideOffset, ...props }: React.ComponentProps<typeof DropdownMenu$1.Content>): react_jsx_runtime.JSX.Element;
|
|
59
|
+
declare function DropdownMenuContent({ ref, className, sideOffset, ...props }: React.ComponentProps<typeof DropdownMenu$1.Content>): react_jsx_runtime.JSX.Element;
|
|
60
60
|
declare function DropdownMenuGroup({ ...props }: React.ComponentProps<typeof DropdownMenu$1.Group>): react_jsx_runtime.JSX.Element;
|
|
61
61
|
declare function DropdownMenuItem({ className, inset, variant, ...props }: React.ComponentProps<typeof DropdownMenu$1.Item> & {
|
|
62
62
|
inset?: boolean;
|
|
@@ -80,4 +80,26 @@ declare function Input({ className, type, ...props }: React.ComponentProps<"inpu
|
|
|
80
80
|
|
|
81
81
|
declare const Toaster: ({ ...props }: ToasterProps) => react_jsx_runtime.JSX.Element;
|
|
82
82
|
|
|
83
|
-
|
|
83
|
+
declare const Select: React.FC<Select$1.SelectProps>;
|
|
84
|
+
declare const SelectValue: React.ForwardRefExoticComponent<Select$1.SelectValueProps & React.RefAttributes<HTMLSpanElement>>;
|
|
85
|
+
declare const SelectGroup: React.ForwardRefExoticComponent<Select$1.SelectGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
86
|
+
declare function SelectTrigger({ className, children, ...props }: React.ComponentProps<typeof Select$1.Trigger>): react_jsx_runtime.JSX.Element;
|
|
87
|
+
declare function SelectContent({ ref, className, children, position, sideOffset, ...props }: React.ComponentProps<typeof Select$1.Content>): react_jsx_runtime.JSX.Element;
|
|
88
|
+
declare function SelectItem({ className, children, ...props }: React.ComponentProps<typeof Select$1.Item>): react_jsx_runtime.JSX.Element;
|
|
89
|
+
declare function SelectLabel({ className, ...props }: React.ComponentProps<typeof Select$1.Label>): react_jsx_runtime.JSX.Element;
|
|
90
|
+
declare function SelectSeparator({ className, ...props }: React.ComponentProps<typeof Select$1.Separator>): react_jsx_runtime.JSX.Element;
|
|
91
|
+
declare function SelectScrollUpButton({ className, ...props }: React.ComponentProps<typeof Select$1.ScrollUpButton>): react_jsx_runtime.JSX.Element;
|
|
92
|
+
declare function SelectScrollDownButton({ className, ...props }: React.ComponentProps<typeof Select$1.ScrollDownButton>): react_jsx_runtime.JSX.Element;
|
|
93
|
+
|
|
94
|
+
declare function Switch({ className, ...props }: React.ComponentProps<typeof Switch$1.Root>): react_jsx_runtime.JSX.Element;
|
|
95
|
+
|
|
96
|
+
declare function Checkbox({ className, ...props }: React.ComponentProps<typeof Checkbox$1.Root>): react_jsx_runtime.JSX.Element;
|
|
97
|
+
|
|
98
|
+
declare function Tabs({ className, ...props }: React.ComponentProps<typeof Tabs$1.Root>): react_jsx_runtime.JSX.Element;
|
|
99
|
+
declare function TabsList({ className, ...props }: React.ComponentProps<typeof Tabs$1.List>): react_jsx_runtime.JSX.Element;
|
|
100
|
+
declare function TabsTrigger({ className, ...props }: React.ComponentProps<typeof Tabs$1.Trigger>): react_jsx_runtime.JSX.Element;
|
|
101
|
+
declare function TabsContent({ className, ...props }: React.ComponentProps<typeof Tabs$1.Content>): react_jsx_runtime.JSX.Element;
|
|
102
|
+
|
|
103
|
+
declare function Textarea({ className, ...props }: React.ComponentProps<"textarea">): react_jsx_runtime.JSX.Element;
|
|
104
|
+
|
|
105
|
+
export { Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, Badge, Button, Card, CardAction, CardContent, CardDescription, CardElevated, CardFooter, CardHeader, CardTitle, Checkbox, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Input, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Switch, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Toaster, badgeVariants, buttonVariants };
|