@dimasbaguspm/versaur 0.0.17 → 0.0.19

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 (62) hide show
  1. package/dist/{js → assets}/styles.css +37 -0
  2. package/dist/js/{bottom-sheet-CHRSxXRE.js → bottom-sheet-BRv-oJL-.js} +285 -140
  3. package/dist/js/feedbacks/index.js +1 -1
  4. package/dist/js/{form-layout-Dhlv-FZL.js → form-layout-4ASWdXn8.js} +1 -1
  5. package/dist/js/forms/index.js +15 -16
  6. package/dist/js/{tile-B9bt2AY6.js → image-rectangle-CLU-GVtw.js} +855 -658
  7. package/dist/js/{index-C1uJQB34.js → index-DOdDlCoL.js} +2 -2
  8. package/dist/js/index.js +54 -47
  9. package/dist/js/layouts/index.js +1 -1
  10. package/dist/js/navigation/index.js +1 -1
  11. package/dist/js/overlays/index.js +4 -5
  12. package/dist/js/primitive/index.js +22 -16
  13. package/dist/js/providers/index.js +5 -0
  14. package/dist/js/selectable-multiple-input-CJXfqy1Z.js +1901 -0
  15. package/dist/js/{skeleton-QEyPZAuF.js → skeleton-BNZyaRjo.js} +1 -1
  16. package/dist/js/snackbar-DH8jCh2V.js +50 -0
  17. package/dist/js/{tabs-DYcTvVao.js → tabs-BbOkYchB.js} +1 -1
  18. package/dist/js/use-snackbars-oPoF7J5t.js +94 -0
  19. package/dist/types/feedbacks/loading-indicator/index.d.ts +2 -1
  20. package/dist/types/forms/chip-single-input/index.d.ts +2 -1
  21. package/dist/types/forms/index.d.ts +2 -1
  22. package/dist/types/forms/price-input/index.d.ts +1 -1
  23. package/dist/types/forms/selectable-multiple-input/index.d.ts +2 -0
  24. package/dist/types/forms/selectable-multiple-input/selectable-multiple-input.d.ts +6 -0
  25. package/dist/types/forms/selectable-multiple-input/types.d.ts +18 -0
  26. package/dist/types/forms/selectable-single-input/index.d.ts +2 -0
  27. package/dist/types/forms/selectable-single-input/selectable-single-input.d.ts +6 -0
  28. package/dist/types/forms/selectable-single-input/types.d.ts +18 -0
  29. package/dist/types/forms/switch-input/index.d.ts +2 -3
  30. package/dist/types/forms/time-picker-input/time-picker-input.d.ts +4 -4
  31. package/dist/types/forms/time-picker-input/types.d.ts +2 -38
  32. package/dist/types/index.d.ts +1 -0
  33. package/dist/types/layouts/page-layout/index.d.ts +2 -1
  34. package/dist/types/overlays/menu/index.d.ts +2 -2
  35. package/dist/types/primitive/description-list/description-list.atoms.d.ts +13 -0
  36. package/dist/types/primitive/description-list/description-list.d.ts +6 -0
  37. package/dist/types/primitive/description-list/index.d.ts +2 -0
  38. package/dist/types/primitive/description-list/types.d.ts +46 -0
  39. package/dist/types/primitive/image/base-image.atoms.d.ts +6 -0
  40. package/dist/types/primitive/image/base-image.d.ts +6 -0
  41. package/dist/types/primitive/image/image-circle.d.ts +6 -0
  42. package/dist/types/primitive/image/image-rectangle.d.ts +6 -0
  43. package/dist/types/primitive/image/image-square.d.ts +6 -0
  44. package/dist/types/primitive/image/index.d.ts +5 -0
  45. package/dist/types/primitive/image/types.d.ts +48 -0
  46. package/dist/types/primitive/image/use-image.d.ts +13 -0
  47. package/dist/types/primitive/index.d.ts +2 -0
  48. package/dist/types/providers/index.d.ts +1 -0
  49. package/dist/types/providers/snackbars-provider/index.d.ts +3 -0
  50. package/dist/types/providers/snackbars-provider/provider.d.ts +7 -0
  51. package/dist/types/providers/snackbars-provider/types.d.ts +28 -0
  52. package/dist/types/providers/snackbars-provider/use-snackbars-queue.d.ts +9 -0
  53. package/dist/types/providers/snackbars-provider/use-snackbars.d.ts +4 -0
  54. package/dist/{js → utils}/enforce-subpath-import.js +67 -54
  55. package/package.json +8 -4
  56. package/dist/js/email-input-CVyrFzqL.js +0 -1820
  57. package/dist/js/modal-FqewbVts.js +0 -150
  58. package/dist/types/forms/calculator-input/calculator-input.atoms.d.ts +0 -11
  59. package/dist/types/forms/calculator-input/calculator-input.d.ts +0 -8
  60. package/dist/types/forms/calculator-input/index.d.ts +0 -1
  61. package/dist/types/forms/calculator-input/types.d.ts +0 -51
  62. package/dist/types/forms/time-picker-input/time-picker-input.atoms.d.ts +0 -15
@@ -1,150 +0,0 @@
1
- import { j as o, c as d, a as p } from "./index-C1uJQB34.js";
2
- import { forwardRef as s, useEffect as u, useRef as x, useState as y } from "react";
3
- const E = s(
4
- ({ className: e, ...t }, a) => /* @__PURE__ */ o.jsx(
5
- "div",
6
- {
7
- ref: a,
8
- className: d("px-6 pt-6 pb-2 text-lg font-semibold", e),
9
- ...t
10
- }
11
- )
12
- ), M = s(
13
- ({ className: e, ...t }, a) => /* @__PURE__ */ o.jsx(
14
- "div",
15
- {
16
- ref: a,
17
- className: d("px-6 py-4 flex justify-end gap-2", e),
18
- ...t
19
- }
20
- )
21
- ), R = s(
22
- ({ className: e, ...t }, a) => /* @__PURE__ */ o.jsx("div", { ref: a, className: d("px-6 py-2", e), ...t })
23
- ), k = s(
24
- ({ onOverlayClick: e, ...t }, a) => /* @__PURE__ */ o.jsx(
25
- "div",
26
- {
27
- ref: a,
28
- role: "presentation",
29
- tabIndex: -1,
30
- "aria-modal": "true",
31
- onClick: e,
32
- ...t
33
- }
34
- )
35
- ), N = p(
36
- "fixed inset-0 z-60 transition-opacity duration-300 bg-foreground/30 backdrop-blur-md flex items-center justify-center transition-opacity duration-200 ease-in-out",
37
- {
38
- variants: {
39
- placement: {
40
- top: "items-start",
41
- center: "items-center"
42
- }
43
- },
44
- defaultVariants: {
45
- placement: "center"
46
- }
47
- }
48
- ), V = p(
49
- [
50
- "bg-white rounded-lg shadow-xl relative",
51
- "flex flex-col",
52
- "outline-none",
53
- "mx-4",
54
- "transition-all duration-200 ease-in-out "
55
- ],
56
- {
57
- variants: {
58
- size: {
59
- sm: "w-[20rem] max-w-sm",
60
- // 20rem, 320px
61
- md: "w-[28rem] max-w-md",
62
- // 28rem, 448px
63
- lg: "w-[36rem] max-w-lg",
64
- // 36rem, 576px
65
- "fit-content": "w-fit max-w-full"
66
- // Fit content, no max width
67
- },
68
- placement: {
69
- top: "mt-4",
70
- center: ""
71
- }
72
- },
73
- defaultVariants: {
74
- size: "md",
75
- placement: "center"
76
- }
77
- }
78
- );
79
- function A(e, t) {
80
- u(() => {
81
- if (t && e.current) {
82
- const a = e.current.querySelectorAll(
83
- 'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'
84
- );
85
- a.length && a[0].focus();
86
- }
87
- }, [t, e]);
88
- }
89
- function F(e, t) {
90
- u(() => {
91
- if (!e) return;
92
- const a = (n) => {
93
- n.key === "Escape" && t();
94
- };
95
- return document.addEventListener("keydown", a), () => document.removeEventListener("keydown", a);
96
- }, [e, t]);
97
- }
98
- const I = 200, T = ({
99
- isOpen: e,
100
- onOpenChange: t,
101
- size: a = "md",
102
- placement: n = "center",
103
- children: v,
104
- disableOverlayClose: b,
105
- disableEscClose: w,
106
- ...g
107
- }) => {
108
- const r = x(null), i = x(null), [j, f] = y(e), [m, l] = y(!1);
109
- return u(() => {
110
- if (e)
111
- f(!0), l(!1), r.current = document.activeElement;
112
- else if (j) {
113
- l(!0);
114
- const c = setTimeout(() => {
115
- f(!1), l(!1), r.current && r.current.focus();
116
- }, I);
117
- return () => clearTimeout(c);
118
- }
119
- }, [e]), F(e && !w, () => {
120
- t && t(!1);
121
- }), A(i, e), /* @__PURE__ */ o.jsx(
122
- k,
123
- {
124
- ref: i,
125
- className: `${N({ placement: n })} transition-opacity duration-200 ease-in-out ` + (e && !m ? "opacity-100" : "opacity-0 pointer-events-none"),
126
- onOverlayClick: (c) => {
127
- c.target === i.current && !b && t && t(!1);
128
- },
129
- placement: n,
130
- children: /* @__PURE__ */ o.jsx(
131
- "div",
132
- {
133
- className: `${V({ size: a, placement: n })} transition-all duration-200 ease-in-out ` + (e && !m ? "opacity-100 scale-100" : "opacity-0 scale-95 pointer-events-none"),
134
- role: "dialog",
135
- ...g,
136
- tabIndex: 0,
137
- "aria-hidden": !e,
138
- children: v
139
- }
140
- )
141
- }
142
- );
143
- }, D = Object.assign(T, {
144
- Header: E,
145
- Body: R,
146
- Footer: M
147
- });
148
- export {
149
- D as M
150
- };
@@ -1,11 +0,0 @@
1
- import { CalculatorInputProps } from './types';
2
- /**
3
- * CalculatorInputField is the input field for CalculatorInput
4
- */
5
- export interface CalculatorInputFieldProps extends Omit<CalculatorInputProps, 'onChange'> {
6
- onChange: (value: number | '') => void;
7
- onClick?: React.MouseEventHandler<HTMLInputElement>;
8
- onFocus?: React.FocusEventHandler<HTMLInputElement>;
9
- readOnly?: boolean;
10
- }
11
- export declare const CalculatorInputField: import('react').ForwardRefExoticComponent<CalculatorInputFieldProps & import('react').RefAttributes<HTMLInputElement>>;
@@ -1,8 +0,0 @@
1
- import { FC } from 'react';
2
- import { CalculatorInputProps } from './types';
3
- /**
4
- * CalculatorInput is an input field with a modal calculator picker
5
- */
6
- export declare const CalculatorInput: FC<CalculatorInputProps & {
7
- headerLabel?: string;
8
- }>;
@@ -1 +0,0 @@
1
- export * from './calculator-input';
@@ -1,51 +0,0 @@
1
- import { CalculatorProps } from '../../primitive/calculator';
2
- import { ModalRootProps } from '../../overlays/modal';
3
- /**
4
- * Props for CalculatorInput component
5
- */
6
- export interface CalculatorInputProps extends Omit<CalculatorProps, 'value' | 'onChange'> {
7
- /**
8
- * The value of the input (number or empty string)
9
- */
10
- value: number | '';
11
- /**
12
- * Called when the value changes
13
- */
14
- onChange: (value: number | '') => void;
15
- /**
16
- * Label text to display above the input
17
- */
18
- label?: React.ReactNode;
19
- /**
20
- * Helper text to display below the input
21
- */
22
- helperText?: React.ReactNode;
23
- /**
24
- * Error message for invalid state
25
- */
26
- error?: React.ReactNode;
27
- /**
28
- * Placeholder text for the input
29
- */
30
- placeholder?: string;
31
- /**
32
- * If true, disables the input
33
- */
34
- disabled?: boolean;
35
- /**
36
- * Modal props for customizing the modal behavior
37
- */
38
- modalProps?: Partial<ModalRootProps>;
39
- /**
40
- * Optional: ARIA label for dialog
41
- */
42
- 'aria-label'?: string;
43
- /**
44
- * Optional: ARIA labelledby for dialog
45
- */
46
- 'aria-labelledby'?: string;
47
- /**
48
- * Optional: ARIA describedby for dialog
49
- */
50
- 'aria-describedby'?: string;
51
- }
@@ -1,15 +0,0 @@
1
- import { default as React } from 'react';
2
- export interface TimeFieldProps {
3
- value: string;
4
- onChange: (val: string) => void;
5
- label: string;
6
- 'aria-label'?: string;
7
- disabled?: boolean;
8
- }
9
- export declare const TimeField: React.FC<TimeFieldProps>;
10
- export interface AmPmSegmentProps {
11
- value: 'AM' | 'PM';
12
- onChange: (val: 'AM' | 'PM') => void;
13
- disabled?: boolean;
14
- }
15
- export declare const AmPmSegment: React.FC<AmPmSegmentProps>;