xiod-ui 1.0.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/LICENSE +73 -0
- package/README.md +167 -0
- package/dist/components/accordion.d.ts +9 -0
- package/dist/components/accordion.js +46 -0
- package/dist/components/agent-steps.d.ts +47 -0
- package/dist/components/agent-steps.js +223 -0
- package/dist/components/alert-dialog.d.ts +21 -0
- package/dist/components/alert-dialog.js +74 -0
- package/dist/components/alert.d.ts +12 -0
- package/dist/components/alert.js +45 -0
- package/dist/components/aspect-ratio.d.ts +9 -0
- package/dist/components/aspect-ratio.js +22 -0
- package/dist/components/autocomplete.d.ts +35 -0
- package/dist/components/autocomplete.js +160 -0
- package/dist/components/avatar.d.ts +17 -0
- package/dist/components/avatar.js +65 -0
- package/dist/components/badge.d.ts +15 -0
- package/dist/components/badge.js +46 -0
- package/dist/components/breadcrumb.d.ts +12 -0
- package/dist/components/breadcrumb.js +75 -0
- package/dist/components/button-group.d.ts +14 -0
- package/dist/components/button-group.js +45 -0
- package/dist/components/button-split.d.ts +19 -0
- package/dist/components/button-split.js +73 -0
- package/dist/components/button.d.ts +15 -0
- package/dist/components/button.js +54 -0
- package/dist/components/calendar.d.ts +63 -0
- package/dist/components/calendar.js +425 -0
- package/dist/components/card.d.ts +17 -0
- package/dist/components/card.js +139 -0
- package/dist/components/carousel.d.ts +59 -0
- package/dist/components/carousel.js +503 -0
- package/dist/components/checkbox.d.ts +16 -0
- package/dist/components/checkbox.js +86 -0
- package/dist/components/circular-progress.d.ts +28 -0
- package/dist/components/circular-progress.js +127 -0
- package/dist/components/collapsible.d.ts +8 -0
- package/dist/components/collapsible.js +27 -0
- package/dist/components/color-picker.d.ts +159 -0
- package/dist/components/color-picker.js +1589 -0
- package/dist/components/combobox.d.ts +46 -0
- package/dist/components/combobox.js +237 -0
- package/dist/components/command.d.ts +22 -0
- package/dist/components/command.js +129 -0
- package/dist/components/context-menu.d.ts +38 -0
- package/dist/components/context-menu.js +164 -0
- package/dist/components/copy-to-clipboard.d.ts +32 -0
- package/dist/components/copy-to-clipboard.js +83 -0
- package/dist/components/corner-badge.d.ts +22 -0
- package/dist/components/corner-badge.js +84 -0
- package/dist/components/dashboard-grid.d.ts +83 -0
- package/dist/components/dashboard-grid.js +486 -0
- package/dist/components/date-picker.d.ts +29 -0
- package/dist/components/date-picker.js +261 -0
- package/dist/components/dialog.d.ts +26 -0
- package/dist/components/dialog.js +97 -0
- package/dist/components/dot-matrix.d.ts +32 -0
- package/dist/components/dot-matrix.js +707 -0
- package/dist/components/draggable.d.ts +42 -0
- package/dist/components/draggable.js +346 -0
- package/dist/components/drawer.d.ts +66 -0
- package/dist/components/drawer.js +304 -0
- package/dist/components/empty.d.ts +14 -0
- package/dist/components/empty.js +75 -0
- package/dist/components/field.d.ts +12 -0
- package/dist/components/field.js +44 -0
- package/dist/components/fieldset.d.ts +7 -0
- package/dist/components/fieldset.js +21 -0
- package/dist/components/file-upload.d.ts +61 -0
- package/dist/components/file-upload.js +482 -0
- package/dist/components/form.d.ts +6 -0
- package/dist/components/form.js +14 -0
- package/dist/components/frame.d.ts +10 -0
- package/dist/components/frame.js +47 -0
- package/dist/components/gauge.d.ts +27 -0
- package/dist/components/gauge.js +74 -0
- package/dist/components/grid.d.ts +26 -0
- package/dist/components/grid.js +204 -0
- package/dist/components/group.d.ts +19 -0
- package/dist/components/group.js +45 -0
- package/dist/components/input-group.d.ts +15 -0
- package/dist/components/input-group.js +61 -0
- package/dist/components/input-otp.d.ts +24 -0
- package/dist/components/input-otp.js +50 -0
- package/dist/components/input-payment.d.ts +131 -0
- package/dist/components/input-payment.js +1140 -0
- package/dist/components/input-phone.d.ts +70 -0
- package/dist/components/input-phone.js +657 -0
- package/dist/components/input-sensitive.d.ts +12 -0
- package/dist/components/input-sensitive.js +169 -0
- package/dist/components/input.d.ts +13 -0
- package/dist/components/input.js +26 -0
- package/dist/components/kbd.d.ts +6 -0
- package/dist/components/kbd.js +19 -0
- package/dist/components/kinetic-click.d.ts +48 -0
- package/dist/components/kinetic-click.js +1184 -0
- package/dist/components/label.d.ts +6 -0
- package/dist/components/label.js +18 -0
- package/dist/components/list-box.d.ts +20 -0
- package/dist/components/list-box.js +148 -0
- package/dist/components/loader.d.ts +13 -0
- package/dist/components/loader.js +430 -0
- package/dist/components/marker.d.ts +15 -0
- package/dist/components/marker.js +59 -0
- package/dist/components/menu.d.ts +42 -0
- package/dist/components/menu.js +186 -0
- package/dist/components/menubar.d.ts +40 -0
- package/dist/components/menubar.js +107 -0
- package/dist/components/message.d.ts +33 -0
- package/dist/components/message.js +112 -0
- package/dist/components/meter.d.ts +10 -0
- package/dist/components/meter.js +42 -0
- package/dist/components/morphic-toast.d.ts +61 -0
- package/dist/components/morphic-toast.js +916 -0
- package/dist/components/navigation-menu.d.ts +26 -0
- package/dist/components/navigation-menu.js +116 -0
- package/dist/components/number-field.d.ts +15 -0
- package/dist/components/number-field.js +86 -0
- package/dist/components/option-picker.d.ts +18 -0
- package/dist/components/option-picker.js +89 -0
- package/dist/components/orb.d.ts +38 -0
- package/dist/components/orb.js +1413 -0
- package/dist/components/pagination.d.ts +25 -0
- package/dist/components/pagination.js +147 -0
- package/dist/components/popover.d.ts +22 -0
- package/dist/components/popover.js +79 -0
- package/dist/components/preview-card.d.ts +16 -0
- package/dist/components/preview-card.js +60 -0
- package/dist/components/progress.d.ts +21 -0
- package/dist/components/progress.js +139 -0
- package/dist/components/radio.d.ts +16 -0
- package/dist/components/radio.js +68 -0
- package/dist/components/resizable.d.ts +58 -0
- package/dist/components/resizable.js +964 -0
- package/dist/components/ruler-picker.d.ts +27 -0
- package/dist/components/ruler-picker.js +253 -0
- package/dist/components/scroll-area.d.ts +13 -0
- package/dist/components/scroll-area.js +34 -0
- package/dist/components/scroll-bar.d.ts +13 -0
- package/dist/components/scroll-bar.js +47 -0
- package/dist/components/select.d.ts +29 -0
- package/dist/components/select.js +140 -0
- package/dist/components/separator.d.ts +6 -0
- package/dist/components/separator.js +15 -0
- package/dist/components/sidebar.d.ts +65 -0
- package/dist/components/sidebar.js +408 -0
- package/dist/components/skeleton.d.ts +5 -0
- package/dist/components/skeleton.js +12 -0
- package/dist/components/slider.d.ts +12 -0
- package/dist/components/slider.js +96 -0
- package/dist/components/sortable.d.ts +44 -0
- package/dist/components/sortable.js +327 -0
- package/dist/components/switch.d.ts +15 -0
- package/dist/components/switch.js +63 -0
- package/dist/components/table.d.ts +12 -0
- package/dist/components/table.js +65 -0
- package/dist/components/tabs.d.ts +12 -0
- package/dist/components/tabs.js +39 -0
- package/dist/components/text.d.ts +14 -0
- package/dist/components/text.js +69 -0
- package/dist/components/textarea.d.ts +9 -0
- package/dist/components/textarea.js +20 -0
- package/dist/components/theme-provider.d.ts +52 -0
- package/dist/components/theme-provider.js +148 -0
- package/dist/components/timeline.d.ts +34 -0
- package/dist/components/timeline.js +147 -0
- package/dist/components/toast.d.ts +17 -0
- package/dist/components/toast.js +161 -0
- package/dist/components/toggle-group.d.ts +14 -0
- package/dist/components/toggle-group.js +53 -0
- package/dist/components/toggle.d.ts +11 -0
- package/dist/components/toggle.js +36 -0
- package/dist/components/toolbar.d.ts +11 -0
- package/dist/components/toolbar.js +49 -0
- package/dist/components/tooltip.d.ts +17 -0
- package/dist/components/tooltip.js +56 -0
- package/dist/components/waveform.d.ts +61 -0
- package/dist/components/waveform.js +500 -0
- package/dist/components/wheel-picker.d.ts +44 -0
- package/dist/components/wheel-picker.js +771 -0
- package/dist/hooks/use-copy-to-clipboard.d.ts +9 -0
- package/dist/hooks/use-copy-to-clipboard.js +36 -0
- package/dist/hooks/use-media-query.d.ts +21 -0
- package/dist/hooks/use-media-query.js +58 -0
- package/dist/styles.css +202 -0
- package/dist/themes/afterglow.css +89 -0
- package/dist/themes/afterglow.scoped.css +90 -0
- package/dist/themes/blacklight.css +89 -0
- package/dist/themes/blacklight.scoped.css +90 -0
- package/dist/themes/cathode.css +89 -0
- package/dist/themes/cathode.scoped.css +90 -0
- package/dist/themes/cel.css +89 -0
- package/dist/themes/cel.scoped.css +90 -0
- package/dist/themes/cinder.css +89 -0
- package/dist/themes/cinder.scoped.css +90 -0
- package/dist/themes/clay.css +89 -0
- package/dist/themes/clay.scoped.css +90 -0
- package/dist/themes/cobalt.css +89 -0
- package/dist/themes/cobalt.scoped.css +90 -0
- package/dist/themes/crimson.css +89 -0
- package/dist/themes/crimson.scoped.css +90 -0
- package/dist/themes/ion.css +89 -0
- package/dist/themes/ion.scoped.css +90 -0
- package/dist/themes/iris.css +89 -0
- package/dist/themes/iris.scoped.css +90 -0
- package/dist/themes/lagoon.css +89 -0
- package/dist/themes/lagoon.scoped.css +90 -0
- package/dist/themes/mochi.css +89 -0
- package/dist/themes/mochi.scoped.css +90 -0
- package/dist/themes/riso.css +89 -0
- package/dist/themes/riso.scoped.css +90 -0
- package/dist/themes/roast.css +89 -0
- package/dist/themes/roast.scoped.css +90 -0
- package/dist/themes/sage.css +89 -0
- package/dist/themes/sage.scoped.css +90 -0
- package/dist/themes/sepia.css +89 -0
- package/dist/themes/sepia.scoped.css +90 -0
- package/dist/themes/sorbet.css +89 -0
- package/dist/themes/sorbet.scoped.css +90 -0
- package/dist/themes/taffy.css +89 -0
- package/dist/themes/taffy.scoped.css +90 -0
- package/dist/themes/toxin.css +89 -0
- package/dist/themes/toxin.scoped.css +90 -0
- package/package.json +140 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import * as React$1 from "react";
|
|
2
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
3
|
+
import { NavigationMenu as NavigationMenu$1 } from "@base-ui/react/navigation-menu";
|
|
4
|
+
//#region src/components/navigation-menu.d.ts
|
|
5
|
+
declare function NavigationMenu({ className, ...props }: NavigationMenu$1.Root.Props): React$1.JSX.Element;
|
|
6
|
+
declare function NavigationMenuList({ className, ...props }: NavigationMenu$1.List.Props): React$1.JSX.Element;
|
|
7
|
+
declare function NavigationMenuItem({ className, ...props }: NavigationMenu$1.Item.Props): React$1.JSX.Element;
|
|
8
|
+
declare function NavigationMenuTrigger({ className, children, ...props }: NavigationMenu$1.Trigger.Props): React$1.JSX.Element;
|
|
9
|
+
declare function NavigationMenuIcon({ className, ...props }: NavigationMenu$1.Icon.Props): React$1.JSX.Element;
|
|
10
|
+
declare function NavigationMenuContent({ className, ...props }: NavigationMenu$1.Content.Props): React$1.JSX.Element;
|
|
11
|
+
declare function NavigationMenuLink({ className, render, ...props }: useRender.ComponentProps<"a"> & {
|
|
12
|
+
active?: boolean;
|
|
13
|
+
}): React$1.JSX.Element;
|
|
14
|
+
declare function NavigationMenuViewport({ className, ...props }: NavigationMenu$1.Viewport.Props): React$1.JSX.Element;
|
|
15
|
+
declare const NavigationMenuPortal: React$1.ForwardRefExoticComponent<Omit<import("@base-ui/react").NavigationMenuPortalProps, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
16
|
+
declare function NavigationMenuPopup({ children, className, sideOffset, align, alignOffset, side, anchor, hideArrow, ...props }: NavigationMenu$1.Popup.Props & {
|
|
17
|
+
align?: NavigationMenu$1.Positioner.Props["align"];
|
|
18
|
+
sideOffset?: NavigationMenu$1.Positioner.Props["sideOffset"];
|
|
19
|
+
alignOffset?: NavigationMenu$1.Positioner.Props["alignOffset"];
|
|
20
|
+
side?: NavigationMenu$1.Positioner.Props["side"];
|
|
21
|
+
anchor?: NavigationMenu$1.Positioner.Props["anchor"];
|
|
22
|
+
hideArrow?: boolean;
|
|
23
|
+
}): React$1.JSX.Element;
|
|
24
|
+
declare function NavigationMenuIndicator({ className, ...props }: React$1.ComponentProps<"div">): React$1.JSX.Element;
|
|
25
|
+
//#endregion
|
|
26
|
+
export { NavigationMenu, NavigationMenuContent, NavigationMenuIcon, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuPopup, NavigationMenuPortal, NavigationMenuTrigger, NavigationMenuViewport };
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "cn";
|
|
3
|
+
import { ChevronDown } from "xiod-icons/icons/ChevronDown";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { mergeProps } from "@base-ui/react/merge-props";
|
|
6
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
7
|
+
import { NavigationMenu as NavigationMenu$1 } from "@base-ui/react/navigation-menu";
|
|
8
|
+
//#region src/components/navigation-menu.tsx
|
|
9
|
+
function NavigationMenu({ className, ...props }) {
|
|
10
|
+
return /* @__PURE__ */ jsx(NavigationMenu$1.Root, {
|
|
11
|
+
className: cn("relative flex max-w-max flex-1 items-center justify-center", className),
|
|
12
|
+
"data-slot": "navigation-menu",
|
|
13
|
+
...props
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
function NavigationMenuList({ className, ...props }) {
|
|
17
|
+
return /* @__PURE__ */ jsx(NavigationMenu$1.List, {
|
|
18
|
+
className: cn("group flex flex-1 list-none items-center justify-center space-x-1", className),
|
|
19
|
+
"data-slot": "navigation-menu-list",
|
|
20
|
+
...props
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
function NavigationMenuItem({ className, ...props }) {
|
|
24
|
+
return /* @__PURE__ */ jsx(NavigationMenu$1.Item, {
|
|
25
|
+
className: cn("relative", className),
|
|
26
|
+
"data-slot": "navigation-menu-item",
|
|
27
|
+
...props
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
function NavigationMenuTrigger({ className, children, ...props }) {
|
|
31
|
+
return /* @__PURE__ */ jsx(NavigationMenu$1.Trigger, {
|
|
32
|
+
className: cn("group inline-flex h-9 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus-visible:outline-2 focus-visible:-outline-offset-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-64 data-popup-open:bg-accent/50 data-popup-open:text-accent-foreground pointer-coarse:after:absolute pointer-coarse:after:size-full pointer-coarse:after:min-h-11 pointer-coarse:after:min-w-11 sm:h-8", className),
|
|
33
|
+
"data-slot": "navigation-menu-trigger",
|
|
34
|
+
...props,
|
|
35
|
+
children
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
function NavigationMenuIcon({ className, ...props }) {
|
|
39
|
+
return /* @__PURE__ */ jsx(NavigationMenu$1.Icon, {
|
|
40
|
+
className: cn("relative ml-1 size-3 transition duration-200 data-popup-open:rotate-180 [&_svg:not([class*='size-'])]:size-full [&_svg]:pointer-events-none [&_svg]:shrink-0", className),
|
|
41
|
+
"data-slot": "navigation-menu-icon",
|
|
42
|
+
...props,
|
|
43
|
+
children: /* @__PURE__ */ jsx(ChevronDown, { className: "size-full" })
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
function NavigationMenuContent({ className, ...props }) {
|
|
47
|
+
return /* @__PURE__ */ jsx(NavigationMenu$1.Content, {
|
|
48
|
+
className: cn("left-0 top-0 w-[calc(100vw-40px)] min-w-[280px] sm:min-w-[400px] p-4 transition-[opacity,transform,translate] duration-200 ease-in-out data-ending-style:opacity-0 data-starting-style:opacity-0 data-ending-style:data-[activation-direction=left]:translate-x-[50%] data-ending-style:data-[activation-direction=right]:translate-x-[-50%] data-starting-style:data-[activation-direction=left]:translate-x-[-50%] data-starting-style:data-[activation-direction=right]:translate-x-[50%] sm:w-max", className),
|
|
49
|
+
"data-slot": "navigation-menu-content",
|
|
50
|
+
...props
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
function NavigationMenuLink({ className, render, ...props }) {
|
|
54
|
+
const defaultProps = {
|
|
55
|
+
className: cn("block select-none space-y-1 rounded-md p-3 leading-none no-underline outline-none transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:outline focus-visible:outline-2 focus-visible:-outline-offset-1 focus-visible:outline-ring pointer-coarse:after:absolute pointer-coarse:after:size-full pointer-coarse:after:min-h-11 pointer-coarse:after:min-w-11", className),
|
|
56
|
+
"data-slot": "navigation-menu-link"
|
|
57
|
+
};
|
|
58
|
+
return /* @__PURE__ */ jsx(NavigationMenu$1.Link, { render: useRender({
|
|
59
|
+
defaultTagName: "a",
|
|
60
|
+
props: mergeProps(defaultProps, props),
|
|
61
|
+
render
|
|
62
|
+
}) });
|
|
63
|
+
}
|
|
64
|
+
function ArrowSvg(props) {
|
|
65
|
+
return /* @__PURE__ */ jsxs("svg", {
|
|
66
|
+
width: "20",
|
|
67
|
+
height: "10",
|
|
68
|
+
viewBox: "0 0 20 10",
|
|
69
|
+
fill: "none",
|
|
70
|
+
...props,
|
|
71
|
+
children: [/* @__PURE__ */ jsx("path", {
|
|
72
|
+
d: "M9.66437 2.60207L4.80758 6.97318C4.07308 7.63423 3.11989 8 2.13172 8H0V10H20V8H18.5349C17.5468 8 16.5936 7.63423 15.8591 6.97318L11.0023 2.60207C10.622 2.2598 10.0447 2.25979 9.66437 2.60207Z",
|
|
73
|
+
className: "fill-popover"
|
|
74
|
+
}), /* @__PURE__ */ jsx("path", {
|
|
75
|
+
d: "M10.3333 3.34539L5.47654 7.71648C4.55842 8.54279 3.36693 9 2.13172 9H0V8H2.13172C3.11989 8 4.07308 7.63423 4.80758 6.97318L9.66437 2.60207C10.0447 2.25979 10.622 2.2598 11.0023 2.60207L15.8591 6.97318C16.5936 7.63423 17.5468 8 18.5349 8H20V9H18.5349C17.2998 9 16.1083 8.54278 15.1901 7.71648L10.3333 3.34539Z",
|
|
76
|
+
className: "fill-border"
|
|
77
|
+
})]
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
function NavigationMenuViewport({ className, ...props }) {
|
|
81
|
+
return /* @__PURE__ */ jsx(NavigationMenu$1.Viewport, {
|
|
82
|
+
className: cn("relative h-full w-full overflow-hidden", className),
|
|
83
|
+
"data-slot": "navigation-menu-viewport",
|
|
84
|
+
...props
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
const NavigationMenuPortal = NavigationMenu$1.Portal;
|
|
88
|
+
function NavigationMenuPopup({ children, className, sideOffset = 10, align = "center", alignOffset, side = "bottom", anchor, hideArrow = false, ...props }) {
|
|
89
|
+
return /* @__PURE__ */ jsx(NavigationMenu$1.Portal, { children: /* @__PURE__ */ jsx(NavigationMenu$1.Positioner, {
|
|
90
|
+
align,
|
|
91
|
+
alignOffset,
|
|
92
|
+
anchor,
|
|
93
|
+
className: "box-border h-(--positioner-height) w-(--positioner-width) max-w-(--available-width) transition-[top,left,right,bottom] duration-200 ease-in-out z-50 before:absolute before:content-[''] data-instant:transition-none data-[side=bottom]:before:top-[-10px] data-[side=bottom]:before:right-0 data-[side=bottom]:before:left-0 data-[side=bottom]:before:h-2.5 data-[side=left]:before:top-0 data-[side=left]:before:right-[-10px] data-[side=left]:before:bottom-0 data-[side=left]:before:w-2.5 data-[side=right]:before:top-0 data-[side=right]:before:bottom-0 data-[side=right]:before:left-[-10px] data-[side=right]:before:w-2.5 data-[side=top]:before:right-0 data-[side=top]:before:bottom-[-10px] data-[side=top]:before:left-0 data-[side=top]:before:h-2.5",
|
|
94
|
+
"data-slot": "navigation-menu-positioner",
|
|
95
|
+
side,
|
|
96
|
+
sideOffset,
|
|
97
|
+
children: /* @__PURE__ */ jsxs(NavigationMenu$1.Popup, {
|
|
98
|
+
className: cn("relative origin-(--transform-origin) w-(--popup-width) h-(--popup-height) rounded-xl border bg-popover text-popover-foreground shadow-lg/5 outline-none before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-xl)-1px)] before:shadow-[0_1px_--theme(--color-black/4%)] focus:outline-none dark:before:shadow-[0_-1px_--theme(--color-white/6%)] transition-[opacity,transform,width,height,scale,translate] duration-200 ease-in-out data-ending-style:scale-90 data-ending-style:opacity-0 data-starting-style:scale-90 data-starting-style:opacity-0", className),
|
|
99
|
+
"data-slot": "navigation-menu-popup",
|
|
100
|
+
...props,
|
|
101
|
+
children: [!hideArrow && /* @__PURE__ */ jsx(NavigationMenu$1.Arrow, {
|
|
102
|
+
className: "z-10 flex transition-[left] duration-200 ease-in-out data-[side=bottom]:top-[-9px] data-[side=bottom]:rotate-0 data-[side=left]:right-[-14px] data-[side=left]:rotate-90 data-[side=right]:left-[-14px] data-[side=right]:-rotate-90 data-[side=top]:bottom-[-9px] data-[side=top]:rotate-180",
|
|
103
|
+
children: /* @__PURE__ */ jsx(ArrowSvg, {})
|
|
104
|
+
}), children]
|
|
105
|
+
})
|
|
106
|
+
}) });
|
|
107
|
+
}
|
|
108
|
+
function NavigationMenuIndicator({ className, ...props }) {
|
|
109
|
+
return /* @__PURE__ */ jsx("div", {
|
|
110
|
+
className: cn("hidden", className),
|
|
111
|
+
"data-slot": "navigation-menu-indicator",
|
|
112
|
+
...props
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
//#endregion
|
|
116
|
+
export { NavigationMenu, NavigationMenuContent, NavigationMenuIcon, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuPopup, NavigationMenuPortal, NavigationMenuTrigger, NavigationMenuViewport };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React$1 from "react";
|
|
2
|
+
import { NumberField as NumberField$1 } from "@base-ui/react/number-field";
|
|
3
|
+
//#region src/components/number-field.d.ts
|
|
4
|
+
declare function NumberField({ id, className, size, ...props }: NumberField$1.Root.Props & {
|
|
5
|
+
size?: "sm" | "default" | "lg";
|
|
6
|
+
}): React$1.JSX.Element;
|
|
7
|
+
declare function NumberFieldGroup({ className, ...props }: NumberField$1.Group.Props): React$1.JSX.Element;
|
|
8
|
+
declare function NumberFieldDecrement({ className, ...props }: NumberField$1.Decrement.Props): React$1.JSX.Element;
|
|
9
|
+
declare function NumberFieldIncrement({ className, ...props }: NumberField$1.Increment.Props): React$1.JSX.Element;
|
|
10
|
+
declare function NumberFieldInput({ className, ...props }: NumberField$1.Input.Props): React$1.JSX.Element;
|
|
11
|
+
declare function NumberFieldScrubArea({ className, label, ...props }: NumberField$1.ScrubArea.Props & {
|
|
12
|
+
label: string;
|
|
13
|
+
}): React$1.JSX.Element;
|
|
14
|
+
//#endregion
|
|
15
|
+
export { NumberField, NumberFieldDecrement, NumberFieldGroup, NumberFieldIncrement, NumberFieldInput, NumberFieldScrubArea };
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { Label } from "./label.js";
|
|
3
|
+
import { cn } from "cn";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import * as React$1 from "react";
|
|
6
|
+
import { MinusSign } from "xiod-icons/icons/MinusSign";
|
|
7
|
+
import { NumberField as NumberField$1 } from "@base-ui/react/number-field";
|
|
8
|
+
import { PlusSign } from "xiod-icons/icons/PlusSign";
|
|
9
|
+
//#region src/components/number-field.tsx
|
|
10
|
+
const NumberFieldContext = React$1.createContext(null);
|
|
11
|
+
function NumberField({ id, className, size = "default", ...props }) {
|
|
12
|
+
const generatedId = React$1.useId();
|
|
13
|
+
const fieldId = id ?? generatedId;
|
|
14
|
+
const contextValue = React$1.useMemo(() => ({ fieldId }), [fieldId]);
|
|
15
|
+
return /* @__PURE__ */ jsx(NumberFieldContext.Provider, {
|
|
16
|
+
value: contextValue,
|
|
17
|
+
children: /* @__PURE__ */ jsx(NumberField$1.Root, {
|
|
18
|
+
className: cn("flex w-full flex-col items-start gap-2", className),
|
|
19
|
+
"data-size": size,
|
|
20
|
+
"data-slot": "number-field",
|
|
21
|
+
id: fieldId,
|
|
22
|
+
...props
|
|
23
|
+
})
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
function NumberFieldGroup({ className, ...props }) {
|
|
27
|
+
return /* @__PURE__ */ jsx(NumberField$1.Group, {
|
|
28
|
+
className: cn("relative flex w-full justify-between rounded-lg border border-input bg-background not-dark:bg-clip-padding text-base text-foreground shadow-xs/5 ring-ring/24 transition-shadow before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)] not-data-disabled:not-focus-within:not-aria-invalid:before:shadow-[0_1px_--theme(--color-black/4%)] focus-within:border-ring focus-within:ring-[3px] has-aria-invalid:border-destructive/36 has-autofill:bg-foreground/4 focus-within:has-aria-invalid:border-destructive/64 focus-within:has-aria-invalid:ring-destructive/48 data-disabled:pointer-events-none data-disabled:opacity-64 sm:text-sm dark:bg-input/32 dark:has-autofill:bg-foreground/8 dark:has-aria-invalid:ring-destructive/24 dark:not-data-disabled:not-focus-within:not-aria-invalid:before:shadow-[0_-1px_--theme(--color-white/6%)] [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0 [[data-disabled],:focus-within,[aria-invalid]]:shadow-none", className),
|
|
29
|
+
"data-slot": "number-field-group",
|
|
30
|
+
...props
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
function NumberFieldDecrement({ className, ...props }) {
|
|
34
|
+
return /* @__PURE__ */ jsx(NumberField$1.Decrement, {
|
|
35
|
+
className: cn("relative flex shrink-0 cursor-pointer items-center justify-center rounded-s-[calc(var(--radius-lg)-1px)] in-data-[size=sm]:px-[calc(--spacing(2.5)-1px)] px-[calc(--spacing(3)-1px)] transition-colors focus-visible:z-10 focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring pointer-coarse:after:absolute pointer-coarse:after:size-full pointer-coarse:after:min-h-11 pointer-coarse:after:min-w-11 hover:bg-accent", className),
|
|
36
|
+
"data-slot": "number-field-decrement",
|
|
37
|
+
...props,
|
|
38
|
+
children: /* @__PURE__ */ jsx(MinusSign, {})
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
function NumberFieldIncrement({ className, ...props }) {
|
|
42
|
+
return /* @__PURE__ */ jsx(NumberField$1.Increment, {
|
|
43
|
+
className: cn("relative flex shrink-0 cursor-pointer items-center justify-center rounded-e-[calc(var(--radius-lg)-1px)] in-data-[size=sm]:px-[calc(--spacing(2.5)-1px)] px-[calc(--spacing(3)-1px)] transition-colors focus-visible:z-10 focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring pointer-coarse:after:absolute pointer-coarse:after:size-full pointer-coarse:after:min-h-11 pointer-coarse:after:min-w-11 hover:bg-accent", className),
|
|
44
|
+
"data-slot": "number-field-increment",
|
|
45
|
+
...props,
|
|
46
|
+
children: /* @__PURE__ */ jsx(PlusSign, {})
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
function NumberFieldInput({ className, ...props }) {
|
|
50
|
+
return /* @__PURE__ */ jsx(NumberField$1.Input, {
|
|
51
|
+
className: cn("h-8.5 in-data-[size=lg]:h-9.5 in-data-[size=sm]:h-7.5 w-full min-w-0 grow bg-transparent in-data-[size=sm]:px-[calc(--spacing(2.5)-1px)] px-[calc(--spacing(3)-1px)] text-center tabular-nums in-data-[size=lg]:leading-9.5 in-data-[size=sm]:leading-7.5 leading-8.5 outline-none [transition:background-color_5000000s_ease-in-out_0s] sm:h-7.5 sm:in-data-[size=lg]:h-8.5 sm:in-data-[size=sm]:h-6.5 sm:in-data-[size=lg]:leading-8.5 sm:in-data-[size=sm]:leading-8.5 sm:leading-7.5", className),
|
|
52
|
+
"data-slot": "number-field-input",
|
|
53
|
+
...props
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
function NumberFieldScrubArea({ className, label, ...props }) {
|
|
57
|
+
const context = React$1.useContext(NumberFieldContext);
|
|
58
|
+
if (!context) throw new Error("NumberFieldScrubArea must be used within a NumberField component for accessibility.");
|
|
59
|
+
return /* @__PURE__ */ jsxs(NumberField$1.ScrubArea, {
|
|
60
|
+
className: cn("flex cursor-ew-resize", className),
|
|
61
|
+
"data-slot": "number-field-scrub-area",
|
|
62
|
+
...props,
|
|
63
|
+
children: [/* @__PURE__ */ jsx(Label, {
|
|
64
|
+
className: "cursor-ew-resize",
|
|
65
|
+
htmlFor: context.fieldId,
|
|
66
|
+
children: label
|
|
67
|
+
}), /* @__PURE__ */ jsx(NumberField$1.ScrubAreaCursor, {
|
|
68
|
+
className: "drop-shadow-[0_1px_1px_#0008] filter",
|
|
69
|
+
children: /* @__PURE__ */ jsx(CursorGrowIcon, {})
|
|
70
|
+
})]
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
function CursorGrowIcon(props) {
|
|
74
|
+
return /* @__PURE__ */ jsx("svg", {
|
|
75
|
+
fill: "black",
|
|
76
|
+
height: "14",
|
|
77
|
+
stroke: "white",
|
|
78
|
+
viewBox: "0 0 24 14",
|
|
79
|
+
width: "26",
|
|
80
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
81
|
+
...props,
|
|
82
|
+
children: /* @__PURE__ */ jsx("path", { d: "M19.5 5.5L6.49737 5.51844V2L1 6.9999L6.5 12L6.49737 8.5L19.5 8.5V12L25 6.9999L19.5 2V5.5Z" })
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
//#endregion
|
|
86
|
+
export { NumberField, NumberFieldDecrement, NumberFieldGroup, NumberFieldIncrement, NumberFieldInput, NumberFieldScrubArea };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as React$1 from "react";
|
|
2
|
+
//#region src/components/option-picker.d.ts
|
|
3
|
+
export interface Option {
|
|
4
|
+
id: string;
|
|
5
|
+
label: string;
|
|
6
|
+
icon: React$1.ComponentType<React$1.ComponentProps<"svg">>;
|
|
7
|
+
}
|
|
8
|
+
export interface OptionPickerProps extends Omit<React$1.HTMLAttributes<HTMLDivElement>, "onChange"> {
|
|
9
|
+
options: Option[];
|
|
10
|
+
value?: string;
|
|
11
|
+
defaultValue?: string;
|
|
12
|
+
onChange?: (value: string) => void;
|
|
13
|
+
triggerClassName?: string;
|
|
14
|
+
popupClassName?: string;
|
|
15
|
+
}
|
|
16
|
+
declare function OptionPicker({ options, value, defaultValue, onChange, className, triggerClassName, popupClassName, ...props }: OptionPickerProps): React$1.JSX.Element;
|
|
17
|
+
//#endregion
|
|
18
|
+
export { OptionPicker };
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { Button } from "./button.js";
|
|
3
|
+
import { cn } from "cn";
|
|
4
|
+
import { ChevronDown } from "xiod-icons/icons/ChevronDown";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import * as React$1 from "react";
|
|
7
|
+
import { Popover } from "@base-ui/react/popover";
|
|
8
|
+
//#region src/components/option-picker.tsx
|
|
9
|
+
function OptionPicker({ options, value, defaultValue, onChange, className, triggerClassName, popupClassName, ...props }) {
|
|
10
|
+
const [open, setOpen] = React$1.useState(false);
|
|
11
|
+
const displayOptions = React$1.useMemo(() => {
|
|
12
|
+
if (process.env.NODE_ENV !== "production" && options.length > 5) console.warn("OptionPicker: Only a maximum of 5 options are allowed. Excess options will be truncated.");
|
|
13
|
+
return options.slice(0, 5);
|
|
14
|
+
}, [options]);
|
|
15
|
+
const [internalValue, setInternalValue] = React$1.useState(defaultValue ?? displayOptions[0]?.id);
|
|
16
|
+
const selectedId = value !== void 0 ? value : internalValue;
|
|
17
|
+
const selectedOption = displayOptions.find((opt) => opt.id === selectedId) ?? displayOptions[0];
|
|
18
|
+
const handleSelect = (id) => {
|
|
19
|
+
if (value === void 0) setInternalValue(id);
|
|
20
|
+
onChange?.(id);
|
|
21
|
+
setOpen(false);
|
|
22
|
+
};
|
|
23
|
+
return /* @__PURE__ */ jsx("div", {
|
|
24
|
+
className: cn("relative inline-block [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0", className),
|
|
25
|
+
"data-slot": "option-picker",
|
|
26
|
+
...props,
|
|
27
|
+
children: /* @__PURE__ */ jsxs(Popover.Root, {
|
|
28
|
+
open,
|
|
29
|
+
onOpenChange: setOpen,
|
|
30
|
+
children: [/* @__PURE__ */ jsxs(Popover.Trigger, {
|
|
31
|
+
render: /* @__PURE__ */ jsx(Button, {
|
|
32
|
+
variant: "outline",
|
|
33
|
+
className: cn(" select-none outline-none rounded-3xl", open && "bg-accent/80", triggerClassName)
|
|
34
|
+
}),
|
|
35
|
+
"data-slot": "option-picker-trigger",
|
|
36
|
+
children: [selectedOption && /* @__PURE__ */ jsxs("span", {
|
|
37
|
+
className: "flex items-center gap-2",
|
|
38
|
+
children: [/* @__PURE__ */ jsx(selectedOption.icon, { className: "size-4.5 sm:size-4 text-muted-foreground/80 dark:text-muted-foreground transition-colors duration-200" }), /* @__PURE__ */ jsx("span", {
|
|
39
|
+
className: "text-sm font-semibold text-foreground/90 dark:text-foreground",
|
|
40
|
+
children: selectedOption.label
|
|
41
|
+
})]
|
|
42
|
+
}, selectedOption.id), /* @__PURE__ */ jsx(ChevronDown, { className: cn("size-4 sm:size-3.5 text-muted-foreground/80 dark:text-muted-foreground transition-transform duration-200", open && "rotate-180") })]
|
|
43
|
+
}), /* @__PURE__ */ jsx(Popover.Portal, { children: /* @__PURE__ */ jsx(Popover.Positioner, {
|
|
44
|
+
side: "top",
|
|
45
|
+
sideOffset: 6,
|
|
46
|
+
align: "center",
|
|
47
|
+
className: "z-50 perspective-distant transform-3d",
|
|
48
|
+
"data-slot": "option-picker-positioner",
|
|
49
|
+
children: /* @__PURE__ */ jsxs(Popover.Popup, {
|
|
50
|
+
className: cn("relative flex min-w-max gap-1 rounded-full border border-border bg-popover p-[calc(--spacing(1)-1px)] whitespace-nowrap origin-bottom transform-3d transition-[opacity,transform,filter] duration-300 cubic-bezier(0.16, 1, 0.3, 1) opacity-100 scale-100 rotate-x-0 -translate-y-1 blur-none starting:opacity-0 starting:scale-105 starting:transform-[rotateX(-70deg)_translateY(10px)] starting:blur-sm shadow-lg/5 before:pointer-events-none before:absolute before:inset-0 before:rounded-full before:shadow-[0_1px_--theme(--color-black/4%)] dark:before:shadow-[0_-1px_--theme(--color-white/6%)]", popupClassName),
|
|
51
|
+
"data-slot": "option-picker-popup",
|
|
52
|
+
children: [displayOptions.map((option) => {
|
|
53
|
+
const isActive = selectedOption.id === option.id;
|
|
54
|
+
return /* @__PURE__ */ jsxs(Button, {
|
|
55
|
+
onClick: () => handleSelect(option.id),
|
|
56
|
+
variant: isActive ? "default" : "ghost",
|
|
57
|
+
size: "xs",
|
|
58
|
+
className: "rounded-full select-none cursor-pointer px-2.5 gap-1.5 h-8",
|
|
59
|
+
title: `Set as ${option.label}`,
|
|
60
|
+
"aria-label": `Select ${option.label}`,
|
|
61
|
+
"data-slot": "option-picker-item",
|
|
62
|
+
children: [/* @__PURE__ */ jsx(option.icon, { className: "size-4 sm:size-3.5" }), /* @__PURE__ */ jsx("span", {
|
|
63
|
+
className: "text-xs font-semibold",
|
|
64
|
+
children: option.label
|
|
65
|
+
})]
|
|
66
|
+
}, option.id);
|
|
67
|
+
}), /* @__PURE__ */ jsx(Popover.Arrow, {
|
|
68
|
+
className: "z-10 flex data-[side=bottom]:top-[-9px] data-[side=bottom]:rotate-0 data-[side=left]:right-[-14px] data-[side=left]:rotate-90 data-[side=right]:left-[-14px] data-[side=right]:-rotate-90 data-[side=top]:bottom-[-9px] data-[side=top]:rotate-180",
|
|
69
|
+
children: /* @__PURE__ */ jsxs("svg", {
|
|
70
|
+
width: "20",
|
|
71
|
+
height: "10",
|
|
72
|
+
viewBox: "0 0 20 10",
|
|
73
|
+
fill: "none",
|
|
74
|
+
children: [/* @__PURE__ */ jsx("path", {
|
|
75
|
+
d: "M9.66437 2.60207L4.80758 6.97318C4.07308 7.63423 3.11989 8 2.13172 8H0V10H20V8H18.5349C17.5468 8 16.5936 7.63423 15.8591 6.97318L11.0023 2.60207C10.622 2.2598 10.0447 2.25979 9.66437 2.60207Z",
|
|
76
|
+
className: "fill-popover"
|
|
77
|
+
}), /* @__PURE__ */ jsx("path", {
|
|
78
|
+
d: "M10.3333 3.34539L5.47654 7.71648C4.55842 8.54279 3.36693 9 2.13172 9H0V8H2.13172C3.11989 8 4.07308 7.63423 4.80758 6.97318L9.66437 2.60207C10.0447 2.25979 10.622 2.2598 11.0023 2.60207L15.8591 6.97318C16.5936 7.63423 17.5468 8 18.5349 8H20V9H18.5349C17.2998 9 16.1083 8.54278 15.1901 7.71648L10.3333 3.34539Z",
|
|
79
|
+
className: "fill-border"
|
|
80
|
+
})]
|
|
81
|
+
})
|
|
82
|
+
})]
|
|
83
|
+
})
|
|
84
|
+
}) })]
|
|
85
|
+
})
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
//#endregion
|
|
89
|
+
export { OptionPicker };
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { VariantProps } from "class-variance-authority";
|
|
2
|
+
import * as React$1 from "react";
|
|
3
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
4
|
+
//#region src/components/orb.d.ts
|
|
5
|
+
export type OrbState = "working" | "searching" | "solving" | "listening" | "composing" | "shaping" | "pulsing" | "vortex" | "atom" | "helix" | "radar" | "galaxy" | "torus" | "quantum" | "network" | "supernova" | "thinking" | "analyzing" | "processing" | "pulse" | "beacon" | "swarm" | "nucleus" | "dna" | "sonar" | "nebula" | "spiral" | "donut" | "ring_torus" | "matrix" | "cube" | "constellation" | "nodes" | "burst" | "spark";
|
|
6
|
+
export type OrbSize = "xs" | "sm" | "md" | "lg" | "xl" | "2xl";
|
|
7
|
+
export type OrbTheme = "auto" | "dark" | "light";
|
|
8
|
+
export declare const orbVariants: (props?: ({
|
|
9
|
+
variant?: "default" | "diamond" | "expressive" | "sharp" | "ring" | "classic" | "cross" | null | undefined;
|
|
10
|
+
intent?: "default" | "destructive" | "info" | "secondary" | "success" | "warning" | "primary" | null | undefined;
|
|
11
|
+
size?: "sm" | "md" | "lg" | "xs" | "xl" | "2xl" | null | undefined;
|
|
12
|
+
glow?: "none" | "subtle" | "intense" | null | undefined;
|
|
13
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
14
|
+
export interface OrbProps extends useRender.ComponentProps<"div">, VariantProps<typeof orbVariants> {
|
|
15
|
+
/** AI status state / animation preset @default "working" */
|
|
16
|
+
state?: OrbState;
|
|
17
|
+
/** Explicit pixel size override @default calculated from CVA size */
|
|
18
|
+
pixelSize?: number;
|
|
19
|
+
/** Theme mode resolution @default "auto" */
|
|
20
|
+
theme?: OrbTheme;
|
|
21
|
+
/** Speed multiplier @default 1 */
|
|
22
|
+
speed?: number;
|
|
23
|
+
/** Pause animation loop @default false */
|
|
24
|
+
paused?: boolean;
|
|
25
|
+
/** Custom ink color override (CSS hex, rgb, or color) */
|
|
26
|
+
color?: string;
|
|
27
|
+
/** Interactive hover speed boost @default false */
|
|
28
|
+
interactive?: boolean;
|
|
29
|
+
/** Accessibility label */
|
|
30
|
+
"aria-label"?: string;
|
|
31
|
+
}
|
|
32
|
+
declare function Orb({ className, variant, intent, size, glow, state, pixelSize, theme, speed, paused, color, interactive, render, "aria-label": ariaLabel, ...props }: OrbProps): React$1.ReactElement;
|
|
33
|
+
export interface OrbLabelProps extends useRender.ComponentProps<"span"> {}
|
|
34
|
+
declare function OrbLabel({ className, render, ...props }: OrbLabelProps): React$1.ReactElement;
|
|
35
|
+
export interface OrbBadgeProps extends useRender.ComponentProps<"div"> {}
|
|
36
|
+
declare function OrbBadge({ className, render, ...props }: OrbBadgeProps): React$1.ReactElement;
|
|
37
|
+
//#endregion
|
|
38
|
+
export { Orb, OrbBadge, OrbLabel };
|