@g4rcez/components 2.0.28 → 2.0.30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. package/dist/components/core/slot.d.ts +16 -0
  2. package/dist/components/core/slot.d.ts.map +1 -0
  3. package/dist/components/core/slot.js +160 -0
  4. package/dist/components/display/notifications.d.ts +4 -4
  5. package/dist/components/display/notifications.d.ts.map +1 -1
  6. package/dist/components/display/notifications.js +36 -33
  7. package/dist/components/display/progress.js +2 -2
  8. package/dist/components/floating/command-palette.d.ts.map +1 -1
  9. package/dist/components/floating/command-palette.js +1 -1
  10. package/dist/components/floating/dropdown.d.ts +2 -2
  11. package/dist/components/floating/dropdown.d.ts.map +1 -1
  12. package/dist/components/floating/dropdown.js +1 -1
  13. package/dist/components/floating/menu.d.ts +2 -2
  14. package/dist/components/floating/menu.js +2 -2
  15. package/dist/components/floating/modal.d.ts +2 -10
  16. package/dist/components/floating/modal.d.ts.map +1 -1
  17. package/dist/components/floating/modal.js +36 -49
  18. package/dist/components/form/autocomplete.d.ts.map +1 -1
  19. package/dist/components/form/autocomplete.js +5 -5
  20. package/dist/components/form/multi-select.d.ts.map +1 -1
  21. package/dist/components/form/multi-select.js +6 -6
  22. package/dist/components/form/slider.d.ts +2 -2
  23. package/dist/components/form/slider.d.ts.map +1 -1
  24. package/dist/components/form/slider.js +5 -3
  25. package/dist/index.css +1 -1
  26. package/dist/index.js.map +1 -1
  27. package/dist/index.mjs +23354 -18804
  28. package/dist/index.mjs.map +1 -1
  29. package/dist/index.umd.js +32 -18
  30. package/dist/index.umd.js.map +1 -1
  31. package/package.json +3 -3
@@ -0,0 +1,16 @@
1
+ import * as React from 'react';
2
+ export type Usable<T> = PromiseLike<T> | React.Context<T>;
3
+ interface SlotProps extends React.HTMLAttributes<HTMLElement> {
4
+ children?: React.ReactNode;
5
+ }
6
+ export declare function createSlot(ownerName: string): React.ForwardRefExoticComponent<SlotProps & React.RefAttributes<HTMLElement>>;
7
+ export declare const Slot: React.ForwardRefExoticComponent<SlotProps & React.RefAttributes<HTMLElement>>;
8
+ interface SlottableProps {
9
+ children: React.ReactNode;
10
+ }
11
+ interface SlottableComponent extends React.FC<SlottableProps> {
12
+ __radixId: symbol;
13
+ }
14
+ export declare function createSlottable(ownerName: string): SlottableComponent;
15
+ export {};
16
+ //# sourceMappingURL=slot.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"slot.d.ts","sourceRoot":"","sources":["../../../src/components/core/slot.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAiD/B,MAAM,MAAM,MAAM,CAAC,CAAC,IAAI,WAAW,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;AAI1D,UAAU,SAAU,SAAQ,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC;IAC3D,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAiBD,wBAAgB,UAAU,CAAC,SAAS,EAAE,MAAM,iFA6C3C;AAED,eAAO,MAAM,IAAI,+EAAqB,CAAC;AAgCvC,UAAU,cAAc;IACtB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,UAAU,kBAAmB,SAAQ,KAAK,CAAC,EAAE,CAAC,cAAc,CAAC;IAC3D,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,wBAAgB,eAAe,CAAC,SAAS,EAAE,MAAM,sBAOhD"}
@@ -0,0 +1,160 @@
1
+ import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import * as React from 'react';
3
+ const REACT_LAZY_TYPE = Symbol.for('react.lazy');
4
+ function setRef(ref, value) {
5
+ if (typeof ref === 'function') {
6
+ return ref(value);
7
+ }
8
+ else if (ref !== null && ref !== undefined) {
9
+ ref.current = value;
10
+ }
11
+ }
12
+ function composeRefs(...refs) {
13
+ return (node) => {
14
+ let hasCleanup = false;
15
+ const cleanups = refs.map((ref) => {
16
+ const cleanup = setRef(ref, node);
17
+ if (!hasCleanup && typeof cleanup == 'function') {
18
+ hasCleanup = true;
19
+ }
20
+ return cleanup;
21
+ });
22
+ if (hasCleanup) {
23
+ return () => {
24
+ for (let i = 0; i < cleanups.length; i++) {
25
+ const cleanup = cleanups[i];
26
+ if (typeof cleanup == 'function') {
27
+ cleanup();
28
+ }
29
+ else {
30
+ setRef(refs[i], null);
31
+ }
32
+ }
33
+ };
34
+ }
35
+ };
36
+ }
37
+ const use = React[' use '.trim().toString()];
38
+ function isPromiseLike(value) {
39
+ return typeof value === 'object' && value !== null && 'then' in value;
40
+ }
41
+ function isLazyComponent(element) {
42
+ return (element != null &&
43
+ typeof element === 'object' &&
44
+ '$$typeof' in element &&
45
+ element.$$typeof === REACT_LAZY_TYPE &&
46
+ '_payload' in element &&
47
+ isPromiseLike(element._payload));
48
+ }
49
+ export function createSlot(ownerName) {
50
+ const SlotClone = createSlotClone(ownerName);
51
+ const Slot = React.forwardRef((props, forwardedRef) => {
52
+ let { children, ...slotProps } = props;
53
+ if (isLazyComponent(children) && typeof use === 'function') {
54
+ children = use(children._payload);
55
+ }
56
+ const childrenArray = React.Children.toArray(children);
57
+ const slottable = childrenArray.find(isSlottable);
58
+ if (slottable) {
59
+ // the new element to render is the one passed as a child of `Slottable`
60
+ const newElement = slottable.props.children;
61
+ const newChildren = childrenArray.map((child) => {
62
+ if (child === slottable) {
63
+ // because the new element will be the one rendered, we are only interested
64
+ // in grabbing its children (`newElement.props.children`)
65
+ if (React.Children.count(newElement) > 1)
66
+ return React.Children.only(null);
67
+ return React.isValidElement(newElement)
68
+ ? newElement.props.children
69
+ : null;
70
+ }
71
+ else {
72
+ return child;
73
+ }
74
+ });
75
+ return (_jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React.isValidElement(newElement)
76
+ ? React.cloneElement(newElement, undefined, newChildren)
77
+ : null }));
78
+ }
79
+ return (_jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: children }));
80
+ });
81
+ Slot.displayName = `${ownerName}.Slot`;
82
+ return Slot;
83
+ }
84
+ export const Slot = createSlot('Slot');
85
+ function createSlotClone(ownerName) {
86
+ const SlotClone = React.forwardRef((props, forwardedRef) => {
87
+ let { children, ...slotProps } = props;
88
+ if (isLazyComponent(children) && typeof use === 'function') {
89
+ children = use(children._payload);
90
+ }
91
+ if (React.isValidElement(children)) {
92
+ const childrenRef = getElementRef(children);
93
+ const props = mergeProps(slotProps, children.props);
94
+ // do not pass ref to React.Fragment for React 19 compatibility
95
+ if (children.type !== React.Fragment) {
96
+ props.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
97
+ }
98
+ return React.cloneElement(children, props);
99
+ }
100
+ return React.Children.count(children) > 1 ? React.Children.only(null) : null;
101
+ });
102
+ SlotClone.displayName = `${ownerName}.SlotClone`;
103
+ return SlotClone;
104
+ }
105
+ const SLOTTABLE_IDENTIFIER = Symbol('radix.slottable');
106
+ export function createSlottable(ownerName) {
107
+ const Slottable = ({ children }) => {
108
+ return _jsx(_Fragment, { children: children });
109
+ };
110
+ Slottable.displayName = `${ownerName}.Slottable`;
111
+ Slottable.__radixId = SLOTTABLE_IDENTIFIER;
112
+ return Slottable;
113
+ }
114
+ const Slottable = createSlottable('Slottable');
115
+ function isSlottable(child) {
116
+ return (React.isValidElement(child) &&
117
+ typeof child.type === 'function' &&
118
+ '__radixId' in child.type &&
119
+ child.type.__radixId === SLOTTABLE_IDENTIFIER);
120
+ }
121
+ function mergeProps(slotProps, childProps) {
122
+ const overrideProps = { ...childProps };
123
+ for (const propName in childProps) {
124
+ const slotPropValue = slotProps[propName];
125
+ const childPropValue = childProps[propName];
126
+ const isHandler = /^on[A-Z]/.test(propName);
127
+ if (isHandler) {
128
+ if (slotPropValue && childPropValue) {
129
+ overrideProps[propName] = (...args) => {
130
+ const result = childPropValue(...args);
131
+ slotPropValue(...args);
132
+ return result;
133
+ };
134
+ }
135
+ else if (slotPropValue) {
136
+ overrideProps[propName] = slotPropValue;
137
+ }
138
+ }
139
+ else if (propName === 'style') {
140
+ overrideProps[propName] = { ...slotPropValue, ...childPropValue };
141
+ }
142
+ else if (propName === 'className') {
143
+ overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(' ');
144
+ }
145
+ }
146
+ return { ...slotProps, ...overrideProps };
147
+ }
148
+ function getElementRef(element) {
149
+ let getter = Object.getOwnPropertyDescriptor(element.props, 'ref')?.get;
150
+ let mayWarn = getter && 'isReactWarning' in getter && getter.isReactWarning;
151
+ if (mayWarn) {
152
+ return element.ref;
153
+ }
154
+ getter = Object.getOwnPropertyDescriptor(element, 'ref')?.get;
155
+ mayWarn = getter && 'isReactWarning' in getter && getter.isReactWarning;
156
+ if (mayWarn) {
157
+ return element.props.ref;
158
+ }
159
+ return element.props.ref || element.ref;
160
+ }
@@ -6,7 +6,7 @@ declare const variants: (props?: ({
6
6
  } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
7
7
  type NotificationOptions = Partial<{
8
8
  title: Label;
9
- duration: number;
9
+ timeout: number;
10
10
  closable: boolean;
11
11
  theme: VariantProps<typeof variants>["theme"];
12
12
  }>;
@@ -14,12 +14,12 @@ type NotificationSubscriber = {
14
14
  close: () => void;
15
15
  clear: () => void;
16
16
  };
17
- type ContextFunction = (text: Label, args?: NotificationOptions) => NotificationSubscriber;
17
+ type ContextFunction = (description: Label, args?: NotificationOptions) => NotificationSubscriber;
18
18
  export declare const useNotification: () => ContextFunction;
19
19
  export type NotificationProps = Partial<{
20
20
  max: number;
21
- duration: number;
21
+ timeout: number;
22
22
  }>;
23
- export declare function Notifications({ children, max, duration }: PropsWithChildren<NotificationProps>): import("react/jsx-runtime").JSX.Element;
23
+ export declare function Notifications({ children, max, timeout }: PropsWithChildren<NotificationProps>): import("react/jsx-runtime").JSX.Element;
24
24
  export {};
25
25
  //# sourceMappingURL=notifications.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"notifications.d.ts","sourceRoot":"","sources":["../../../src/components/display/notifications.tsx"],"names":[],"mappings":"AACA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAIlE,OAAO,EAAgD,KAAK,iBAAiB,EAAwD,MAAM,OAAO,CAAC;AAEnJ,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAEpC,QAAA,MAAM,QAAQ;;mFAgBb,CAAC;AAEF,KAAK,mBAAmB,GAAG,OAAO,CAAC;IAC/B,KAAK,EAAE,KAAK,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,OAAO,CAAC;IAClB,KAAK,EAAE,YAAY,CAAC,OAAO,QAAQ,CAAC,CAAC,OAAO,CAAC,CAAC;CACjD,CAAC,CAAC;AAEH,KAAK,sBAAsB,GAAG;IAAE,KAAK,EAAE,MAAM,IAAI,CAAC;IAAC,KAAK,EAAE,MAAM,IAAI,CAAA;CAAE,CAAC;AAEvE,KAAK,eAAe,GAAG,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,EAAE,mBAAmB,KAAK,sBAAsB,CAAC;AAM3F,eAAO,MAAM,eAAe,uBAAwC,CAAC;AA+DrE,MAAM,MAAM,iBAAiB,GAAG,OAAO,CAAC;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AAE3E,wBAAgB,aAAa,CAAC,EAAE,QAAQ,EAAE,GAAO,EAAE,QAAe,EAAE,EAAE,iBAAiB,CAAC,iBAAiB,CAAC,2CAyDzG"}
1
+ {"version":3,"file":"notifications.d.ts","sourceRoot":"","sources":["../../../src/components/display/notifications.tsx"],"names":[],"mappings":"AACA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAIlE,OAAO,EAAiB,KAAK,iBAAiB,EAAmC,MAAM,OAAO,CAAC;AAE/F,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAEpC,QAAA,MAAM,QAAQ;;mFAgBb,CAAC;AAEF,KAAK,mBAAmB,GAAG,OAAO,CAAC;IACjC,KAAK,EAAE,KAAK,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,OAAO,CAAC;IAClB,KAAK,EAAE,YAAY,CAAC,OAAO,QAAQ,CAAC,CAAC,OAAO,CAAC,CAAC;CAC/C,CAAC,CAAC;AAIH,KAAK,sBAAsB,GAAG;IAAE,KAAK,EAAE,MAAM,IAAI,CAAC;IAAC,KAAK,EAAE,MAAM,IAAI,CAAA;CAAE,CAAC;AAEvE,KAAK,eAAe,GAAG,CAAC,WAAW,EAAE,KAAK,EAAE,IAAI,CAAC,EAAE,mBAAmB,KAAK,sBAAsB,CAAC;AAMlG,eAAO,MAAM,eAAe,uBAAwC,CAAC;AAwDrE,MAAM,MAAM,iBAAiB,GAAG,OAAO,CAAC;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AAqE1E,wBAAgB,aAAa,CAAC,EAAE,QAAQ,EAAE,GAAO,EAAE,OAAc,EAAE,EAAE,iBAAiB,CAAC,iBAAiB,CAAC,2CAMxG"}
@@ -1,11 +1,10 @@
1
1
  "use client";
2
- import { createElement as _createElement } from "react";
3
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
4
3
  import { cva } from "class-variance-authority";
5
4
  import { XIcon } from "lucide-react";
6
5
  import { AnimatePresence, motion } from "motion/react";
7
- import { Toast as RadixToast } from "radix-ui";
8
- import { createContext, forwardRef, useCallback, useContext, useEffect, useRef, useState } from "react";
6
+ import { Toast as Base } from "@base-ui/react/toast";
7
+ import { createContext, useCallback, useContext, useRef } from "react";
9
8
  import { useHover } from "../../hooks/use-hover";
10
9
  const variants = cva("relative isolate z-tooltip flex justify-between overflow-hidden whitespace-nowrap rounded-lg border text-sm shadow-shadow-notification", {
11
10
  variants: {
@@ -31,41 +30,45 @@ const animatedIndex = {
31
30
  2: { opacity: 1, y: [20, 25], scale: [1, 0.96] },
32
31
  default: { opacity: 1, y: [25, 30], scale: [1, 0.95] },
33
32
  };
34
- const Notification = forwardRef(function Toast(props, forwardedRef) {
35
- const closable = props.closable ?? true;
36
- const duration = props.duration;
33
+ function Notification(props) {
34
+ const closable = props.toast.data?.closable ?? true;
37
35
  const variant = props.hover ? "hover" : props.isLast ? "isLast" : "other";
38
- const className = variants({ theme: props.theme || "default" });
39
- return (_jsx(RadixToast.Root, { ref: forwardedRef, asChild: true, forceMount: true, onOpenChange: props.onClose, duration: duration, children: _jsx(motion.li, { layout: true, layoutScroll: true, animate: variant, "data-index": props.index, initial: { y: -100, zIndex: -1 }, className: "text-select pointer-events-auto absolute right-0 top-0 w-80", variants: {
36
+ const className = variants({ theme: props.toast.data?.theme || "default" });
37
+ return (_jsx(Base.Root, { toast: props.toast, swipeDirection: ["down", "right"], children: _jsx(motion.li, { layout: true, layoutScroll: true, animate: variant, "data-index": props.index, initial: { y: -100, zIndex: -1 }, className: "absolute top-0 right-0 w-80 pointer-events-auto text-select", variants: {
40
38
  isLast: { y: 10, scale: 1, animationDuration: "300ms", opacity: 1 },
41
39
  hover: { y: 0, position: "static", scale: 1, opacity: 1 },
42
40
  other: animatedIndex[props.reversedIndex] || animatedIndex.default,
43
- }, transition: { type: "spring", mass: 1.2, damping: 30, stiffness: 200 }, exit: { opacity: [0.9, 0], transition: { opacity: { bounce: 0.25, duration: 0.3 } } }, children: _jsxs("div", { className: className, children: [_jsxs("div", { className: "flex flex-col p-4", children: [props.title ? (_jsx(RadixToast.Title, { className: "select-text truncate text-lg font-medium leading-relaxed", children: props.title })) : null, _jsx(RadixToast.Description, { className: "select-text truncate", children: props.text })] }), closable ? (_jsx(RadixToast.Close, { className: "absolute right-2 top-2 rounded-full p-1 text-foreground transition hover:bg-danger/10 hover:text-danger-hover", children: _jsx(XIcon, { className: "size-5" }) })) : null] }) }) }));
44
- });
45
- export function Notifications({ children, max = 5, duration = 5000 }) {
41
+ }, transition: { type: "spring", mass: 1.2, damping: 30, stiffness: 200 }, exit: { opacity: [0.9, 0], transition: { opacity: { bounce: 0.25, duration: 0.3 } } }, children: _jsxs(Base.Content, { className: className, children: [_jsxs("div", { className: "flex flex-col p-4", children: [props.toast.title ? (_jsx(Base.Title, { className: "text-lg font-medium leading-relaxed select-text truncate" })) : null, _jsx(Base.Description, { className: "select-text truncate" })] }), closable ? (_jsx(Base.Close, { className: "absolute top-2 right-2 p-1 rounded-full transition text-foreground hover:bg-danger/10 hover:text-danger-hover", children: _jsx(XIcon, { className: "size-5" }) })) : null] }) }) }));
42
+ }
43
+ function NotificationsViewport({ max = 5 }) {
46
44
  const ref = useRef(null);
47
45
  const hover = useHover(ref);
48
- const [messages, setMessages] = useState([]);
49
- const clear = useCallback(() => setMessages([]), []);
50
- useEffect(() => {
51
- return clear;
52
- }, [clear]);
53
- const notify = useCallback((text, args) => {
54
- const id = window.crypto.randomUUID();
55
- setMessages((prev) => {
56
- const newItems = [...prev, { ...args, id, text }];
57
- if (newItems.length > max)
58
- return newItems.slice(newItems.length - max, newItems.length + 1);
59
- return newItems;
46
+ const toastManager = Base.useToastManager();
47
+ const toasts = toastManager.toasts.slice(-max);
48
+ return (_jsx(Base.Viewport, { ref: ref, "data-items": toasts.length, style: {
49
+ justifyContent: "start",
50
+ height: `${(hover ? toasts.length : Math.min(1, toasts.length)) * 7}rem`,
51
+ }, className: "fixed right-4 top-10 flex w-80 list-none flex-col-reverse items-end gap-4 overflow-y-clip overflow-x-visible data-[items=true]:pb-8 max-sm:top-20", children: _jsx(motion.ol, { className: "flex flex-col gap-4", children: _jsx(AnimatePresence, { presenceAffectsLayout: true, mode: "popLayout", children: toasts.reverse().map((toast, index, list) => (_jsx(Notification, { toast: toast, hover: hover, index: index, isLast: list.length - 1 === index, reversedIndex: list.length - (index + 1) }, toast.id))) }) }) }));
52
+ }
53
+ function NotificationsInner({ children, max = 5 }) {
54
+ const toastManager = Base.useToastManager();
55
+ const clear = useCallback(() => {
56
+ toastManager.toasts.forEach((t) => toastManager.close(t.id));
57
+ }, [toastManager]);
58
+ const notify = useCallback((description, args) => {
59
+ const id = toastManager.add({
60
+ description,
61
+ title: args?.title,
62
+ timeout: args?.timeout,
63
+ data: { theme: args?.theme, closable: args?.closable },
60
64
  });
61
- const close = () => setMessages((prev) => prev.filter((x) => x.id !== id));
62
- return { clear, close };
63
- }, [max]);
64
- return (_jsxs(RadixToast.Provider, { duration: duration, swipeThreshold: 150, children: [_jsx(NotificationContext.Provider, { value: notify, children: children }), _jsx(motion.ol, { children: _jsx(AnimatePresence, { presenceAffectsLayout: true, mode: "popLayout", children: messages.map((toast, index, list) => {
65
- const close = () => setMessages((prev) => prev.filter((t) => t.id !== toast.id));
66
- return (_createElement(Notification, { ...toast, hover: hover, index: index, key: toast.id, onClose: close, isLast: list.length - 1 === index, reversedIndex: list.length - (index + 1) }));
67
- }) }) }), _jsx(RadixToast.Viewport, { ref: ref, "data-items": messages.length, style: {
68
- justifyContent: "start",
69
- height: `${(hover ? messages.length : Math.min(1, messages.length)) * 7}rem`,
70
- }, className: "fixed right-4 top-10 flex w-80 list-none flex-col-reverse items-end gap-4 overflow-y-clip overflow-x-visible data-[items=true]:pb-8 max-sm:top-20" })] }));
65
+ return {
66
+ close: () => toastManager.close(id),
67
+ clear,
68
+ };
69
+ }, [toastManager, clear]);
70
+ return (_jsxs(NotificationContext.Provider, { value: notify, children: [children, _jsx(Base.Portal, { children: _jsx(NotificationsViewport, { max: max }) })] }));
71
+ }
72
+ export function Notifications({ children, max = 5, timeout = 5000 }) {
73
+ return (_jsx(Base.Provider, { limit: max, timeout: timeout, children: _jsx(NotificationsInner, { max: max, children: children }) }));
71
74
  }
@@ -1,9 +1,9 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Is } from "sidekicker";
3
- import { Progress as RadixProgress } from "radix-ui";
3
+ import { Progress as RadixProgress } from "@base-ui/react/progress";
4
4
  import { css } from "../../lib/dom";
5
5
  export const Progress = (props) => {
6
- return (_jsxs(RadixProgress.Root, { max: props.max, value: props.percent, style: { transform: "translateZ(0)", }, className: css("overflow-hidden relative w-full rounded-full h-6 bg-background", props.container), children: [_jsx(RadixProgress.Indicator, { style: { transform: Is.number(props.percent) ? `translateX(-${100 - props.percent}%)` : undefined }, className: css("bg-primary transition-transform ease-in-out size-full duration-500", props.className) }), Is.number(props.percent)
6
+ return (_jsxs(RadixProgress.Root, { max: props.max, value: props.percent ?? null, style: { transform: "translateZ(0)", }, className: css("overflow-hidden relative w-full rounded-full h-6 bg-background", props.container), children: [_jsx(RadixProgress.Indicator, { style: { transform: Is.number(props.percent) ? `translateX(-${100 - props.percent}%)` : undefined }, className: css("bg-primary transition-transform ease-in-out size-full duration-500", props.className) }), Is.number(props.percent)
7
7
  ? _jsx("p", { className: css("flex absolute inset-0 justify-center items-center w-full font-semibold tabular-nums text-primary-foreground", props.textClassName), children: props.label ? props.label : `${props.percent} %` })
8
8
  : null] }));
9
9
  };
@@ -1 +1 @@
1
- {"version":3,"file":"command-palette.d.ts","sourceRoot":"","sources":["../../../src/components/floating/command-palette.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAc,WAAW,EAAE,MAAM,cAAc,CAAC;AACvD,OAAO,KAAmE,MAAM,OAAO,CAAC;AAQxF,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAKpC,KAAK,SAAS,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAElC,KAAK,WAAW,CAAC,CAAC,SAAS,MAAM,EAAE,CAAC,SAAS,MAAM,IAAI;IACnD,IAAI,EAAE,CAAC,CAAC;IACR,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IACzB,IAAI,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC;IAC1B,OAAO,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE,SAAS,KAAK,OAAO,CAAC,GAAG,OAAO,CAAC;CACvD,GAAG,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,CAAC;KACjE,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC9B,CACJ,CAAC;AAEF,KAAK,gBAAgB,GAAG,WAAW,CAAC,OAAO,EAAE;IAAE,KAAK,EAAE,IAAI,CAAC;IAAC,KAAK,EAAE,gBAAgB,EAAE,CAAA;CAAE,CAAC,CAAC;AAEzF,MAAM,MAAM,gBAAgB,GAAG,gBAAgB,GAAG,mBAAmB,CAAC;AA8CtE,MAAM,MAAM,mBAAmB,GAAG;IAC9B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,YAAY,CAAC,EAAE,KAAK,CAAC;IACrB,MAAM,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC;IAC5B,QAAQ,EAAE,gBAAgB,EAAE,CAAC;IAC7B,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,kBAAkB,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAC5C,OAAO,CAAC,EAAE,KAAK,CAAC,EAAE,CAAC;QAAE,OAAO,EAAE,gBAAgB,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAChE,IAAI,CAAC,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,GAAG;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CAAC,CAAA;KAAE,CAAC,CAAC;CACnF,CAAC;AAsBF,eAAO,MAAM,cAAc,GAAI,OAAO,mBAAmB,4CA6LxD,CAAC"}
@@ -102,7 +102,7 @@ export const CommandPalette = (props) => {
102
102
  return combi.register();
103
103
  }, [bindKey]);
104
104
  const Icon = props.Icon ?? FilterIcon;
105
- return (_jsx(Fragment, { children: _jsxs(Modal, { ref: ref, animated: false, closable: false, open: props.open, overlayClickClose: true, interactions: [listNav], ariaTitle: "Command palette", bodyClassName: "px-0 py-0 pt-2", "data-component": "command-palette", onChange: props.onChangeVisibility, className: "container relative py-0 md:max-w-screen-sm lg:max-w-screen-md", children: [_jsxs("header", { className: "sticky top-0 isolate z-floating flex h-12 w-full items-center border-b border-floating-border bg-floating-background px-4", children: [_jsx("div", { className: "flex size-10 items-center justify-center", children: _jsx(Icon, { Default: FilterIcon, text: value, size: 16 }) }), _jsx("input", { autoFocus: true, value: value, "data-combikeysbypass": "true", placeholder: "Search for...", onChange: (e) => setValue(e.target.value), className: "h-12 w-full items-center bg-transparent px-2 py-2 pb-2 text-left text-lg outline-none", onKeyDown: (e) => {
105
+ return (_jsx(Fragment, { children: _jsxs(Modal, { ref: ref, animated: false, closable: false, open: props.open, overlayClickClose: true, ariaTitle: "Command palette", bodyClassName: "px-0 py-0 pt-2", "data-component": "command-palette", onChange: props.onChangeVisibility, className: "container relative py-0 md:max-w-screen-sm lg:max-w-screen-md", children: [_jsxs("header", { className: "sticky top-0 isolate z-floating flex h-12 w-full items-center border-b border-floating-border bg-floating-background px-4", children: [_jsx("div", { className: "flex size-10 items-center justify-center", children: _jsx(Icon, { Default: FilterIcon, text: value, size: 16 }) }), _jsx("input", { autoFocus: true, value: value, "data-combikeysbypass": "true", placeholder: "Search for...", onChange: (e) => setValue(e.target.value), className: "h-12 w-full items-center bg-transparent px-2 py-2 pb-2 text-left text-lg outline-none", onKeyDown: (e) => {
106
106
  if (e.key === "ArrowDown" || e.key === "ArrowUp") {
107
107
  if (activeIndex !== null) {
108
108
  listRef.current[activeIndex]?.scrollIntoView({
@@ -2,12 +2,12 @@ import React, { PropsWithChildren } from "react";
2
2
  type DropdownProps = {
3
3
  open?: boolean;
4
4
  arrow?: boolean;
5
- restoreFocus?: boolean;
6
5
  returnFocus?: boolean;
6
+ restoreFocus?: boolean;
7
+ buttonProps?: React.HTMLProps<"button">;
7
8
  onChange?: (nextValue: boolean) => void;
8
9
  trigger: React.ReactElement | React.ReactNode;
9
10
  title?: React.ReactNode | React.ReactElement | string;
10
- buttonProps?: React.ComponentProps<"button">;
11
11
  };
12
12
  export declare const Dropdown: (props: PropsWithChildren<DropdownProps>) => import("react/jsx-runtime").JSX.Element;
13
13
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"dropdown.d.ts","sourceRoot":"","sources":["../../../src/components/floating/dropdown.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,EAAY,iBAAiB,EAA+C,MAAM,OAAO,CAAC;AAExG,KAAK,aAAa,GAAG;IACjB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,EAAE,CAAC,SAAS,EAAE,OAAO,KAAK,IAAI,CAAC;IACxC,OAAO,EAAE,KAAK,CAAC,YAAY,GAAG,KAAK,CAAC,SAAS,CAAC;IAC9C,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,KAAK,CAAC,YAAY,GAAG,MAAM,CAAC;IACtD,WAAW,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC;CAChD,CAAC;AAEF,eAAO,MAAM,QAAQ,GAAI,OAAO,iBAAiB,CAAC,aAAa,CAAC,4CAqE/D,CAAC"}
1
+ {"version":3,"file":"dropdown.d.ts","sourceRoot":"","sources":["../../../src/components/floating/dropdown.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,EAAY,iBAAiB,EAA+C,MAAM,OAAO,CAAC;AAExG,KAAK,aAAa,GAAG;IACnB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;IACxC,QAAQ,CAAC,EAAE,CAAC,SAAS,EAAE,OAAO,KAAK,IAAI,CAAC;IACxC,OAAO,EAAE,KAAK,CAAC,YAAY,GAAG,KAAK,CAAC,SAAS,CAAC;IAC9C,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,KAAK,CAAC,YAAY,GAAG,MAAM,CAAC;CACvD,CAAC;AAEF,eAAO,MAAM,QAAQ,GAAI,OAAO,iBAAiB,CAAC,aAAa,CAAC,4CAqE/D,CAAC"}
@@ -35,5 +35,5 @@ export const Dropdown = (props) => {
35
35
  const dismiss = useDismiss(context);
36
36
  const role = useRole(context, { role: "tooltip" });
37
37
  const { getReferenceProps, getFloatingProps } = useInteractions([click, dismiss, role]);
38
- return (_jsxs(Fragment, { children: [_jsx("button", { ref: refs.setReference, ...getReferenceProps(props.buttonProps), type: "button", children: props.trigger }), open && (_jsx(FloatingPortal, { preserveTabOrder: true, id: `${headingId}-portal`, children: _jsx(FloatingFocusManager, { guards: true, restoreFocus: true, returnFocus: true, visuallyHiddenDismiss: true, context: context, modal: false, children: _jsxs("div", { className: "relative isolate z-floating min-w-96 rounded-lg border border-floating-border bg-floating-background p-4 shadow-shadow-floating", ref: refs.setFloating, style: floatingStyles, "aria-labelledby": headingId, ...getFloatingProps(), children: [_jsx(FloatingArrow, { ref: arrowRef, context: context, strokeWidth: 0.1, className: "fill-floating-background stroke-floating-border" }), _jsx("header", { className: "mb-2", children: _jsx("h3", { className: "text-left text-2xl font-medium leading-snug tracking-wide", children: props.title }) }), props.children] }) }) }))] }));
38
+ return (_jsxs(Fragment, { children: [_jsx("button", { ref: refs.setReference, ...getReferenceProps(props.buttonProps), type: "button", children: props.trigger }), open && (_jsx(FloatingPortal, { preserveTabOrder: true, id: `${headingId}-portal`, children: _jsx(FloatingFocusManager, { guards: true, restoreFocus: true, returnFocus: true, visuallyHiddenDismiss: true, context: context, modal: false, children: _jsxs("div", { className: "relative p-4 rounded-lg border isolate z-floating min-w-96 border-floating-border bg-floating-background shadow-shadow-floating", ref: refs.setFloating, "aria-labelledby": headingId, style: floatingStyles, ...getFloatingProps(), children: [_jsx(FloatingArrow, { ref: arrowRef, context: context, strokeWidth: 0.1, className: "fill-floating-background stroke-floating-border" }), _jsx("header", { className: "mb-2", children: _jsx("h3", { className: "text-2xl font-medium tracking-wide leading-snug text-left", children: props.title }) }), props.children] }) }) }))] }));
39
39
  };
@@ -22,7 +22,7 @@ type MenuItemProps = {
22
22
  Right?: React.FC<LucideProps>;
23
23
  };
24
24
  export declare const MenuItem: React.ForwardRefExoticComponent<Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, keyof MenuItemProps> & MenuItemProps & React.RefAttributes<HTMLButtonElement>>;
25
- export declare const Menu: React.ForwardRefExoticComponent<(Omit<Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "label" | "children" | "hover" | "open" | "asChild" | "restoreFocus" | "nested" | "isParent" | "floatingClassName" | "FloatingComponent"> & Partial<{
25
+ export declare const Menu: React.ForwardRefExoticComponent<(Omit<Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "label" | "children" | "hover" | "open" | "restoreFocus" | "nested" | "asChild" | "isParent" | "floatingClassName" | "FloatingComponent"> & Partial<{
26
26
  hover: boolean;
27
27
  open?: boolean;
28
28
  nested: boolean;
@@ -34,7 +34,7 @@ export declare const Menu: React.ForwardRefExoticComponent<(Omit<Omit<React.Deta
34
34
  FloatingComponent: React.ElementType;
35
35
  } & {
36
36
  label: string;
37
- }>, "ref"> | Omit<Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "label" | "children" | "hover" | "open" | "asChild" | "restoreFocus" | "nested" | "isParent" | "floatingClassName" | "FloatingComponent"> & Partial<{
37
+ }>, "ref"> | Omit<Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "label" | "children" | "hover" | "open" | "restoreFocus" | "nested" | "asChild" | "isParent" | "floatingClassName" | "FloatingComponent"> & Partial<{
38
38
  hover: boolean;
39
39
  open?: boolean;
40
40
  nested: boolean;
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { autoUpdate, flip, FloatingFocusManager, FloatingList, FloatingNode, FloatingPortal, FloatingTree, offset, safePolygon, shift, useClick, useDismiss, useFloating, useFloatingNodeId, useFloatingParentNodeId, useFloatingTree, useHover, useInteractions, useListItem, useListNavigation, useRole, useTypeahead, } from "@floating-ui/react";
4
- import { Slot } from "radix-ui";
4
+ import { Slot } from "../core/slot";
5
5
  import { ChevronRightIcon } from "lucide-react";
6
6
  import React, { createContext, Fragment, useContext, useEffect, useRef, useState } from "react";
7
7
  import { FLOATING_DELAY, TYPEAHEAD_RESET_DELAY } from "../../constants";
@@ -84,7 +84,7 @@ const MenuComponent = React.forwardRef(({ children, FloatingComponent = "div", h
84
84
  tree.events.emit("menuopen", { parentId, nodeId });
85
85
  }, [tree, isOpen, nodeId, parentId]);
86
86
  const className = isParent ? props.className : css(menuItemClassName(props.className));
87
- return (_jsxs(FloatingNode, { id: nodeId, children: [_jsx(Fragment, { children: props.asChild ? (_jsx(Slot.Root, { ...getReferenceProps(parent.getItemProps({
87
+ return (_jsxs(FloatingNode, { id: nodeId, children: [_jsx(Fragment, { children: props.asChild ? (_jsx(Slot, { ...getReferenceProps(parent.getItemProps({
88
88
  ...props,
89
89
  onFocus(event) {
90
90
  props.onFocus?.(event);
@@ -1,4 +1,3 @@
1
- import { type ElementProps } from "@floating-ui/react";
2
1
  import { HTMLMotionProps } from "motion/react";
3
2
  import React from "react";
4
3
  import { Label, Override } from "../../types";
@@ -27,15 +26,12 @@ export type ModalProps = Override<HTMLMotionProps<"div">, ({
27
26
  overlayClassName: string;
28
27
  position: DrawerPosition;
29
28
  overlayClickClose: boolean;
30
- role: "dialog" | "listbox";
31
- interactions: ElementProps[];
32
29
  trigger: Label | React.FC<any>;
33
30
  }>>;
34
31
  type ModalRef = {
35
- context: any;
36
32
  floating: HTMLElement | null;
37
33
  };
38
- export declare const Modal: React.ForwardRefExoticComponent<(Omit<Omit<HTMLMotionProps<"div">, "footer" | "title" | "className" | "role" | "onChange" | "position" | "open" | "resizer" | "type" | "asChild" | "layoutId" | "trigger" | "animated" | "closable" | "forceType" | "bodyClassName" | "overlayClassName" | "overlayClickClose" | "interactions" | "ariaTitle"> & {
34
+ export declare const Modal: React.ForwardRefExoticComponent<(Omit<Omit<HTMLMotionProps<"div">, "footer" | "title" | "className" | "onChange" | "position" | "open" | "resizer" | "type" | "layoutId" | "trigger" | "asChild" | "animated" | "closable" | "forceType" | "bodyClassName" | "overlayClassName" | "overlayClickClose" | "ariaTitle"> & {
39
35
  title: Label;
40
36
  ariaTitle?: string;
41
37
  } & {
@@ -55,12 +51,10 @@ export declare const Modal: React.ForwardRefExoticComponent<(Omit<Omit<HTMLMotio
55
51
  overlayClassName: string;
56
52
  position: DrawerPosition;
57
53
  overlayClickClose: boolean;
58
- role: "dialog" | "listbox";
59
- interactions: ElementProps[];
60
54
  trigger: Label | React.FC<any>;
61
55
  }> & {
62
56
  children?: React.ReactNode | undefined;
63
- }, "ref"> | Omit<Omit<HTMLMotionProps<"div">, "footer" | "title" | "className" | "role" | "onChange" | "position" | "open" | "resizer" | "type" | "asChild" | "layoutId" | "trigger" | "animated" | "closable" | "forceType" | "bodyClassName" | "overlayClassName" | "overlayClickClose" | "interactions" | "ariaTitle"> & {
57
+ }, "ref"> | Omit<Omit<HTMLMotionProps<"div">, "footer" | "title" | "className" | "onChange" | "position" | "open" | "resizer" | "type" | "layoutId" | "trigger" | "asChild" | "animated" | "closable" | "forceType" | "bodyClassName" | "overlayClassName" | "overlayClickClose" | "ariaTitle"> & {
64
58
  ariaTitle: string;
65
59
  title?: Label;
66
60
  } & {
@@ -80,8 +74,6 @@ export declare const Modal: React.ForwardRefExoticComponent<(Omit<Omit<HTMLMotio
80
74
  overlayClassName: string;
81
75
  position: DrawerPosition;
82
76
  overlayClickClose: boolean;
83
- role: "dialog" | "listbox";
84
- interactions: ElementProps[];
85
77
  trigger: Label | React.FC<any>;
86
78
  }> & {
87
79
  children?: React.ReactNode | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"modal.d.ts","sourceRoot":"","sources":["../../../src/components/floating/modal.tsx"],"names":[],"mappings":"AACA,OAAO,EASL,KAAK,YAAY,EAClB,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EAAmB,eAAe,EAAmF,MAAM,cAAc,CAAC;AAEjJ,OAAO,KAA+G,MAAM,OAAO,CAAC;AAGpI,OAAO,EAAE,KAAK,EAAO,QAAQ,EAAE,MAAM,aAAa,CAAC;AAMnD,MAAM,MAAM,SAAS,GAAG,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAC;AAEtD,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,OAAO,CAAC;AAuD9C,MAAM,MAAM,UAAU,GAAG,QAAQ,CAC/B,eAAe,CAAC,KAAK,CAAC,EACtB,CAAC;IAAE,KAAK,EAAE,KAAK,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,KAAK,CAAA;CAAE,CAAC,GAAG;IAC9E,IAAI,EAAE,OAAO,CAAC;IACd,QAAQ,EAAE,CAAC,SAAS,EAAE,OAAO,KAAK,IAAI,CAAC;CACxC,GAAG,OAAO,CAAC;IACV,MAAM,EAAE,KAAK,CAAC;IACd,IAAI,EAAE,SAAS,CAAC;IAChB,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;IAClB,SAAS,EAAE,OAAO,CAAC;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