@dimasbaguspm/versaur 0.0.45 → 0.0.46

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 (39) hide show
  1. package/dist/js/forms/index.js +18 -20
  2. package/dist/js/image-rectangle-B4nXH4Q5.js +2581 -0
  3. package/dist/js/index.js +72 -77
  4. package/dist/js/layouts/index.js +1 -1
  5. package/dist/js/navigation/index.js +1 -1
  6. package/dist/js/overlays/index.js +5 -6
  7. package/dist/js/primitive/index.js +28 -30
  8. package/dist/js/{tabs-D5aWU0pC.js → tabs-BAzThVka.js} +1 -1
  9. package/dist/js/{bottom-sheet-input-CxLwoZLr.js → time-picker-input-DrZ4dyEB.js} +875 -800
  10. package/dist/js/tooltip-D6fUigp2.js +691 -0
  11. package/dist/js/{top-bar-vvLnMBwo.js → top-bar-Dx0JVXms.js} +1 -1
  12. package/dist/types/forms/index.d.ts +7 -9
  13. package/dist/types/forms/pin-field/index.d.ts +2 -0
  14. package/dist/types/forms/pin-field/pin-field.d.ts +9 -0
  15. package/dist/types/forms/pin-field/types.d.ts +86 -0
  16. package/dist/types/primitive/index.d.ts +0 -2
  17. package/dist/utils/enforce-subpath-import.js +1 -5
  18. package/package.json +1 -1
  19. package/dist/js/bottom-sheet-QdQ5L8Wo.js +0 -615
  20. package/dist/js/image-rectangle-BijhERaV.js +0 -2884
  21. package/dist/js/tooltip-D80OXyWL.js +0 -81
  22. package/dist/types/forms/bottom-sheet-input/bottom-sheet-input.d.ts +0 -7
  23. package/dist/types/forms/bottom-sheet-input/index.d.ts +0 -2
  24. package/dist/types/forms/bottom-sheet-input/types.d.ts +0 -17
  25. package/dist/types/forms/drawer-input/drawer-input.d.ts +0 -6
  26. package/dist/types/forms/drawer-input/index.d.ts +0 -2
  27. package/dist/types/forms/drawer-input/types.d.ts +0 -18
  28. package/dist/types/forms/modal-input/index.d.ts +0 -2
  29. package/dist/types/forms/modal-input/modal-input.d.ts +0 -6
  30. package/dist/types/forms/modal-input/types.d.ts +0 -18
  31. package/dist/types/primitive/button-float/button-float.d.ts +0 -8
  32. package/dist/types/primitive/button-float/index.d.ts +0 -2
  33. package/dist/types/primitive/button-float/types.d.ts +0 -31
  34. package/dist/types/primitive/button-float/use-floating-position.d.ts +0 -12
  35. package/dist/types/primitive/calculator/calculator.atoms.d.ts +0 -2
  36. package/dist/types/primitive/calculator/calculator.d.ts +0 -2
  37. package/dist/types/primitive/calculator/index.d.ts +0 -2
  38. package/dist/types/primitive/calculator/types.d.ts +0 -29
  39. package/dist/types/primitive/calculator/use-calculator.d.ts +0 -11
@@ -1,81 +0,0 @@
1
- import { c as v, j as c, a as w } from "./index-DOdDlCoL.js";
2
- import { useRef as m, useState as d, useEffect as h, useId as T, cloneElement as j } from "react";
3
- import { o as y } from "./image-rectangle-BijhERaV.js";
4
- function P(e = "auto") {
5
- const n = m(null), [a, t] = d("bottom");
6
- return h(() => {
7
- if (!open || e !== "auto" || !n.current) {
8
- t(e === "auto" ? "bottom" : e);
9
- return;
10
- }
11
- const o = n.current.getBoundingClientRect(), l = window.innerWidth, r = window.innerHeight, i = {
12
- top: o.top,
13
- bottom: r - o.bottom,
14
- left: o.left,
15
- right: l - o.right
16
- };
17
- i.bottom > 64 ? t("bottom") : i.top > 64 ? t("top") : i.right > 128 ? t("right") : t("left");
18
- }, [e, n]), { position: a, ref: n };
19
- }
20
- const E = v(
21
- "absolute z-50 px-2 py-1 rounded bg-neutral pointer-events-auto transition-opacity duration-150 min-w-[max-content] max-w-sm whitespace-pre-line",
22
- {
23
- variants: {
24
- position: {
25
- top: "bottom-full left-1/2 -translate-x-1/2 mb-2",
26
- bottom: "top-full left-1/2 -translate-x-1/2 mt-2",
27
- left: "right-full top-1/2 -translate-y-1/2 mr-2",
28
- right: "left-full top-1/2 -translate-y-1/2 ml-2",
29
- auto: "top-full left-1/2 -translate-x-1/2 mt-2"
30
- }
31
- },
32
- defaultVariants: {
33
- position: "auto"
34
- }
35
- }
36
- ), O = ({
37
- children: e,
38
- content: n,
39
- position: a = "auto",
40
- popoverClassName: t,
41
- delay: o,
42
- ...l
43
- }) => {
44
- const r = T(), [i, u] = d(!1), s = m(null), p = () => {
45
- o ? s.current = setTimeout(() => u(!0), o) : u(!0);
46
- }, f = () => {
47
- s.current && clearTimeout(s.current), u(!1);
48
- };
49
- h(() => () => {
50
- s.current && clearTimeout(s.current);
51
- }, []);
52
- const b = {
53
- tabIndex: 0,
54
- "aria-describedby": r,
55
- onMouseEnter: p,
56
- onFocus: p,
57
- onMouseLeave: f,
58
- onBlur: f,
59
- ...l
60
- }, { ref: x, position: g } = P(a);
61
- return /* @__PURE__ */ c.jsxs("div", { className: "relative w-fit", ref: x, children: [
62
- j(e, b),
63
- /* @__PURE__ */ c.jsx(
64
- "div",
65
- {
66
- id: r,
67
- className: w(
68
- E({ position: g }),
69
- t,
70
- !i && "opacity-0 pointer-events-none"
71
- ),
72
- role: "tooltip",
73
- "aria-hidden": !i,
74
- children: /* @__PURE__ */ c.jsx(y, { as: "p", fontSize: "xs", fontWeight: "normal", color: "black", children: n })
75
- }
76
- )
77
- ] });
78
- };
79
- export {
80
- O as T
81
- };
@@ -1,7 +0,0 @@
1
- import { BottomSheetInputProps } from './types';
2
- export declare const BottomSheetInput: import('react').ForwardRefExoticComponent<BottomSheetInputProps & import('react').RefAttributes<HTMLInputElement>> & {
3
- Header: import('react').ForwardRefExoticComponent<import('../..').BottomSheetHeaderProps & import('react').RefAttributes<HTMLDivElement>>;
4
- Body: import('react').ForwardRefExoticComponent<import('../..').BottomSheetBodyProps & import('react').RefAttributes<HTMLDivElement>>;
5
- Footer: import('react').ForwardRefExoticComponent<import('../..').BottomSheetFooterProps & import('react').RefAttributes<HTMLDivElement>>;
6
- Title: import('react').ForwardRefExoticComponent<import('../..').HeadingProps & import('react').RefAttributes<HTMLHeadingElement>>;
7
- };
@@ -1,2 +0,0 @@
1
- export { BottomSheetInput } from './bottom-sheet-input';
2
- export type * from './types';
@@ -1,17 +0,0 @@
1
- import { TextInputProps } from '../text-input/types';
2
- import { ChangeEventHandler, InputHTMLAttributes, ReactNode } from 'react';
3
- export interface BottomSheetInputContextValue {
4
- isOpen: boolean;
5
- setIsOpen: (open: boolean) => void;
6
- onChange?: ChangeEventHandler<HTMLInputElement>;
7
- value: InputHTMLAttributes<HTMLInputElement>['value'];
8
- }
9
- /**
10
- * BottomSheetInputProps extends TextInputProps, but input is always readOnly
11
- * @property {boolean} open - BottomSheet open state (controlled)
12
- * @property {(open: boolean) => void} onOpenChange - Callback for sheet open state change
13
- * @property {React.ReactNode} children - BottomSheet content
14
- */
15
- export interface BottomSheetInputProps extends Omit<TextInputProps, 'readOnly' | 'children'> {
16
- children: (ctx: BottomSheetInputContextValue) => ReactNode;
17
- }
@@ -1,6 +0,0 @@
1
- import { DrawerInputProps } from './types';
2
- export declare const DrawerInput: import('react').ForwardRefExoticComponent<DrawerInputProps & import('react').RefAttributes<HTMLInputElement>> & {
3
- Header: import('react').ForwardRefExoticComponent<import('../..').DrawerHeaderProps & import('react').RefAttributes<HTMLDivElement>>;
4
- Body: import('react').ForwardRefExoticComponent<import('../..').DrawerBodyProps & import('react').RefAttributes<HTMLDivElement>>;
5
- Footer: import('react').ForwardRefExoticComponent<import('../..').DrawerFooterProps & import('react').RefAttributes<HTMLDivElement>>;
6
- };
@@ -1,2 +0,0 @@
1
- export { DrawerInput } from './drawer-input';
2
- export type * from './types';
@@ -1,18 +0,0 @@
1
- import { DrawerProps } from '../../overlays/drawer/types';
2
- import { TextInputProps } from '../text-input/types';
3
- import { ChangeEventHandler, InputHTMLAttributes, ReactNode } from 'react';
4
- export interface DrawerInputContextValue {
5
- isOpen: boolean;
6
- setIsOpen: (open: boolean) => void;
7
- onChange?: ChangeEventHandler<HTMLInputElement>;
8
- value: InputHTMLAttributes<HTMLInputElement>['value'];
9
- }
10
- /**
11
- * DrawerInputProps extends TextInputProps, but input is always readOnly
12
- * @property {boolean} open - Drawer open state (controlled)
13
- * @property {(open: boolean) => void} onOpenChange - Callback for drawer open state change
14
- * @property {React.ReactNode} children - Drawer content
15
- */
16
- export interface DrawerInputProps extends Omit<TextInputProps, 'readOnly' | 'children'>, Pick<DrawerProps, 'size' | 'position' | 'disableEscapeKeyDown' | 'disableOverlayClickToClose'> {
17
- children: (ctx: DrawerInputContextValue) => ReactNode;
18
- }
@@ -1,2 +0,0 @@
1
- export { ModalInput } from './modal-input';
2
- export type * from './types';
@@ -1,6 +0,0 @@
1
- import { ModalInputProps } from './types';
2
- export declare const ModalInput: import('react').ForwardRefExoticComponent<ModalInputProps & import('react').RefAttributes<HTMLInputElement>> & {
3
- Header: import('react').ForwardRefExoticComponent<import('../..').ModalHeaderProps & import('react').RefAttributes<HTMLDivElement>>;
4
- Body: import('react').ForwardRefExoticComponent<import('../..').ModalBodyProps & import('react').RefAttributes<HTMLDivElement>>;
5
- Footer: import('react').ForwardRefExoticComponent<import('../..').ModalFooterProps & import('react').RefAttributes<HTMLDivElement>>;
6
- };
@@ -1,18 +0,0 @@
1
- import { ModalRootProps } from '../../overlays';
2
- import { TextInputProps } from '../text-input/types';
3
- import { ChangeEventHandler, InputHTMLAttributes, ReactNode } from 'react';
4
- export interface ModalInputContextValue {
5
- isOpen: boolean;
6
- setIsOpen: (open: boolean) => void;
7
- onChange?: ChangeEventHandler<HTMLInputElement>;
8
- value: InputHTMLAttributes<HTMLInputElement>['value'];
9
- }
10
- /**
11
- * ModalInputProps extends TextInputProps, but input is always readOnly
12
- * @property {boolean} open - Modal open state (controlled)
13
- * @property {(open: boolean) => void} onOpenChange - Callback for modal open state change
14
- * @property {React.ReactNode} children - Modal content
15
- */
16
- export interface ModalInputProps extends Omit<TextInputProps, 'readOnly' | 'children'>, Pick<ModalRootProps, 'size' | 'placement'> {
17
- children: (ctx: ModalInputContextValue) => ReactNode;
18
- }
@@ -1,8 +0,0 @@
1
- import { ButtonFloatProps } from './types';
2
- /**
3
- * ButtonFloat is a floating action button that stays fixed to the bottom right or left of the viewport.
4
- * It supports all Button variants, sizes, and accessibility features.
5
- *
6
- * @see ButtonFloatProps for prop details
7
- */
8
- export declare const ButtonFloat: import('react').ForwardRefExoticComponent<ButtonFloatProps & import('react').RefAttributes<HTMLButtonElement>>;
@@ -1,2 +0,0 @@
1
- export { ButtonFloat } from './button-float';
2
- export type * from './types';
@@ -1,31 +0,0 @@
1
- import { ButtonHTMLAttributes } from 'react';
2
- /**
3
- * ButtonFloatProps defines the props for the ButtonFloat component
4
- * @property side - Which side of the viewport to float the button ('right' | 'left')
5
- * @property offset - Optional offset from the edge (e.g., '1rem', '24px', defaults to '1rem')
6
- * @property All ButtonProps from the regular Button component
7
- */
8
- export interface ButtonFloatProps extends ButtonHTMLAttributes<HTMLButtonElement> {
9
- /**
10
- * Which side of the viewport to float the button
11
- * @default 'right'
12
- */
13
- side?: 'right' | 'left';
14
- /**
15
- * Offset from the edge of the viewport (e.g., '1rem', '24px')
16
- * @default '1rem'
17
- */
18
- offset?: string;
19
- /**
20
- * Visual style variant (same as Button)
21
- */
22
- variant?: 'primary' | 'primary-outline' | 'primary-ghost' | 'secondary' | 'secondary-outline' | 'secondary-ghost' | 'tertiary' | 'tertiary-outline' | 'tertiary-ghost' | 'ghost' | 'ghost-outline' | 'neutral' | 'neutral-outline' | 'neutral-ghost' | 'success' | 'success-outline' | 'success-ghost' | 'info' | 'info-outline' | 'info-ghost' | 'warning' | 'warning-outline' | 'warning-ghost' | 'danger' | 'danger-outline' | 'danger-ghost' | 'outline' | 'destructive';
23
- /**
24
- * Size of the button (same as Button)
25
- */
26
- size?: 'sm' | 'md' | 'lg';
27
- /**
28
- * Whether the button is disabled
29
- */
30
- disabled?: boolean;
31
- }
@@ -1,12 +0,0 @@
1
- import { RefCallback, CSSProperties } from 'react';
2
- /**
3
- * useFloatingPositionSticky
4
- * Determines the correct positioning and style for a floating element that should always be visible
5
- * at the bottom right of a scrollable container, even if the container is taller than the viewport.
6
- *
7
- * Returns:
8
- * - containerRef: attach to the container div
9
- * - style: CSSProperties for the button (position, bottom, right, transform)
10
- * - positionClass: string for Tailwind/utility classes
11
- */
12
- export declare function useFloatingPosition(side: 'right' | 'left', offset?: string): [RefCallback<HTMLDivElement>, CSSProperties, string];
@@ -1,2 +0,0 @@
1
- import { CalculatorButtonProps } from './types';
2
- export declare const CalculatorButton: import('react').ForwardRefExoticComponent<CalculatorButtonProps & import('react').RefAttributes<HTMLButtonElement>>;
@@ -1,2 +0,0 @@
1
- import { CalculatorProps } from './types';
2
- export declare const Calculator: import('react').ForwardRefExoticComponent<CalculatorProps & import('react').RefAttributes<HTMLDivElement>>;
@@ -1,2 +0,0 @@
1
- export { Calculator } from './calculator';
2
- export type * from './types';
@@ -1,29 +0,0 @@
1
- import { ButtonHTMLAttributes } from 'react';
2
- /**
3
- * Props for Calculator component
4
- */
5
- export interface CalculatorProps {
6
- /**
7
- * Initial value to display in the calculator input
8
- */
9
- initialValue?: string | number;
10
- /**
11
- * Callback when the value changes (on equals or input)
12
- */
13
- onChange?: (value: string) => void;
14
- /**
15
- * If true, disables all calculator input
16
- */
17
- disabled?: boolean;
18
- /**
19
- * Optional className for the calculator root
20
- */
21
- className?: string;
22
- /**
23
- * Optional aria-label for accessibility
24
- */
25
- 'aria-label'?: string;
26
- }
27
- export interface CalculatorButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
28
- variant?: 'default' | 'action' | 'operator' | 'danger';
29
- }
@@ -1,11 +0,0 @@
1
- export interface UseCalculatorOptions {
2
- initialValue?: string | number;
3
- disabled?: boolean;
4
- onChange?: (value: string) => void;
5
- }
6
- export declare function useCalculator({ initialValue, disabled, onChange, }: UseCalculatorOptions): {
7
- input: string;
8
- inputRef: import('react').RefObject<HTMLInputElement | null>;
9
- handleButton: (val: string) => void;
10
- handleInput: (e: React.ChangeEvent<HTMLInputElement>) => void;
11
- };