@nsaa/core 0.1.0-alpha.0 → 0.1.0-alpha.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.
- package/dist/accordion/accordion.d.ts +7 -0
- package/dist/accordion/accordion.js +54 -0
- package/dist/accordion/index.d.ts +3 -0
- package/dist/alert/alert.d.ts +18 -0
- package/dist/alert/alert.js +53 -0
- package/dist/alert/index.d.ts +3 -0
- package/dist/alert-dialog/alert-dialog.d.ts +19 -0
- package/dist/alert-dialog/alert-dialog.js +100 -0
- package/dist/alert-dialog/index.d.ts +3 -0
- package/dist/avatar/avatar.d.ts +12 -0
- package/dist/avatar/avatar.js +50 -0
- package/dist/avatar/index.d.ts +3 -0
- package/dist/badge/badge.d.ts +8 -0
- package/dist/badge/badge.js +29 -0
- package/dist/badge/index.d.ts +3 -0
- package/dist/button/button.d.ts +25 -0
- package/dist/button/button.js +136 -0
- package/dist/button/index.d.ts +3 -0
- package/dist/calendar/calendar.d.ts +11 -0
- package/dist/calendar/calendar.js +131 -0
- package/dist/calendar/index.d.ts +3 -0
- package/dist/card/card.d.ts +12 -0
- package/dist/card/card.js +55 -0
- package/dist/card/index.d.ts +3 -0
- package/dist/checkbox/checkbox.d.ts +4 -0
- package/dist/checkbox/checkbox.js +35 -0
- package/dist/checkbox/index.d.ts +3 -0
- package/dist/collapsible/collapsible.d.ts +6 -0
- package/dist/collapsible/collapsible.js +24 -0
- package/dist/collapsible/index.d.ts +3 -0
- package/dist/combobox/combobox.d.ts +27 -0
- package/dist/combobox/combobox.js +226 -0
- package/dist/combobox/index.d.ts +3 -0
- package/dist/command/command.d.ts +20 -0
- package/dist/command/command.js +116 -0
- package/dist/command/index.d.ts +3 -0
- package/dist/context-menu/context-menu.d.ts +30 -0
- package/dist/context-menu/context-menu.js +173 -0
- package/dist/context-menu/index.d.ts +3 -0
- package/dist/dialog/dialog.d.ts +18 -0
- package/dist/dialog/dialog.js +106 -0
- package/dist/dialog/index.d.ts +3 -0
- package/dist/direction.d.ts +3 -0
- package/dist/direction.js +2 -0
- package/dist/drawer/drawer.d.ts +17 -0
- package/dist/drawer/drawer.js +136 -0
- package/dist/drawer/index.d.ts +3 -0
- package/dist/dropdown-menu/dropdown-menu.d.ts +30 -0
- package/dist/dropdown-menu/dropdown-menu.js +177 -0
- package/dist/dropdown-menu/index.d.ts +3 -0
- package/dist/empty/empty.d.ts +35 -0
- package/dist/empty/empty.js +93 -0
- package/dist/empty/index.d.ts +3 -0
- package/dist/field/field.d.ts +26 -0
- package/dist/field/field.js +109 -0
- package/dist/field/index.d.ts +3 -0
- package/dist/index.d.ts +89 -631
- package/dist/index.js +49 -3527
- package/dist/input/index.d.ts +3 -0
- package/dist/input/input.d.ts +4 -0
- package/dist/input/input.js +14 -0
- package/dist/input-group/index.d.ts +3 -0
- package/dist/input-group/input-group.d.ts +19 -0
- package/dist/input-group/input-group.js +78 -0
- package/dist/input-otp/index.d.ts +3 -0
- package/dist/input-otp/input-otp.d.ts +12 -0
- package/dist/input-otp/input-otp.js +73 -0
- package/dist/kbd/index.d.ts +3 -0
- package/dist/kbd/kbd.d.ts +5 -0
- package/dist/kbd/kbd.js +19 -0
- package/dist/label/index.d.ts +3 -0
- package/dist/label/label.d.ts +4 -0
- package/dist/label/label.js +13 -0
- package/dist/legacy/icon-button/icon-swap.js +58 -0
- package/dist/lib/cn.d.ts +3 -0
- package/dist/{cn-DxFBFdwT.js → lib/cn.js} +1 -1
- package/dist/lib/control-defaults.js +8 -0
- package/dist/lib/icon-swap.d.ts +15 -0
- package/dist/lib/icon-swap.js +26 -0
- package/dist/lib/input-modality.js +39 -0
- package/dist/lib/merge-refs.js +21 -0
- package/dist/lib/shortcut.js +50 -0
- package/dist/lib/track-input-modality.d.ts +2 -0
- package/dist/lib/track-input-modality.js +4 -0
- package/dist/lib/tv.js +7 -0
- package/dist/lib/use-press.js +48 -0
- package/dist/lib/user-action.js +13 -0
- package/dist/loaders/arc.d.ts +6 -0
- package/dist/loaders/arc.js +31 -0
- package/dist/loaders/atom.d.ts +5 -0
- package/dist/loaders/atom.js +70 -0
- package/dist/loaders/blocks.d.ts +8 -0
- package/dist/loaders/blocks.js +74 -0
- package/dist/loaders/bouncing-dots.d.ts +3 -0
- package/dist/loaders/bouncing-dots.js +45 -0
- package/dist/loaders/cap.d.ts +6 -0
- package/dist/loaders/cap.js +7 -0
- package/dist/loaders/cascade.d.ts +5 -0
- package/dist/loaders/cascade.js +50 -0
- package/dist/loaders/circular-dots.d.ts +3 -0
- package/dist/loaders/circular-dots.js +40 -0
- package/dist/loaders/classic-v2.d.ts +3 -0
- package/dist/loaders/classic-v2.js +41 -0
- package/dist/loaders/classic.d.ts +3 -0
- package/dist/loaders/classic.js +48 -0
- package/dist/loaders/clock.d.ts +5 -0
- package/dist/loaders/clock.js +31 -0
- package/dist/loaders/comet.d.ts +5 -0
- package/dist/loaders/comet.js +52 -0
- package/dist/loaders/compass.d.ts +3 -0
- package/dist/loaders/compass.js +39 -0
- package/dist/loaders/dual.d.ts +6 -0
- package/dist/loaders/dual.js +47 -0
- package/dist/loaders/easing.d.ts +6 -0
- package/dist/loaders/easing.js +34 -0
- package/dist/loaders/eclipse.d.ts +3 -0
- package/dist/loaders/eclipse.js +69 -0
- package/dist/loaders/fade.js +28 -0
- package/dist/loaders/flip.d.ts +3 -0
- package/dist/loaders/flip.js +41 -0
- package/dist/{frame-CK9IBOZB.js → loaders/frame.js} +2 -50
- package/dist/loaders/gather.d.ts +3 -0
- package/dist/loaders/gather.js +85 -0
- package/dist/loaders/leap.d.ts +3 -0
- package/dist/loaders/leap.js +67 -0
- package/dist/loaders/linear-dots.d.ts +3 -0
- package/dist/loaders/linear-dots.js +54 -0
- package/dist/loaders/loading.d.ts +3 -0
- package/dist/loaders/loading.js +64 -0
- package/dist/loaders/morph.d.ts +3 -0
- package/dist/loaders/morph.js +40 -0
- package/dist/loaders/motion.d.ts +35 -0
- package/dist/loaders/motion.js +51 -0
- package/dist/loaders/orbit.d.ts +5 -0
- package/dist/loaders/orbit.js +44 -0
- package/dist/loaders/pulse.d.ts +3 -0
- package/dist/loaders/pulse.js +52 -0
- package/dist/loaders/radar.d.ts +5 -0
- package/dist/loaders/radar.js +64 -0
- package/dist/loaders/ring.d.ts +6 -0
- package/dist/loaders/ring.js +38 -0
- package/dist/loaders/ripple.d.ts +8 -0
- package/dist/loaders/ripple.js +57 -0
- package/dist/loaders/slide.d.ts +3 -0
- package/dist/loaders/slide.js +74 -0
- package/dist/loaders/snake.d.ts +6 -0
- package/dist/loaders/snake.js +59 -0
- package/dist/loaders/spinners.d.ts +61 -0
- package/dist/loaders/spinners.js +63 -0
- package/dist/loaders/swirl.d.ts +3 -0
- package/dist/loaders/swirl.js +50 -0
- package/dist/loaders/text/shared.js +25 -0
- package/dist/loaders/text/text-loaders.d.ts +48 -0
- package/dist/loaders/text/text-loaders.js +723 -0
- package/dist/loaders/trace.d.ts +6 -0
- package/dist/loaders/trace.js +46 -0
- package/dist/loaders/types.d.ts +10 -0
- package/dist/loaders/wave.d.ts +8 -0
- package/dist/loaders/wave.js +59 -0
- package/dist/loaders-text.d.ts +2 -47
- package/dist/loaders-text.js +1 -743
- package/dist/loaders.d.ts +36 -132
- package/dist/loaders.js +35 -1096
- package/dist/native-select/index.d.ts +3 -0
- package/dist/native-select/native-select.d.ts +9 -0
- package/dist/native-select/native-select.js +44 -0
- package/dist/pagination/index.d.ts +3 -0
- package/dist/pagination/pagination.d.ts +18 -0
- package/dist/pagination/pagination.js +134 -0
- package/dist/popover/index.d.ts +3 -0
- package/dist/popover/popover.d.ts +10 -0
- package/dist/popover/popover.js +54 -0
- package/dist/radio-group/index.d.ts +3 -0
- package/dist/radio-group/radio-group.d.ts +6 -0
- package/dist/radio-group/radio-group.js +33 -0
- package/dist/select/index.d.ts +3 -0
- package/dist/select/select.d.ts +16 -0
- package/dist/select/select.js +148 -0
- package/dist/separator/index.d.ts +3 -0
- package/dist/separator/separator.d.ts +4 -0
- package/dist/separator/separator.js +15 -0
- package/dist/skeleton/index.d.ts +3 -0
- package/dist/skeleton/skeleton.d.ts +10 -0
- package/dist/skeleton/skeleton.js +24 -0
- package/dist/slider/index.d.ts +3 -0
- package/dist/slider/slider.d.ts +4 -0
- package/dist/slider/slider.js +39 -0
- package/dist/sound/sound-map.d.ts +70 -0
- package/dist/sound/sound-map.js +72 -0
- package/dist/sound/sound.d.ts +38 -0
- package/dist/sound/sound.js +136 -0
- package/dist/sound/uisfx.d.ts +37 -0
- package/dist/sound/uisfx.js +59 -0
- package/dist/sound-uisfx.d.ts +2 -37
- package/dist/sound-uisfx.js +1 -58
- package/dist/spinner/index.d.ts +5 -0
- package/dist/spinner/loader-provider.d.ts +16 -0
- package/dist/spinner/loader-provider.js +28 -0
- package/dist/spinner/registry.d.ts +9 -0
- package/dist/spinner/registry.js +15 -0
- package/dist/spinner/spinner.d.ts +26 -0
- package/dist/spinner/spinner.js +143 -0
- package/dist/switch/index.d.ts +3 -0
- package/dist/switch/switch.d.ts +6 -0
- package/dist/switch/switch.js +25 -0
- package/dist/table/index.d.ts +3 -0
- package/dist/table/table.d.ts +17 -0
- package/dist/table/table.js +66 -0
- package/dist/tabs/index.d.ts +3 -0
- package/dist/tabs/tabs.d.ts +11 -0
- package/dist/tabs/tabs.js +46 -0
- package/dist/textarea/index.d.ts +3 -0
- package/dist/textarea/textarea.d.ts +4 -0
- package/dist/textarea/textarea.js +12 -0
- package/dist/toast/index.d.ts +3 -0
- package/dist/toast/toast.d.ts +17 -0
- package/dist/toast/toast.js +211 -0
- package/dist/toggle-group/index.d.ts +3 -0
- package/dist/toggle-group/toggle-group.d.ts +64 -0
- package/dist/toggle-group/toggle-group.js +95 -0
- package/dist/tokens/dist/motion.d.ts +24 -0
- package/dist/{motion-NQq2BA78.js → tokens/dist/motion.js} +1 -1
- package/dist/toolbar/index.d.ts +3 -0
- package/dist/toolbar/overflow.d.ts +4 -0
- package/dist/toolbar/overflow.js +242 -0
- package/dist/toolbar/toolbar-item.d.ts +29 -0
- package/dist/toolbar/toolbar-item.js +71 -0
- package/dist/toolbar/toolbar.d.ts +73 -0
- package/dist/toolbar/toolbar.js +250 -0
- package/dist/tooltip/index.d.ts +3 -0
- package/dist/tooltip/tooltip.d.ts +7 -0
- package/dist/tooltip/tooltip.js +41 -0
- package/package.json +5 -3
- package/src/feel.css +18 -6
- package/src/styles.css +19 -1
- package/dist/registry-2PyPW9Xw.js +0 -390
- package/dist/registry-DjfWNw3R.d.ts +0 -18
- package/dist/sound-DiYNAnR_.d.ts +0 -61
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
type NativeSelectProps = Omit<React.ComponentProps<"select">, "size"> & {
|
|
4
|
+
size?: "sm" | "default";
|
|
5
|
+
};
|
|
6
|
+
declare function NativeSelect({ className, size, ...props }: NativeSelectProps): React.JSX.Element;
|
|
7
|
+
declare function NativeSelectOption({ className, ...props }: React.ComponentProps<"option">): React.JSX.Element;
|
|
8
|
+
declare function NativeSelectOptGroup({ className, ...props }: React.ComponentProps<"optgroup">): React.JSX.Element;
|
|
9
|
+
export { NativeSelect, NativeSelectOptGroup, NativeSelectOption };
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../lib/cn.js";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
// src/native-select/native-select.tsx
|
|
5
|
+
function NativeSelect({ className, size = "default", ...props }) {
|
|
6
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
7
|
+
className: cn("group/native-select relative w-fit has-[select:disabled]:opacity-50", className),
|
|
8
|
+
"data-slot": "native-select-wrapper",
|
|
9
|
+
"data-size": size,
|
|
10
|
+
children: [/* @__PURE__ */ jsx("select", {
|
|
11
|
+
"data-slot": "native-select",
|
|
12
|
+
"data-size": size,
|
|
13
|
+
className: "h-8 w-full min-w-0 appearance-none rounded-lg border border-input bg-transparent py-1 pr-8 pl-2.5 text-sm transition-colors outline-none select-none selection:bg-primary selection:text-primary-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] data-[size=sm]:py-0.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",
|
|
14
|
+
...props
|
|
15
|
+
}), /* @__PURE__ */ jsx("svg", {
|
|
16
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
17
|
+
viewBox: "0 0 24 24",
|
|
18
|
+
fill: "none",
|
|
19
|
+
stroke: "currentColor",
|
|
20
|
+
strokeWidth: "2",
|
|
21
|
+
strokeLinecap: "round",
|
|
22
|
+
strokeLinejoin: "round",
|
|
23
|
+
className: "pointer-events-none absolute top-1/2 right-2.5 size-4 -translate-y-1/2 text-muted-foreground select-none",
|
|
24
|
+
"aria-hidden": "true",
|
|
25
|
+
"data-slot": "native-select-icon",
|
|
26
|
+
children: /* @__PURE__ */ jsx("path", { d: "m6 9 6 6 6-6" })
|
|
27
|
+
})]
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
function NativeSelectOption({ className, ...props }) {
|
|
31
|
+
return /* @__PURE__ */ jsx("option", {
|
|
32
|
+
"data-slot": "native-select-option",
|
|
33
|
+
className: cn("bg-[Canvas] text-[CanvasText]", className),
|
|
34
|
+
...props
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
function NativeSelectOptGroup({ className, ...props }) {
|
|
38
|
+
return /* @__PURE__ */ jsx("optgroup", {
|
|
39
|
+
"data-slot": "native-select-optgroup",
|
|
40
|
+
className: cn("bg-[Canvas] text-[CanvasText]", className),
|
|
41
|
+
...props
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
export { NativeSelect, NativeSelectOptGroup, NativeSelectOption };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
|
|
2
|
+
import { Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious } from "./pagination.js";
|
|
3
|
+
export { Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
|
|
2
|
+
import { Button } from "../button/button.js";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
declare function Pagination({ className, ...props }: React.ComponentProps<"nav">): React.JSX.Element;
|
|
5
|
+
declare function PaginationContent({ className, ...props }: React.ComponentProps<"ul">): React.JSX.Element;
|
|
6
|
+
declare function PaginationItem({ ...props }: React.ComponentProps<"li">): React.JSX.Element;
|
|
7
|
+
type PaginationLinkProps = {
|
|
8
|
+
isActive?: boolean;
|
|
9
|
+
} & Pick<React.ComponentProps<typeof Button>, "size"> & React.ComponentProps<"a">;
|
|
10
|
+
declare function PaginationLink({ className, isActive, size, ...props }: PaginationLinkProps): React.JSX.Element;
|
|
11
|
+
declare function PaginationPrevious({ className, text, ...props }: React.ComponentProps<typeof PaginationLink> & {
|
|
12
|
+
text?: string;
|
|
13
|
+
}): React.JSX.Element;
|
|
14
|
+
declare function PaginationNext({ className, text, ...props }: React.ComponentProps<typeof PaginationLink> & {
|
|
15
|
+
text?: string;
|
|
16
|
+
}): React.JSX.Element;
|
|
17
|
+
declare function PaginationEllipsis({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
|
|
18
|
+
export { Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious };
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../lib/cn.js";
|
|
3
|
+
import { ControlDefaultsContext } from "../lib/control-defaults.js";
|
|
4
|
+
import { Button } from "../button/button.js";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
// src/pagination/pagination.tsx
|
|
7
|
+
function Pagination({ className, ...props }) {
|
|
8
|
+
return /* @__PURE__ */ jsx("nav", {
|
|
9
|
+
role: "navigation",
|
|
10
|
+
"aria-label": "pagination",
|
|
11
|
+
"data-slot": "pagination",
|
|
12
|
+
className: cn("mx-auto flex w-full justify-center", className),
|
|
13
|
+
...props
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
function PaginationContent({ className, ...props }) {
|
|
17
|
+
return /* @__PURE__ */ jsx("ul", {
|
|
18
|
+
"data-slot": "pagination-content",
|
|
19
|
+
className: cn("flex items-center gap-0.5", className),
|
|
20
|
+
...props
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
function PaginationItem({ ...props }) {
|
|
24
|
+
return /* @__PURE__ */ jsx("li", {
|
|
25
|
+
"data-slot": "pagination-item",
|
|
26
|
+
...props
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
function PaginationLink({ className, isActive, size = "icon", ...props }) {
|
|
30
|
+
return /* @__PURE__ */ jsx(ControlDefaultsContext.Provider, {
|
|
31
|
+
value: SILENT,
|
|
32
|
+
children: /* @__PURE__ */ jsx(Button, {
|
|
33
|
+
variant: isActive ? "outline" : "ghost",
|
|
34
|
+
size,
|
|
35
|
+
className: cn(className),
|
|
36
|
+
nativeButton: false,
|
|
37
|
+
render: /* @__PURE__ */ jsx("a", {
|
|
38
|
+
role: "link",
|
|
39
|
+
"aria-current": isActive ? "page" : void 0,
|
|
40
|
+
"data-slot": "pagination-link",
|
|
41
|
+
"data-active": isActive,
|
|
42
|
+
...props
|
|
43
|
+
})
|
|
44
|
+
})
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
const SILENT = { sound: false };
|
|
48
|
+
function PaginationPrevious({ className, text = "Previous", ...props }) {
|
|
49
|
+
return /* @__PURE__ */ jsxs(PaginationLink, {
|
|
50
|
+
"aria-label": "Go to previous page",
|
|
51
|
+
size: "default",
|
|
52
|
+
className: cn("pl-1.5!", className),
|
|
53
|
+
...props,
|
|
54
|
+
children: [/* @__PURE__ */ jsx("svg", {
|
|
55
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
56
|
+
viewBox: "0 0 24 24",
|
|
57
|
+
fill: "none",
|
|
58
|
+
stroke: "currentColor",
|
|
59
|
+
strokeWidth: "2",
|
|
60
|
+
strokeLinecap: "round",
|
|
61
|
+
strokeLinejoin: "round",
|
|
62
|
+
"aria-hidden": "true",
|
|
63
|
+
"data-icon": "inline-start",
|
|
64
|
+
className: "cn-rtl-flip",
|
|
65
|
+
children: /* @__PURE__ */ jsx("path", { d: "m15 18-6-6 6-6" })
|
|
66
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
67
|
+
className: "hidden sm:block",
|
|
68
|
+
children: text
|
|
69
|
+
})]
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
function PaginationNext({ className, text = "Next", ...props }) {
|
|
73
|
+
return /* @__PURE__ */ jsxs(PaginationLink, {
|
|
74
|
+
"aria-label": "Go to next page",
|
|
75
|
+
size: "default",
|
|
76
|
+
className: cn("pr-1.5!", className),
|
|
77
|
+
...props,
|
|
78
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
79
|
+
className: "hidden sm:block",
|
|
80
|
+
children: text
|
|
81
|
+
}), /* @__PURE__ */ jsx("svg", {
|
|
82
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
83
|
+
viewBox: "0 0 24 24",
|
|
84
|
+
fill: "none",
|
|
85
|
+
stroke: "currentColor",
|
|
86
|
+
strokeWidth: "2",
|
|
87
|
+
strokeLinecap: "round",
|
|
88
|
+
strokeLinejoin: "round",
|
|
89
|
+
"aria-hidden": "true",
|
|
90
|
+
"data-icon": "inline-end",
|
|
91
|
+
className: "cn-rtl-flip",
|
|
92
|
+
children: /* @__PURE__ */ jsx("path", { d: "m9 18 6-6-6-6" })
|
|
93
|
+
})]
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
function PaginationEllipsis({ className, ...props }) {
|
|
97
|
+
return /* @__PURE__ */ jsxs("span", {
|
|
98
|
+
"aria-hidden": true,
|
|
99
|
+
"data-slot": "pagination-ellipsis",
|
|
100
|
+
className: cn("flex size-8 items-center justify-center [&_svg:not([class*='size-'])]:size-4", className),
|
|
101
|
+
...props,
|
|
102
|
+
children: [/* @__PURE__ */ jsxs("svg", {
|
|
103
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
104
|
+
viewBox: "0 0 24 24",
|
|
105
|
+
fill: "none",
|
|
106
|
+
stroke: "currentColor",
|
|
107
|
+
strokeWidth: "2",
|
|
108
|
+
strokeLinecap: "round",
|
|
109
|
+
strokeLinejoin: "round",
|
|
110
|
+
"aria-hidden": "true",
|
|
111
|
+
children: [
|
|
112
|
+
/* @__PURE__ */ jsx("circle", {
|
|
113
|
+
cx: "12",
|
|
114
|
+
cy: "12",
|
|
115
|
+
r: "1"
|
|
116
|
+
}),
|
|
117
|
+
/* @__PURE__ */ jsx("circle", {
|
|
118
|
+
cx: "19",
|
|
119
|
+
cy: "12",
|
|
120
|
+
r: "1"
|
|
121
|
+
}),
|
|
122
|
+
/* @__PURE__ */ jsx("circle", {
|
|
123
|
+
cx: "5",
|
|
124
|
+
cy: "12",
|
|
125
|
+
r: "1"
|
|
126
|
+
})
|
|
127
|
+
]
|
|
128
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
129
|
+
className: "sr-only",
|
|
130
|
+
children: "More pages"
|
|
131
|
+
})]
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
export { Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { Popover } from "@base-ui/react/popover";
|
|
4
|
+
declare function Popover$1({ ...props }: Popover.Root.Props): React.JSX.Element;
|
|
5
|
+
declare function PopoverTrigger({ ...props }: Popover.Trigger.Props): React.JSX.Element;
|
|
6
|
+
declare function PopoverContent({ className, align, alignOffset, side, sideOffset, ...props }: Popover.Popup.Props & Pick<Popover.Positioner.Props, "align" | "alignOffset" | "side" | "sideOffset">): React.JSX.Element;
|
|
7
|
+
declare function PopoverHeader({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
8
|
+
declare function PopoverTitle({ className, ...props }: Popover.Title.Props): React.JSX.Element;
|
|
9
|
+
declare function PopoverDescription({ className, ...props }: Popover.Description.Props): React.JSX.Element;
|
|
10
|
+
export { Popover$1 as Popover, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger };
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
import { cn } from "../lib/cn.js";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
import { Popover } from "@base-ui/react/popover";
|
|
6
|
+
// src/popover/popover.tsx
|
|
7
|
+
function Popover$1({ ...props }) {
|
|
8
|
+
return /* @__PURE__ */ jsx(Popover.Root, {
|
|
9
|
+
"data-slot": "popover",
|
|
10
|
+
...props
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
function PopoverTrigger({ ...props }) {
|
|
14
|
+
return /* @__PURE__ */ jsx(Popover.Trigger, {
|
|
15
|
+
"data-slot": "popover-trigger",
|
|
16
|
+
...props
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
function PopoverContent({ className, align = "center", alignOffset = 0, side = "bottom", sideOffset = 4, ...props }) {
|
|
20
|
+
return /* @__PURE__ */ jsx(Popover.Portal, { children: /* @__PURE__ */ jsx(Popover.Positioner, {
|
|
21
|
+
align,
|
|
22
|
+
alignOffset,
|
|
23
|
+
side,
|
|
24
|
+
sideOffset,
|
|
25
|
+
className: "isolate z-50",
|
|
26
|
+
children: /* @__PURE__ */ jsx(Popover.Popup, {
|
|
27
|
+
"data-slot": "popover-content",
|
|
28
|
+
className: cn("z-50 flex w-72 origin-(--transform-origin) flex-col gap-2.5 rounded-lg bg-popover p-2.5 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className),
|
|
29
|
+
...props
|
|
30
|
+
})
|
|
31
|
+
}) });
|
|
32
|
+
}
|
|
33
|
+
function PopoverHeader({ className, ...props }) {
|
|
34
|
+
return /* @__PURE__ */ jsx("div", {
|
|
35
|
+
"data-slot": "popover-header",
|
|
36
|
+
className: cn("flex flex-col gap-0.5 text-sm", className),
|
|
37
|
+
...props
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
function PopoverTitle({ className, ...props }) {
|
|
41
|
+
return /* @__PURE__ */ jsx(Popover.Title, {
|
|
42
|
+
"data-slot": "popover-title",
|
|
43
|
+
className: cn("font-medium", className),
|
|
44
|
+
...props
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
function PopoverDescription({ className, ...props }) {
|
|
48
|
+
return /* @__PURE__ */ jsx(Popover.Description, {
|
|
49
|
+
"data-slot": "popover-description",
|
|
50
|
+
className: cn("text-muted-foreground", className),
|
|
51
|
+
...props
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
export { Popover$1 as Popover, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
|
|
2
|
+
import { Radio } from "@base-ui/react/radio";
|
|
3
|
+
import { RadioGroup } from "@base-ui/react/radio-group";
|
|
4
|
+
declare function RadioGroup$1({ className, onValueChange, ...props }: RadioGroup.Props): import("react").JSX.Element;
|
|
5
|
+
declare function RadioGroupItem({ className, ...props }: Radio.Root.Props): import("react").JSX.Element;
|
|
6
|
+
export { RadioGroup$1 as RadioGroup, RadioGroupItem };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
import { cn } from "../lib/cn.js";
|
|
4
|
+
import { useCue } from "../sound/sound-map.js";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
import { Radio } from "@base-ui/react/radio";
|
|
7
|
+
import { RadioGroup } from "@base-ui/react/radio-group";
|
|
8
|
+
// src/radio-group/radio-group.tsx
|
|
9
|
+
function RadioGroup$1({ className, onValueChange, ...props }) {
|
|
10
|
+
const cue = useCue("radio-group");
|
|
11
|
+
return /* @__PURE__ */ jsx(RadioGroup, {
|
|
12
|
+
"data-slot": "radio-group",
|
|
13
|
+
className: cn("grid w-full gap-2", className),
|
|
14
|
+
onValueChange: (value, details) => {
|
|
15
|
+
onValueChange?.(value, details);
|
|
16
|
+
if (!details.isCanceled) cue("change");
|
|
17
|
+
},
|
|
18
|
+
...props
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
function RadioGroupItem({ className, ...props }) {
|
|
22
|
+
return /* @__PURE__ */ jsx(Radio.Root, {
|
|
23
|
+
"data-slot": "radio-group-item",
|
|
24
|
+
className: cn("group/radio-group-item peer relative flex aspect-square size-4 shrink-0 rounded-full border border-input outline-none group-has-[:focus-visible]/field-label:ring-0 group-has-[:focus-visible]/field-label:not-data-checked:border-input after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 data-disabled:cursor-not-allowed data-disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground group-has-[:focus-visible]/field-label:data-checked:border-primary dark:data-checked:bg-primary", className),
|
|
25
|
+
...props,
|
|
26
|
+
children: /* @__PURE__ */ jsx(Radio.Indicator, {
|
|
27
|
+
"data-slot": "radio-group-indicator",
|
|
28
|
+
className: "flex size-4 items-center justify-center",
|
|
29
|
+
children: /* @__PURE__ */ jsx("span", { className: "absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2 rounded-full bg-primary-foreground" })
|
|
30
|
+
})
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
export { RadioGroup$1 as RadioGroup, RadioGroupItem };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
|
|
2
|
+
import { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue } from "./select.js";
|
|
3
|
+
export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { Select } from "@base-ui/react/select";
|
|
4
|
+
declare function Select$1<Value, Multiple extends boolean | undefined = false>({ onValueChange, ...props }: Select.Root.Props<Value, Multiple>): React.JSX.Element;
|
|
5
|
+
declare function SelectGroup({ className, ...props }: Select.Group.Props): React.JSX.Element;
|
|
6
|
+
declare function SelectValue({ className, ...props }: Select.Value.Props): React.JSX.Element;
|
|
7
|
+
declare function SelectTrigger({ className, size, children, ...props }: Select.Trigger.Props & {
|
|
8
|
+
size?: "sm" | "default";
|
|
9
|
+
}): React.JSX.Element;
|
|
10
|
+
declare function SelectContent({ className, children, side, sideOffset, align, alignOffset, alignItemWithTrigger, ...props }: Select.Popup.Props & Pick<Select.Positioner.Props, "align" | "alignOffset" | "side" | "sideOffset" | "alignItemWithTrigger">): React.JSX.Element;
|
|
11
|
+
declare function SelectLabel({ className, ...props }: Select.GroupLabel.Props): React.JSX.Element;
|
|
12
|
+
declare function SelectItem({ className, children, ...props }: Select.Item.Props): React.JSX.Element;
|
|
13
|
+
declare function SelectSeparator({ className, ...props }: Select.Separator.Props): React.JSX.Element;
|
|
14
|
+
declare function SelectScrollUpButton({ className, ...props }: React.ComponentProps<typeof Select.ScrollUpArrow>): React.JSX.Element;
|
|
15
|
+
declare function SelectScrollDownButton({ className, ...props }: React.ComponentProps<typeof Select.ScrollDownArrow>): React.JSX.Element;
|
|
16
|
+
export { Select$1 as Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue };
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
import { cn } from "../lib/cn.js";
|
|
4
|
+
import { useCue } from "../sound/sound-map.js";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import { Select } from "@base-ui/react/select";
|
|
7
|
+
// src/select/select.tsx
|
|
8
|
+
function Select$1({ onValueChange, ...props }) {
|
|
9
|
+
const cue = useCue("select");
|
|
10
|
+
return /* @__PURE__ */ jsx(Select.Root, {
|
|
11
|
+
onValueChange: (value, details) => {
|
|
12
|
+
onValueChange?.(value, details);
|
|
13
|
+
if (!details.isCanceled) cue("choose");
|
|
14
|
+
},
|
|
15
|
+
...props
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
function SelectGroup({ className, ...props }) {
|
|
19
|
+
return /* @__PURE__ */ jsx(Select.Group, {
|
|
20
|
+
"data-slot": "select-group",
|
|
21
|
+
className: cn("scroll-my-1 p-1", className),
|
|
22
|
+
...props
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
function SelectValue({ className, ...props }) {
|
|
26
|
+
return /* @__PURE__ */ jsx(Select.Value, {
|
|
27
|
+
"data-slot": "select-value",
|
|
28
|
+
className: cn("flex flex-1 text-left", className),
|
|
29
|
+
...props
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
function SelectTrigger({ className, size = "default", children, ...props }) {
|
|
33
|
+
return /* @__PURE__ */ jsxs(Select.Trigger, {
|
|
34
|
+
"data-slot": "select-trigger",
|
|
35
|
+
"data-size": size,
|
|
36
|
+
className: cn("flex w-fit items-center justify-between gap-1.5 rounded-lg border border-input bg-transparent py-2 pr-2 pl-2.5 text-sm whitespace-nowrap transition-colors outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
37
|
+
...props,
|
|
38
|
+
children: [children, /* @__PURE__ */ jsx(Select.Icon, { render: /* @__PURE__ */ jsx("svg", {
|
|
39
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
40
|
+
viewBox: "0 0 24 24",
|
|
41
|
+
fill: "none",
|
|
42
|
+
stroke: "currentColor",
|
|
43
|
+
strokeWidth: "2",
|
|
44
|
+
strokeLinecap: "round",
|
|
45
|
+
strokeLinejoin: "round",
|
|
46
|
+
className: "pointer-events-none size-4 text-muted-foreground",
|
|
47
|
+
"aria-hidden": "true",
|
|
48
|
+
children: /* @__PURE__ */ jsx("path", { d: "m6 9 6 6 6-6" })
|
|
49
|
+
}) })]
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
function SelectContent({ className, children, side = "bottom", sideOffset = 4, align = "center", alignOffset = 0, alignItemWithTrigger = true, ...props }) {
|
|
53
|
+
return /* @__PURE__ */ jsx(Select.Portal, { children: /* @__PURE__ */ jsx(Select.Positioner, {
|
|
54
|
+
side,
|
|
55
|
+
sideOffset,
|
|
56
|
+
align,
|
|
57
|
+
alignOffset,
|
|
58
|
+
alignItemWithTrigger,
|
|
59
|
+
className: "isolate z-50",
|
|
60
|
+
children: /* @__PURE__ */ jsxs(Select.Popup, {
|
|
61
|
+
"data-slot": "select-content",
|
|
62
|
+
"data-align-trigger": alignItemWithTrigger,
|
|
63
|
+
className: cn("cn-menu-target cn-menu-translucent relative isolate z-50 max-h-(--available-height) w-(--anchor-width) min-w-36 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className),
|
|
64
|
+
...props,
|
|
65
|
+
children: [
|
|
66
|
+
/* @__PURE__ */ jsx(SelectScrollUpButton, {}),
|
|
67
|
+
/* @__PURE__ */ jsx(Select.List, { children }),
|
|
68
|
+
/* @__PURE__ */ jsx(SelectScrollDownButton, {})
|
|
69
|
+
]
|
|
70
|
+
})
|
|
71
|
+
}) });
|
|
72
|
+
}
|
|
73
|
+
function SelectLabel({ className, ...props }) {
|
|
74
|
+
return /* @__PURE__ */ jsx(Select.GroupLabel, {
|
|
75
|
+
"data-slot": "select-label",
|
|
76
|
+
className: cn("px-1.5 py-1 text-xs text-muted-foreground", className),
|
|
77
|
+
...props
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
function SelectItem({ className, children, ...props }) {
|
|
81
|
+
return /* @__PURE__ */ jsxs(Select.Item, {
|
|
82
|
+
"data-slot": "select-item",
|
|
83
|
+
className: cn("relative flex w-full cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2", className),
|
|
84
|
+
...props,
|
|
85
|
+
children: [/* @__PURE__ */ jsx(Select.ItemText, {
|
|
86
|
+
className: "flex flex-1 shrink-0 gap-2 whitespace-nowrap",
|
|
87
|
+
children
|
|
88
|
+
}), /* @__PURE__ */ jsx(Select.ItemIndicator, {
|
|
89
|
+
render: /* @__PURE__ */ jsx("span", { className: "pointer-events-none absolute right-2 flex size-4 items-center justify-center" }),
|
|
90
|
+
children: /* @__PURE__ */ jsx("svg", {
|
|
91
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
92
|
+
viewBox: "0 0 24 24",
|
|
93
|
+
fill: "none",
|
|
94
|
+
stroke: "currentColor",
|
|
95
|
+
strokeWidth: "2",
|
|
96
|
+
strokeLinecap: "round",
|
|
97
|
+
strokeLinejoin: "round",
|
|
98
|
+
className: "pointer-events-none",
|
|
99
|
+
"aria-hidden": "true",
|
|
100
|
+
children: /* @__PURE__ */ jsx("path", { d: "M20 6 9 17l-5-5" })
|
|
101
|
+
})
|
|
102
|
+
})]
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
function SelectSeparator({ className, ...props }) {
|
|
106
|
+
return /* @__PURE__ */ jsx(Select.Separator, {
|
|
107
|
+
"data-slot": "select-separator",
|
|
108
|
+
className: cn("pointer-events-none -mx-1 my-1 h-px bg-border", className),
|
|
109
|
+
...props
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
function SelectScrollUpButton({ className, ...props }) {
|
|
113
|
+
return /* @__PURE__ */ jsx(Select.ScrollUpArrow, {
|
|
114
|
+
"data-slot": "select-scroll-up-button",
|
|
115
|
+
className: cn("top-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4", className),
|
|
116
|
+
...props,
|
|
117
|
+
children: /* @__PURE__ */ jsx("svg", {
|
|
118
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
119
|
+
viewBox: "0 0 24 24",
|
|
120
|
+
fill: "none",
|
|
121
|
+
stroke: "currentColor",
|
|
122
|
+
strokeWidth: "2",
|
|
123
|
+
strokeLinecap: "round",
|
|
124
|
+
strokeLinejoin: "round",
|
|
125
|
+
"aria-hidden": "true",
|
|
126
|
+
children: /* @__PURE__ */ jsx("path", { d: "m18 15-6-6-6 6" })
|
|
127
|
+
})
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
function SelectScrollDownButton({ className, ...props }) {
|
|
131
|
+
return /* @__PURE__ */ jsx(Select.ScrollDownArrow, {
|
|
132
|
+
"data-slot": "select-scroll-down-button",
|
|
133
|
+
className: cn("bottom-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4", className),
|
|
134
|
+
...props,
|
|
135
|
+
children: /* @__PURE__ */ jsx("svg", {
|
|
136
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
137
|
+
viewBox: "0 0 24 24",
|
|
138
|
+
fill: "none",
|
|
139
|
+
stroke: "currentColor",
|
|
140
|
+
strokeWidth: "2",
|
|
141
|
+
strokeLinecap: "round",
|
|
142
|
+
strokeLinejoin: "round",
|
|
143
|
+
"aria-hidden": "true",
|
|
144
|
+
children: /* @__PURE__ */ jsx("path", { d: "m6 9 6 6 6-6" })
|
|
145
|
+
})
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
export { Select$1 as Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
import { cn } from "../lib/cn.js";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
import { Separator } from "@base-ui/react/separator";
|
|
6
|
+
// src/separator/separator.tsx
|
|
7
|
+
function Separator$1({ className, orientation = "horizontal", ...props }) {
|
|
8
|
+
return /* @__PURE__ */ jsx(Separator, {
|
|
9
|
+
"data-slot": "separator",
|
|
10
|
+
orientation,
|
|
11
|
+
className: cn("shrink-0 bg-border data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch", className),
|
|
12
|
+
...props
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
export { Separator$1 as Separator };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
declare function Skeleton({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
4
|
+
/**
|
|
5
|
+
* What replaces a Skeleton once it loads (#128): it fades in over duration.fast (opacity only;
|
|
6
|
+
* feel.css), instantly under reduced motion or after keyboard input. Render it in the Skeleton's
|
|
7
|
+
* place: `{loading ? <Skeleton className="h-4 w-40" /> : <SkeletonContent>…</SkeletonContent>}`.
|
|
8
|
+
*/
|
|
9
|
+
declare function SkeletonContent({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
10
|
+
export { Skeleton, SkeletonContent };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../lib/cn.js";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
// src/skeleton/skeleton.tsx
|
|
5
|
+
function Skeleton({ className, ...props }) {
|
|
6
|
+
return /* @__PURE__ */ jsx("div", {
|
|
7
|
+
"data-slot": "skeleton",
|
|
8
|
+
className: cn("animate-pulse rounded-md bg-muted", className),
|
|
9
|
+
...props
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* What replaces a Skeleton once it loads (#128): it fades in over duration.fast (opacity only;
|
|
14
|
+
* feel.css), instantly under reduced motion or after keyboard input. Render it in the Skeleton's
|
|
15
|
+
* place: `{loading ? <Skeleton className="h-4 w-40" /> : <SkeletonContent>…</SkeletonContent>}`.
|
|
16
|
+
*/
|
|
17
|
+
function SkeletonContent({ className, ...props }) {
|
|
18
|
+
return /* @__PURE__ */ jsx("div", {
|
|
19
|
+
"data-slot": "skeleton-content",
|
|
20
|
+
className,
|
|
21
|
+
...props
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
export { Skeleton, SkeletonContent };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../lib/cn.js";
|
|
3
|
+
import { useCue } from "../sound/sound-map.js";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { Slider } from "@base-ui/react/slider";
|
|
6
|
+
// src/slider/slider.tsx
|
|
7
|
+
function Slider$1({ className, defaultValue, value, min = 0, max = 100, onValueCommitted, ...props }) {
|
|
8
|
+
const cue = useCue("slider");
|
|
9
|
+
const _values = Array.isArray(value) ? value : Array.isArray(defaultValue) ? defaultValue : [min, max];
|
|
10
|
+
return /* @__PURE__ */ jsx(Slider.Root, {
|
|
11
|
+
className: cn("data-horizontal:w-full data-vertical:h-full", className),
|
|
12
|
+
"data-slot": "slider",
|
|
13
|
+
defaultValue,
|
|
14
|
+
value,
|
|
15
|
+
min,
|
|
16
|
+
max,
|
|
17
|
+
thumbAlignment: "edge",
|
|
18
|
+
onValueCommitted: (next, details) => {
|
|
19
|
+
onValueCommitted?.(next, details);
|
|
20
|
+
cue("commit");
|
|
21
|
+
},
|
|
22
|
+
...props,
|
|
23
|
+
children: /* @__PURE__ */ jsxs(Slider.Control, {
|
|
24
|
+
className: "relative flex w-full touch-none items-center select-none data-disabled:opacity-50 data-vertical:h-full data-vertical:min-h-40 data-vertical:w-auto data-vertical:flex-col",
|
|
25
|
+
children: [/* @__PURE__ */ jsx(Slider.Track, {
|
|
26
|
+
"data-slot": "slider-track",
|
|
27
|
+
className: "relative grow overflow-hidden rounded-full bg-muted select-none data-horizontal:h-1 data-horizontal:w-full data-vertical:h-full data-vertical:w-1",
|
|
28
|
+
children: /* @__PURE__ */ jsx(Slider.Indicator, {
|
|
29
|
+
"data-slot": "slider-range",
|
|
30
|
+
className: "bg-primary select-none data-horizontal:h-full data-vertical:w-full"
|
|
31
|
+
})
|
|
32
|
+
}), Array.from({ length: _values.length }, (_, index) => /* @__PURE__ */ jsx(Slider.Thumb, {
|
|
33
|
+
"data-slot": "slider-thumb",
|
|
34
|
+
className: "relative block size-3 shrink-0 rounded-full border border-ring bg-white ring-ring/50 transition-[color,box-shadow] select-none after:absolute after:-inset-2 hover:ring-3 focus-visible:ring-3 focus-visible:outline-hidden active:ring-3 disabled:pointer-events-none disabled:opacity-50"
|
|
35
|
+
}, index))]
|
|
36
|
+
})
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
export { Slider$1 as Slider };
|