@machinerd/js-module 0.8.0 → 0.9.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.
Files changed (134) hide show
  1. package/README.md +6 -0
  2. package/dist/api-client-C0sbSOQf.mjs +1 -0
  3. package/dist/api-client-C3o2pO0q.cjs +1 -0
  4. package/dist/button-CQZuaIU7.mjs +1 -0
  5. package/dist/button-ChX3XGbR.cjs +1 -0
  6. package/dist/button-DHvx-GAg.d.cts +50 -0
  7. package/dist/button-DRIyBtEB.d.mts +50 -0
  8. package/dist/common-B8HXyhZa.cjs +1 -0
  9. package/dist/common-CWHkXe0F.mjs +1 -0
  10. package/dist/{common-Bn0Ko6B7.cjs → common-D4sUwkFd.cjs} +1 -1
  11. package/dist/{common-Df03Ovdm.mjs → common-ZUMpASnc.mjs} +1 -1
  12. package/dist/editor/index.cjs +1 -0
  13. package/dist/editor/index.d.cts +80 -0
  14. package/dist/editor/index.d.mts +80 -0
  15. package/dist/editor/index.mjs +1 -0
  16. package/dist/format-1_RTNUQv.mjs +1 -0
  17. package/dist/format-DEuImTYJ.cjs +1 -0
  18. package/dist/hooks/common/index.cjs +1 -0
  19. package/dist/hooks/common/index.d.cts +72 -0
  20. package/dist/hooks/common/index.d.mts +72 -0
  21. package/dist/hooks/common/index.mjs +1 -0
  22. package/dist/hooks/use-snackbar.cjs +1 -0
  23. package/dist/hooks/use-snackbar.d.cts +10 -0
  24. package/dist/hooks/use-snackbar.d.mts +10 -0
  25. package/dist/hooks/use-snackbar.mjs +1 -0
  26. package/dist/{index-B3fFA21M.d.mts → index-B1YNV_Vm.d.cts} +4 -0
  27. package/dist/{index-CeiAF-WU.d.cts → index-C8chDULk.d.mts} +4 -0
  28. package/dist/index.cjs +1 -1
  29. package/dist/index.d.cts +1 -1
  30. package/dist/index.d.mts +1 -1
  31. package/dist/index.mjs +1 -1
  32. package/dist/providers/api-client/index.cjs +1 -0
  33. package/dist/providers/{index.d.cts → api-client/index.d.cts} +3 -3
  34. package/dist/providers/{index.d.mts → api-client/index.d.mts} +3 -3
  35. package/dist/providers/api-client/index.mjs +1 -0
  36. package/dist/providers/noti-stack/index.cjs +1 -0
  37. package/dist/providers/noti-stack/index.d.cts +11 -0
  38. package/dist/providers/noti-stack/index.d.mts +11 -0
  39. package/dist/providers/noti-stack/index.mjs +1 -0
  40. package/dist/{skeleton-DtV9S1QK.cjs → skeleton-B5ZccRFX.cjs} +1 -1
  41. package/dist/{skeleton-B6_oBhkl.mjs → skeleton-Y22bmaaB.mjs} +1 -1
  42. package/dist/src-6KfzqI9Z.cjs +1 -0
  43. package/dist/src-CIMlbgv1.mjs +1 -0
  44. package/dist/styles/editor.css +255 -0
  45. package/dist/styles/index.css +371 -0
  46. package/dist/ui/carousel/index.cjs +1 -1
  47. package/dist/ui/carousel/index.d.cts +9 -9
  48. package/dist/ui/carousel/index.d.mts +9 -9
  49. package/dist/ui/carousel/index.mjs +1 -1
  50. package/dist/ui/dialog/index.cjs +1 -1
  51. package/dist/ui/dialog/index.d.cts +1 -1
  52. package/dist/ui/dialog/index.d.mts +2 -2
  53. package/dist/ui/dialog/index.mjs +1 -1
  54. package/dist/ui/dnd/index.cjs +1 -0
  55. package/dist/ui/dnd/index.d.cts +17 -0
  56. package/dist/ui/dnd/index.d.mts +17 -0
  57. package/dist/ui/dnd/index.mjs +1 -0
  58. package/dist/ui/dropdown/index.cjs +1 -0
  59. package/dist/ui/dropdown/index.d.cts +72 -0
  60. package/dist/ui/dropdown/index.d.mts +72 -0
  61. package/dist/ui/dropdown/index.mjs +1 -0
  62. package/dist/ui/image/index.cjs +1 -1
  63. package/dist/ui/image/index.d.cts +8 -8
  64. package/dist/ui/image/index.d.mts +8 -8
  65. package/dist/ui/image/index.mjs +1 -1
  66. package/dist/ui/index.cjs +1 -1
  67. package/dist/ui/index.d.cts +12 -55
  68. package/dist/ui/index.d.mts +12 -55
  69. package/dist/ui/index.mjs +1 -1
  70. package/dist/ui/motion-dialog/index.cjs +1 -0
  71. package/dist/ui/motion-dialog/index.d.cts +34 -0
  72. package/dist/ui/motion-dialog/index.d.mts +34 -0
  73. package/dist/ui/motion-dialog/index.mjs +1 -0
  74. package/dist/ui/preserve-focus-button/index.cjs +1 -0
  75. package/dist/ui/preserve-focus-button/index.d.cts +12 -0
  76. package/dist/ui/preserve-focus-button/index.d.mts +12 -0
  77. package/dist/ui/preserve-focus-button/index.mjs +1 -0
  78. package/dist/ui/sheet/index.cjs +1 -1
  79. package/dist/ui/sheet/index.d.mts +2 -2
  80. package/dist/ui/sheet/index.mjs +1 -1
  81. package/dist/ui/switch/index.cjs +1 -0
  82. package/dist/ui/switch/index.d.cts +16 -0
  83. package/dist/ui/switch/index.d.mts +16 -0
  84. package/dist/ui/switch/index.mjs +1 -0
  85. package/dist/ui/tooltip/index.cjs +1 -1
  86. package/dist/ui/tooltip/index.d.cts +2 -2
  87. package/dist/ui/tooltip/index.mjs +1 -1
  88. package/dist/ui-Bs9PP9eC.cjs +1 -0
  89. package/dist/ui-D2DoC_0E.mjs +1 -0
  90. package/dist/use-dialog-stack-Crj8YWJl.mjs +1 -0
  91. package/dist/use-dialog-stack-YiLs-sNf.cjs +1 -0
  92. package/dist/use-drag-resize-BdeLdulk.mjs +1 -0
  93. package/dist/use-drag-resize-DEgcua2U.d.cts +48 -0
  94. package/dist/use-drag-resize-DRHPv5RK.d.mts +48 -0
  95. package/dist/use-drag-resize-DeDqPC4h.cjs +1 -0
  96. package/dist/use-subset-image-Df2fCrtH.mjs +1 -0
  97. package/dist/use-subset-image-Dygkyw-W.d.mts +601 -0
  98. package/dist/use-subset-image-bDB5TSd4.d.cts +601 -0
  99. package/dist/use-subset-image-o_gmC1HL.cjs +1 -0
  100. package/dist/util/common.cjs +1 -1
  101. package/dist/util/common.d.cts +9 -2
  102. package/dist/util/common.d.mts +9 -2
  103. package/dist/util/common.mjs +1 -1
  104. package/dist/util/editor.cjs +1 -0
  105. package/dist/util/editor.d.cts +21 -0
  106. package/dist/util/editor.d.mts +21 -0
  107. package/dist/util/editor.mjs +1 -0
  108. package/dist/util/fetcher.cjs +1 -0
  109. package/dist/util/fetcher.d.cts +15 -0
  110. package/dist/util/fetcher.d.mts +15 -0
  111. package/dist/util/fetcher.mjs +1 -0
  112. package/dist/util/file.mjs +1 -1
  113. package/dist/util/format.cjs +1 -1
  114. package/dist/util/format.d.cts +29 -1
  115. package/dist/util/format.d.mts +29 -1
  116. package/dist/util/format.mjs +1 -1
  117. package/package.json +104 -33
  118. package/dist/hooks/index.cjs +0 -1
  119. package/dist/hooks/index.d.cts +0 -2
  120. package/dist/hooks/index.d.mts +0 -2
  121. package/dist/hooks/index.mjs +0 -1
  122. package/dist/hooks--O5RcEJq.cjs +0 -1
  123. package/dist/hooks-C9rXWkfW.mjs +0 -1
  124. package/dist/index-B11XDBo5.d.cts +0 -655
  125. package/dist/index-dbBlRf5k.d.mts +0 -655
  126. package/dist/providers/index.cjs +0 -1
  127. package/dist/providers/index.mjs +0 -1
  128. package/dist/providers-CkXkdYcB.cjs +0 -1
  129. package/dist/providers-zftmvT1z.mjs +0 -1
  130. package/dist/src-CjpmdVyv.cjs +0 -1
  131. package/dist/src-CukOR3K2.mjs +0 -1
  132. package/dist/use-subset-image-D8ssrZhj.mjs +0 -1
  133. package/dist/use-subset-image-DC86cg6O.cjs +0 -1
  134. /package/dist/{file-DShNxIW4.mjs → file-B-UJkabO.mjs} +0 -0
@@ -1,8 +1,9 @@
1
- import * as react9 from "react";
2
- import React$1, { ComponentProps, HTMLAttributes } from "react";
3
- import * as react_jsx_runtime12 from "react/jsx-runtime";
4
- import * as class_variance_authority_types1 from "class-variance-authority/types";
1
+ import { n as ButtonProps, t as Button } from "../button-DHvx-GAg.cjs";
2
+ import * as react23 from "react";
3
+ import React$1, { HTMLAttributes } from "react";
4
+ import * as class_variance_authority_types2 from "class-variance-authority/types";
5
5
  import { VariantProps } from "class-variance-authority";
6
+ import * as react_jsx_runtime20 from "react/jsx-runtime";
6
7
 
7
8
  //#region src/ui/bottom-app-bar/bottom-app-bar.d.ts
8
9
  interface BottomAppBarProps<T> extends React$1.HTMLAttributes<HTMLElement> {
@@ -16,50 +17,6 @@ declare function BottomAppBar<T>({
16
17
  ...props
17
18
  }: BottomAppBarProps<T>): React$1.ReactNode;
18
19
  //#endregion
19
- //#region src/ui/button/button.d.ts
20
- declare const classes$2: (props?: ({
21
- size?: "sm" | "md" | "lg" | "xl" | "2xl" | "xxs" | "xs" | "3xl" | "4xl" | null | undefined;
22
- shadow?: "sm" | "md" | "lg" | "none" | "xl" | "2xl" | "3xl" | null | undefined;
23
- outline?: "line" | "solid" | "clear" | null | undefined;
24
- variant?: "blue" | "duo" | "white" | "gray" | "neutral" | "night" | "black" | "sky" | "sky-blue" | "indigo" | null | undefined;
25
- px?: "sm" | "md" | "lg" | "none" | "xl" | "2xl" | "xs" | "3xl" | "4xl" | null | undefined;
26
- rounded?: "sm" | "md" | "lg" | "none" | "xl" | "2xl" | "full" | "3xl" | null | undefined;
27
- } & class_variance_authority_types1.ClassProp) | undefined) => string;
28
- interface VariantMap {
29
- line: 'blue' | 'duo' | 'white' | 'gray' | 'neutral' | 'sky' | 'sky-blue';
30
- solid: 'white' | 'gray' | 'blue' | 'night' | 'black' | 'sky' | 'sky-blue' | 'indigo';
31
- clear: 'sky' | 'gray';
32
- }
33
- type BaseProps = Omit<VariantProps<typeof classes$2>, 'outline' | 'variant'>;
34
- type ButtonProps = ComponentProps<'button'> & BaseProps & ({
35
- outline?: 'line';
36
- variant?: VariantMap['line'];
37
- } | {
38
- outline: 'solid';
39
- variant?: VariantMap['solid'];
40
- } | {
41
- outline: 'clear';
42
- variant?: VariantMap['clear'];
43
- }) & {
44
- asChild?: boolean;
45
- };
46
- declare const Button: react9.ForwardRefExoticComponent<(Omit<react9.ClassAttributes<HTMLButtonElement> & react9.ButtonHTMLAttributes<HTMLButtonElement> & BaseProps & {
47
- outline?: "line";
48
- variant?: VariantMap["line"];
49
- } & {
50
- asChild?: boolean;
51
- }, "ref"> | Omit<react9.ClassAttributes<HTMLButtonElement> & react9.ButtonHTMLAttributes<HTMLButtonElement> & BaseProps & {
52
- outline: "solid";
53
- variant?: VariantMap["solid"];
54
- } & {
55
- asChild?: boolean;
56
- }, "ref"> | Omit<react9.ClassAttributes<HTMLButtonElement> & react9.ButtonHTMLAttributes<HTMLButtonElement> & BaseProps & {
57
- outline: "clear";
58
- variant?: VariantMap["clear"];
59
- } & {
60
- asChild?: boolean;
61
- }, "ref">) & react9.RefAttributes<HTMLButtonElement>>;
62
- //#endregion
63
20
  //#region src/ui/conditional-wrapper/conditional-wrapper.d.ts
64
21
  interface ConditionalWrapperProps {
65
22
  condition: boolean;
@@ -70,7 +27,7 @@ declare function ConditionalWrapper({
70
27
  condition,
71
28
  wrapper,
72
29
  children
73
- }: ConditionalWrapperProps): react9.ReactNode;
30
+ }: ConditionalWrapperProps): react23.ReactNode;
74
31
  //#endregion
75
32
  //#region src/ui/conditional-wrapper/conditional-either-wrapper.d.ts
76
33
  interface ConditionalEitherWrapperProps {
@@ -84,7 +41,7 @@ declare function ConditionalEitherWrapper({
84
41
  trueWrapper,
85
42
  falseWrapper,
86
43
  children
87
- }: ConditionalEitherWrapperProps): react9.ReactNode;
44
+ }: ConditionalEitherWrapperProps): react23.ReactNode;
88
45
  //#endregion
89
46
  //#region src/ui/input/input.d.ts
90
47
  declare const classes$1: (props?: ({
@@ -92,7 +49,7 @@ declare const classes$1: (props?: ({
92
49
  gap?: "sm" | "md" | "lg" | "none" | "xl" | "xs" | null | undefined;
93
50
  outline?: "line" | "solid" | "clear" | "dashed" | "dotted" | null | undefined;
94
51
  rounded?: "sm" | "md" | "lg" | "none" | "xl" | "2xl" | null | undefined;
95
- } & class_variance_authority_types1.ClassProp) | undefined) => string;
52
+ } & class_variance_authority_types2.ClassProp) | undefined) => string;
96
53
  interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'prefix' | 'surffix' | 'size'>, VariantProps<typeof classes$1> {
97
54
  size?: VariantProps<typeof classes$1>['size'];
98
55
  gap?: VariantProps<typeof classes$1>['gap'];
@@ -101,13 +58,13 @@ interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, '
101
58
  prefix?: React.ReactNode;
102
59
  surffix?: React.ReactNode;
103
60
  }
104
- declare const Input: react9.ForwardRefExoticComponent<InputProps & react9.RefAttributes<HTMLInputElement>>;
61
+ declare const Input: react23.ForwardRefExoticComponent<InputProps & react23.RefAttributes<HTMLInputElement>>;
105
62
  //#endregion
106
63
  //#region src/ui/skeleton/skeleton.d.ts
107
64
  declare const classes: (props?: ({
108
65
  size?: "sm" | "md" | "lg" | "xl" | "2xl" | "full" | "xs" | "3xl" | "square" | null | undefined;
109
66
  rounded?: "sm" | "md" | "lg" | "none" | "xl" | "2xl" | "full" | "3xl" | null | undefined;
110
- } & class_variance_authority_types1.ClassProp) | undefined) => string;
67
+ } & class_variance_authority_types2.ClassProp) | undefined) => string;
111
68
  interface SkeletonProps extends HTMLAttributes<HTMLDivElement>, VariantProps<typeof classes> {
112
69
  width?: string | number;
113
70
  height?: string | number;
@@ -121,7 +78,7 @@ declare function Skeleton({
121
78
  height,
122
79
  className,
123
80
  ...props
124
- }: SkeletonProps): react_jsx_runtime12.JSX.Element;
81
+ }: SkeletonProps): react_jsx_runtime20.JSX.Element;
125
82
  //#endregion
126
83
  //#region src/ui/stable-text/stable-text.d.ts
127
84
  declare function StableText({
@@ -130,6 +87,6 @@ declare function StableText({
130
87
  ...props
131
88
  }: Omit<HTMLAttributes<HTMLSpanElement>, 'children'> & {
132
89
  children: string | number;
133
- }): react_jsx_runtime12.JSX.Element;
90
+ }): react_jsx_runtime20.JSX.Element;
134
91
  //#endregion
135
92
  export { BottomAppBar, type BottomAppBarProps, Button, type ButtonProps, ConditionalEitherWrapper, type ConditionalEitherWrapperProps, ConditionalWrapper, type ConditionalWrapperProps, Input, type InputProps, Skeleton, type SkeletonProps, StableText };
@@ -1,8 +1,9 @@
1
- import * as react9 from "react";
2
- import React$1, { ComponentProps, HTMLAttributes } from "react";
3
- import * as react_jsx_runtime11 from "react/jsx-runtime";
1
+ import { n as ButtonProps, t as Button } from "../button-DRIyBtEB.mjs";
2
+ import * as react21 from "react";
3
+ import React$1, { HTMLAttributes } from "react";
4
+ import * as react_jsx_runtime21 from "react/jsx-runtime";
4
5
  import { VariantProps } from "class-variance-authority";
5
- import * as class_variance_authority_types0 from "class-variance-authority/types";
6
+ import * as class_variance_authority_types2 from "class-variance-authority/types";
6
7
 
7
8
  //#region src/ui/bottom-app-bar/bottom-app-bar.d.ts
8
9
  interface BottomAppBarProps<T> extends React$1.HTMLAttributes<HTMLElement> {
@@ -16,50 +17,6 @@ declare function BottomAppBar<T>({
16
17
  ...props
17
18
  }: BottomAppBarProps<T>): React$1.ReactNode;
18
19
  //#endregion
19
- //#region src/ui/button/button.d.ts
20
- declare const classes$2: (props?: ({
21
- size?: "sm" | "md" | "lg" | "xl" | "2xl" | "xxs" | "xs" | "3xl" | "4xl" | null | undefined;
22
- shadow?: "sm" | "md" | "lg" | "none" | "xl" | "2xl" | "3xl" | null | undefined;
23
- outline?: "line" | "solid" | "clear" | null | undefined;
24
- variant?: "blue" | "duo" | "white" | "gray" | "neutral" | "night" | "black" | "sky" | "sky-blue" | "indigo" | null | undefined;
25
- px?: "sm" | "md" | "lg" | "none" | "xl" | "2xl" | "xs" | "3xl" | "4xl" | null | undefined;
26
- rounded?: "sm" | "md" | "lg" | "none" | "xl" | "2xl" | "full" | "3xl" | null | undefined;
27
- } & class_variance_authority_types0.ClassProp) | undefined) => string;
28
- interface VariantMap {
29
- line: 'blue' | 'duo' | 'white' | 'gray' | 'neutral' | 'sky' | 'sky-blue';
30
- solid: 'white' | 'gray' | 'blue' | 'night' | 'black' | 'sky' | 'sky-blue' | 'indigo';
31
- clear: 'sky' | 'gray';
32
- }
33
- type BaseProps = Omit<VariantProps<typeof classes$2>, 'outline' | 'variant'>;
34
- type ButtonProps = ComponentProps<'button'> & BaseProps & ({
35
- outline?: 'line';
36
- variant?: VariantMap['line'];
37
- } | {
38
- outline: 'solid';
39
- variant?: VariantMap['solid'];
40
- } | {
41
- outline: 'clear';
42
- variant?: VariantMap['clear'];
43
- }) & {
44
- asChild?: boolean;
45
- };
46
- declare const Button: react9.ForwardRefExoticComponent<(Omit<react9.ClassAttributes<HTMLButtonElement> & react9.ButtonHTMLAttributes<HTMLButtonElement> & BaseProps & {
47
- outline?: "line";
48
- variant?: VariantMap["line"];
49
- } & {
50
- asChild?: boolean;
51
- }, "ref"> | Omit<react9.ClassAttributes<HTMLButtonElement> & react9.ButtonHTMLAttributes<HTMLButtonElement> & BaseProps & {
52
- outline: "solid";
53
- variant?: VariantMap["solid"];
54
- } & {
55
- asChild?: boolean;
56
- }, "ref"> | Omit<react9.ClassAttributes<HTMLButtonElement> & react9.ButtonHTMLAttributes<HTMLButtonElement> & BaseProps & {
57
- outline: "clear";
58
- variant?: VariantMap["clear"];
59
- } & {
60
- asChild?: boolean;
61
- }, "ref">) & react9.RefAttributes<HTMLButtonElement>>;
62
- //#endregion
63
20
  //#region src/ui/conditional-wrapper/conditional-wrapper.d.ts
64
21
  interface ConditionalWrapperProps {
65
22
  condition: boolean;
@@ -70,7 +27,7 @@ declare function ConditionalWrapper({
70
27
  condition,
71
28
  wrapper,
72
29
  children
73
- }: ConditionalWrapperProps): react9.ReactNode;
30
+ }: ConditionalWrapperProps): react21.ReactNode;
74
31
  //#endregion
75
32
  //#region src/ui/conditional-wrapper/conditional-either-wrapper.d.ts
76
33
  interface ConditionalEitherWrapperProps {
@@ -84,7 +41,7 @@ declare function ConditionalEitherWrapper({
84
41
  trueWrapper,
85
42
  falseWrapper,
86
43
  children
87
- }: ConditionalEitherWrapperProps): react9.ReactNode;
44
+ }: ConditionalEitherWrapperProps): react21.ReactNode;
88
45
  //#endregion
89
46
  //#region src/ui/input/input.d.ts
90
47
  declare const classes$1: (props?: ({
@@ -92,7 +49,7 @@ declare const classes$1: (props?: ({
92
49
  gap?: "sm" | "md" | "lg" | "none" | "xl" | "xs" | null | undefined;
93
50
  outline?: "line" | "solid" | "clear" | "dashed" | "dotted" | null | undefined;
94
51
  rounded?: "sm" | "md" | "lg" | "none" | "xl" | "2xl" | null | undefined;
95
- } & class_variance_authority_types0.ClassProp) | undefined) => string;
52
+ } & class_variance_authority_types2.ClassProp) | undefined) => string;
96
53
  interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'prefix' | 'surffix' | 'size'>, VariantProps<typeof classes$1> {
97
54
  size?: VariantProps<typeof classes$1>['size'];
98
55
  gap?: VariantProps<typeof classes$1>['gap'];
@@ -101,13 +58,13 @@ interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, '
101
58
  prefix?: React.ReactNode;
102
59
  surffix?: React.ReactNode;
103
60
  }
104
- declare const Input: react9.ForwardRefExoticComponent<InputProps & react9.RefAttributes<HTMLInputElement>>;
61
+ declare const Input: react21.ForwardRefExoticComponent<InputProps & react21.RefAttributes<HTMLInputElement>>;
105
62
  //#endregion
106
63
  //#region src/ui/skeleton/skeleton.d.ts
107
64
  declare const classes: (props?: ({
108
65
  size?: "sm" | "md" | "lg" | "xl" | "2xl" | "full" | "xs" | "3xl" | "square" | null | undefined;
109
66
  rounded?: "sm" | "md" | "lg" | "none" | "xl" | "2xl" | "full" | "3xl" | null | undefined;
110
- } & class_variance_authority_types0.ClassProp) | undefined) => string;
67
+ } & class_variance_authority_types2.ClassProp) | undefined) => string;
111
68
  interface SkeletonProps extends HTMLAttributes<HTMLDivElement>, VariantProps<typeof classes> {
112
69
  width?: string | number;
113
70
  height?: string | number;
@@ -121,7 +78,7 @@ declare function Skeleton({
121
78
  height,
122
79
  className,
123
80
  ...props
124
- }: SkeletonProps): react_jsx_runtime11.JSX.Element;
81
+ }: SkeletonProps): react_jsx_runtime21.JSX.Element;
125
82
  //#endregion
126
83
  //#region src/ui/stable-text/stable-text.d.ts
127
84
  declare function StableText({
@@ -130,6 +87,6 @@ declare function StableText({
130
87
  ...props
131
88
  }: Omit<HTMLAttributes<HTMLSpanElement>, 'children'> & {
132
89
  children: string | number;
133
- }): react_jsx_runtime11.JSX.Element;
90
+ }): react_jsx_runtime21.JSX.Element;
134
91
  //#endregion
135
92
  export { BottomAppBar, type BottomAppBarProps, Button, type ButtonProps, ConditionalEitherWrapper, type ConditionalEitherWrapperProps, ConditionalWrapper, type ConditionalWrapperProps, Input, type InputProps, Skeleton, type SkeletonProps, StableText };
package/dist/ui/index.mjs CHANGED
@@ -1 +1 @@
1
- import{n as e}from"../common-Df03Ovdm.mjs";import{t}from"../skeleton-B6_oBhkl.mjs";import n from"clsx";import r,{forwardRef as i}from"react";import{jsx as a,jsxs as o}from"react/jsx-runtime";import{cva as s}from"class-variance-authority";import{Slot as c}from"@radix-ui/react-slot";function l({className:e,items:t,render:i,...o}){return a(`nav`,{"data-komc":!0,"aria-label":`bottom app bar`,className:n(`komc:fixed komc:bottom-0 komc:left-0 komc:right-0`,`komc:border-t komc:border-neutral-200 komc:bg-white komc:z-10`,e),...o,children:a(`div`,{className:`komc:grid komc:min-h-15`,style:{gridTemplateColumns:`repeat(${t.length}, 1fr)`},children:t.map((e,t)=>a(r.Fragment,{children:i(e)},t))})})}const u=s(e(`komc:flex komc:justify-center komc:items-center komc:gap-x-2 komc:w-full`,`komc:transition-colors komc:duration-200 komc:relative`,`komc:[&_svg]:transition-colors komc:[&_svg]:duration-200`,`komc:cursor-pointer komc:disabled:cursor-default`),{variants:{size:{xxs:`komc:h-7.5`,xs:`komc:h-8`,sm:`komc:h-9`,md:`komc:h-10`,lg:`komc:h-11`,xl:`komc:h-12`,"2xl":`komc:h-13`,"3xl":`komc:h-14`,"4xl":`komc:h-15`},shadow:{none:``,sm:`komc:drop-shadow-sm`,md:`komc:drop-shadow-md`,lg:`komc:drop-shadow-lg`,xl:`komc:drop-shadow-xl`,"2xl":`komc:drop-shadow-2xl`,"3xl":`komc:drop-shadow-3xl`},outline:{line:`komc:border`,solid:`komc:border komc:border-transparent`,clear:`komc:border-none`},variant:{blue:``,duo:``,white:``,gray:``,neutral:``,night:``,black:``,sky:``,"sky-blue":``,indigo:``},px:{none:`komc:px-0`,xs:`komc:px-0.5`,sm:`komc:px-1`,md:`komc:px-1.5`,lg:`komc:px-2`,xl:`komc:px-3`,"2xl":`komc:px-4`,"3xl":`komc:px-5`,"4xl":`komc:px-6`},rounded:{none:`komc:rounded-none`,sm:`komc:rounded-sm`,md:`komc:rounded-md`,lg:`komc:rounded-lg`,xl:`komc:rounded-xl`,"2xl":`komc:rounded-2xl`,"3xl":`komc:rounded-3xl`,full:`komc:rounded-full`}},compoundVariants:[{outline:`line`,variant:`blue`,className:e(`komc:border-blue-500 komc:bg-white komc:text-blue-500`,`komc:hover:border-transparent komc:hover:bg-blue-500 komc:hover:text-white`,`komc:active:border-transparent komc:active:bg-blue-500 komc:active:text-white`,`komc:disabled:border-gray-500 komc:disabled:bg-white komc:disabled:text-gray-500`)},{outline:`line`,variant:`duo`,className:e(`komc:border-blue-500 komc:bg-white komc:text-brand-blck`,`komc:hover:border-transparent komc:hover:bg-blue-500 komc:hover:text-white`,`komc:active:border-transparent komc:active:bg-blue-500 komc:active:text-white`,`komc:disabled:border-gray-500 komc:disabled:bg-white komc:disabled:text-gray-500`)},{outline:`line`,variant:`white`,className:e(`komc:border-gray-600 komc:bg-white komc:text-brand-blck`,`komc:hover:bg-gray-200 komc:hover:text-brand-blck`,`komc:active:bg-gray-200 komc:active:text-brand-blck`,`komc:disabled:border-gray-500 komc:disabled:bg-white komc:disabled:text-gray-500`)},{outline:`line`,variant:`gray`,className:e(`komc:border-white komc:bg-transparent komc:text-white`,`komc:hover:bg-[rgb(199,199,199)] komc:hover:text-white`,`komc:active:bg-[rgb(199,199,199)] komc:active:text-white`,`komc:disabled:border-gray-500 komc:disabled:bg-white komc:disabled:text-gray-500`)},{outline:`line`,variant:`neutral`,className:e(`komc:border-gray-800 komc:bg-transparent komc:text-black`,`komc:hover:bg-gray-200 komc:hover:text-black`,`komc:active:bg-gray-200 komc:active:text-black`,`komc:disabled:border-gray-500 komc:disabled:bg-transparent komc:disabled:text-gray-500`)},{outline:`line`,variant:`sky`,className:e(`komc:border-sky-750 komc:bg-transparent komc:text-black`,`komc:hover:bg-sky-750 komc:hover:text-white`,`komc:active:bg-sky-750 komc:active:text-white`,`komc:disabled:border-gray-500 komc:disabled:bg-transparent komc:disabled:text-gray-500`)},{outline:`line`,variant:`sky-blue`,className:e(`komc:border-sky-450 komc:bg-transparent komc:text-black`,`komc:hover:bg-sky-450 komc:hover:text-white`,`komc:active:bg-sky-450 komc:active:text-white`,`komc:disabled:border-gray-500 komc:disabled:bg-transparent komc:disabled:text-gray-500`)},{outline:`solid`,variant:`white`,className:e(`komc:bg-white komc:text-brand-blck`,`komc:hover:bg-gray-200`,`komc:active:bg-gray-200`,`komc:disabled:border-white komc:disabled:bg-gray-50 komc:disabled:text-gray-800`)},{outline:`solid`,variant:`gray`,className:e(`komc:bg-gray-100 komc:text-blue-500`,`komc:hover:bg-blue-500 komc:hover:text-white`,`komc:active:bg-blue-500 komc:active:text-white`,`komc:disabled:border-white komc:disabled:bg-gray-50 komc:disabled:text-gray-800`)},{outline:`solid`,variant:`blue`,className:e(`komc:bg-blue-500 komc:text-white`,`komc:hover:bg-night-700 komc:hover:text-white`,`komc:active:bg-night-700 komc:active:text-white`,`komc:disabled:border-white komc:disabled:bg-gray-50 komc:disabled:text-gray-800`)},{outline:`solid`,variant:`night`,className:e(`komc:bg-night-700 komc:text-white`,`komc:hover:bg-night-800 komc:hover:text-white`,`komc:active:bg-night-800 komc:active:text-white`,`komc:disabled:border-white komc:disabled:bg-gray-50 komc:disabled:text-gray-800`)},{outline:`solid`,variant:`black`,className:e(`komc:bg-[rgb(95,95,96)] komc:text-white`,`komc:hover:bg-[rgb(76,76,77)] komc:hover:text-white`,`komc:active:bg-[rgb(76,76,77)] komc:active:text-white`,`komc:disabled:border-white komc:disabled:bg-gray-50 komc:disabled:text-gray-800`)},{outline:`solid`,variant:`sky`,className:e(`komc:bg-sky-750 komc:text-white`,`komc:hover:bg-sky-950 komc:hover:text-white`,`komc:active:bg-sky-950 komc:active:text-white`,`komc:disabled:border-white komc:disabled:bg-gray-700`)},{outline:`solid`,variant:`sky-blue`,className:e(`komc:bg-sky-450 komc:text-white`,`komc:hover:bg-sky-650 komc:hover:text-white`,`komc:active:bg-sky-650 komc:active:text-white`,`komc:disabled:border-white komc:disabled:bg-gray-700`)},{outline:`solid`,variant:`indigo`,className:e(`komc:bg-indigo-600 komc:text-white`,`komc:hover:bg-indigo-700 komc:hover:text-white`,`komc:active:bg-indigo-700 komc:active:text-white`,`komc:disabled:border-white komc:disabled:bg-gray-700`)},{outline:`clear`,variant:`sky`,className:e(`komc:bg-transparent komc:text-[#1890FF]`,`komc:hover:bg-transparent komc:hover:text-[#1890FF] komc:hover:underline`,`komc:active:bg-transparent komc:active:text-[#1890FF] komc:active:underline`,`komc:disabled:border-transparent komc:disabled:bg-transparent komc:disabled:text-gray-500`)},{outline:`clear`,variant:`gray`,className:e(`komc:bg-transparent komc:text-gray-800`,`komc:hover:bg-transparent komc:hover:text-gray-800 komc:hover:underline`,`komc:active:bg-transparent komc:active:text-gray-800 komc:active:underline`,`komc:disabled:border-transparent komc:disabled:bg-transparent komc:disabled:text-gray-500`)}],defaultVariants:{size:`md`,shadow:`none`,outline:`line`,variant:`blue`,px:`2xl`,rounded:`sm`}});var d=i(({type:e=`button`,className:t,id:n,size:r,shadow:i,outline:o,variant:s,px:l,rounded:d,asChild:f,...p},m)=>a(f?c:`button`,{ref:m,...p,type:e,id:n,className:u({size:r,shadow:i,outline:o,variant:s,px:l,rounded:d,className:t})}));function f({condition:e,wrapper:t,children:n}){return e?t(n):n}function p({condition:e,trueWrapper:t,falseWrapper:n,children:r}){return e?t(r):n(r)}const m=s(e(`komc:flex komc:items-center komc:w-full komc:px-2`,`komc:[&>input]:outline-none komc:[&>input]:w-full`,`komc:[&>input]:focus:ring-0 komc:[&>input]:focus:ring-offset-0`,`komc:[&>input]:h-full`),{variants:{size:{xs:`komc:h-7.5`,sm:`komc:h-8`,base:`komc:h-9`,md:`komc:h-10`,lg:`komc:h-11`,xl:`komc:h-12`,"2xl":`komc:h-13`,"3xl":`komc:h-14`},gap:{none:`komc:gap-0`,xs:`komc:gap-1`,sm:`komc:gap-2`,md:`komc:gap-3`,lg:`komc:gap-4`,xl:`komc:gap-5`},outline:{line:`komc:border`,solid:`komc:border-transparent`,clear:`komc:border-none`,dashed:`komc:border-dashed`,dotted:`komc:border-dotted`},rounded:{none:`komc:rounded-none`,sm:`komc:rounded-sm`,md:`komc:rounded-md`,lg:`komc:rounded-lg`,xl:`komc:rounded-xl`,"2xl":`komc:rounded-2xl`}}});var h=i(({prefix:e=null,surffix:t=null,size:n=`lg`,gap:r=`xl`,outline:i=`line`,rounded:s=`lg`,className:c,...l},u)=>o(`div`,{"data-komc":!0,className:m({size:n,gap:r,outline:i,rounded:s,className:c}),children:[e,a(`input`,{ref:u,type:`text`,...l}),t]}));function g({children:e,className:t,...r}){return a(`span`,{...r,"data-komc":!0,"data-text":`${e}`,className:n(`komc:inline-flex komc:flex-col komc:justify-center komc:items-center`,`komc:after:content-[attr(data-text)] komc:after:font-bold`,`komc:after:h-0 komc:after:invisible komc:after:overflow-hidden`,`komc:after:select-none komc:after:pointer-events-none`,t),children:e})}export{l as BottomAppBar,d as Button,p as ConditionalEitherWrapper,f as ConditionalWrapper,h as Input,t as Skeleton,g as StableText};
1
+ import"../common-ZUMpASnc.mjs";import{a as e,i as t,n,r,t as i}from"../ui-D2DoC_0E.mjs";import{t as a}from"../button-CQZuaIU7.mjs";import{t as o}from"../skeleton-Y22bmaaB.mjs";export{e as BottomAppBar,a as Button,r as ConditionalEitherWrapper,t as ConditionalWrapper,n as Input,o as Skeleton,i as StableText};
@@ -0,0 +1 @@
1
+ "use client";const e=require(`../../chunk-Bmb41Sf3.cjs`),t=require(`../../common-D4sUwkFd.cjs`),n=require(`../../use-dialog-stack-YiLs-sNf.cjs`);let r=require(`react`);r=e.t(r);let i=require(`react/jsx-runtime`),a=require(`class-variance-authority`),o=require(`motion/react`),s=require(`react-dom`);const c={sm:`komc:max-w-md`,md:`komc:max-w-lg`,lg:`komc:max-w-2xl`,xl:`komc:max-w-4xl`,"2xl":`komc:max-w-6xl`,full:`komc:max-w-full komc:mx-4`},l={scale:{hidden:{opacity:0,scale:.8,y:20},visible:{opacity:1,scale:1,y:0,transition:{type:`spring`,damping:25,stiffness:300}},exit:{opacity:0,scale:.8,y:20,transition:{duration:.2}}},slide:{hidden:{opacity:0,x:300},visible:{opacity:1,x:0,transition:{type:`spring`,damping:25,stiffness:300}},exit:{opacity:0,x:300,transition:{duration:.3}}},fade:{hidden:{opacity:0},visible:{opacity:1,transition:{duration:.3}},exit:{opacity:0,transition:{duration:.2}}},"slide-up":{hidden:{opacity:0,y:100},visible:{opacity:1,y:0,transition:{type:`spring`,damping:25,stiffness:300}},exit:{opacity:0,y:100,transition:{duration:.3}}}},u={hidden:{opacity:0},visible:{opacity:1},exit:{opacity:0}},d=(0,a.cva)(`komc:flex komc:items-center komc:justify-between`,{variants:{padding:{none:void 0,sm:`komc:p-2`,md:`komc:p-4`,lg:`komc:p-6`},border:{none:``,default:`komc:border-b komc:border-gray-200`},closeButtonPosition:{none:void 0,fixed:`komc:[&>button]:absolute komc:[&>button]:right-6 komc:[&>button]:top-10`}},defaultVariants:{padding:`lg`,border:`default`,closeButtonPosition:`none`}}),f=(0,r.forwardRef)(({isOpen:e,onClose:a,children:f,title:p,footer:m,size:h=`md`,animation:g=`scale`,showCloseButton:_=!0,closeOnBackdropClick:v=!0,className:y=``,showBackdrop:b=!0,isScrollableContent:x=!1,zIndex:S=1e4,customAnimation:C,headerClassName:w,onExitComplete:T},E)=>{let D=(0,r.useId)(),[O,k]=(0,r.useState)(!1);n.t(e,a),(0,r.useEffect)(()=>{k(!0)},[]);let A=()=>{v&&a()},j=C||l[g];return O?(0,s.createPortal)((0,i.jsx)(o.AnimatePresence,{mode:`wait`,onExitComplete:T,children:e&&(0,i.jsxs)(o.motion.div,{"data-komc":!0,"data-komc-dialog":``,className:`komc:fixed komc:inset-0 komc:flex komc:items-center komc:justify-center komc:p-4`,style:{zIndex:S},variants:u,initial:`hidden`,animate:`visible`,exit:`exit`,children:[b&&(0,i.jsx)(o.motion.div,{className:`komc:absolute komc:bg-black/50`,style:{zIndex:-1,top:`50%`,left:`50%`,width:`100vw`,height:`100vh`,transform:`translate(-50%, -50%)`},initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:A}),(0,i.jsxs)(o.motion.div,{ref:E,id:D,className:t.n(`komc:relative komc:bg-white komc:rounded-lg komc:shadow-xl komc:pointer-events-auto`,h===`full`?`komc:w-full komc:h-full`:t.n(c[h],`komc:w-full`),y),variants:j,initial:`hidden`,animate:`visible`,exit:`exit`,layout:!0,children:[(p||_)&&(0,i.jsxs)(o.motion.div,{className:d({padding:w?.padding,border:w?.border,closeButtonPosition:w?.closeButtonPosition}),initial:{opacity:0,y:-10},animate:{opacity:1,y:0},transition:{delay:.1},children:[p&&(typeof p==`string`?(0,i.jsx)(`h2`,{className:`komc:text-lg komc:font-semibold komc:text-gray-900`,children:p}):p),_&&(0,i.jsx)(o.motion.button,{onClick:a,className:`komc:p-1 komc:rounded-full komc:hover:bg-gray-100 komc:transition-colors`,"aria-label":`Close dialog`,whileHover:{scale:1.1},whileTap:{scale:.9},children:(0,i.jsx)(`svg`,{className:`komc:w-5 komc:h-5 komc:text-neutral-500`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`,children:(0,i.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M6 18L18 6M6 6l12 12`})})})]}),(0,i.jsx)(o.motion.div,{className:t.n(`komc:@container/dialog-content`,`komc:p-6`,x&&`komc:overflow-y-auto komc:h-(--dialog-content-height)`),initial:{opacity:0},animate:{opacity:1},transition:{delay:.2},children:f}),m&&(0,i.jsx)(o.motion.div,{className:`komc:flex komc:items-center komc:justify-between komc:p-6 komc:border-t komc:border-gray-200`,initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.3},children:m})]})]})}),document.body):null});var p=f;exports.MotionDialog=p;
@@ -0,0 +1,34 @@
1
+ import React from "react";
2
+ import { Variants } from "motion/react";
3
+
4
+ //#region src/ui/motion-dialog/motion-dialog.d.ts
5
+ type HeaderPadding = 'none' | 'sm' | 'md' | 'lg';
6
+ type HeaderBorder = 'none' | 'default';
7
+ type CloseButtonPosition = 'none' | 'fixed';
8
+ interface HeaderStyles {
9
+ padding?: HeaderPadding;
10
+ border?: HeaderBorder;
11
+ closeButtonPosition: CloseButtonPosition;
12
+ }
13
+ type CustomAnimation = 'scale' | 'slide' | 'fade' | 'slide-up';
14
+ interface MotionDialogProps {
15
+ isOpen: boolean;
16
+ onClose: () => void;
17
+ children: React.ReactNode;
18
+ title?: string | React.ReactNode;
19
+ footer?: React.ReactNode;
20
+ size?: 'sm' | 'md' | 'lg' | 'xl' | '2xl' | 'full';
21
+ animation?: CustomAnimation;
22
+ showCloseButton?: boolean;
23
+ closeOnBackdropClick?: boolean;
24
+ className?: string;
25
+ showBackdrop?: boolean;
26
+ isScrollableContent?: boolean;
27
+ zIndex?: number;
28
+ customAnimation?: Variants;
29
+ headerClassName?: HeaderStyles;
30
+ onExitComplete?: () => void;
31
+ }
32
+ declare const MotionDialog: React.ForwardRefExoticComponent<MotionDialogProps & React.RefAttributes<HTMLDivElement>>;
33
+ //#endregion
34
+ export { MotionDialog, type MotionDialogProps };
@@ -0,0 +1,34 @@
1
+ import React from "react";
2
+ import { Variants } from "motion/react";
3
+
4
+ //#region src/ui/motion-dialog/motion-dialog.d.ts
5
+ type HeaderPadding = 'none' | 'sm' | 'md' | 'lg';
6
+ type HeaderBorder = 'none' | 'default';
7
+ type CloseButtonPosition = 'none' | 'fixed';
8
+ interface HeaderStyles {
9
+ padding?: HeaderPadding;
10
+ border?: HeaderBorder;
11
+ closeButtonPosition: CloseButtonPosition;
12
+ }
13
+ type CustomAnimation = 'scale' | 'slide' | 'fade' | 'slide-up';
14
+ interface MotionDialogProps {
15
+ isOpen: boolean;
16
+ onClose: () => void;
17
+ children: React.ReactNode;
18
+ title?: string | React.ReactNode;
19
+ footer?: React.ReactNode;
20
+ size?: 'sm' | 'md' | 'lg' | 'xl' | '2xl' | 'full';
21
+ animation?: CustomAnimation;
22
+ showCloseButton?: boolean;
23
+ closeOnBackdropClick?: boolean;
24
+ className?: string;
25
+ showBackdrop?: boolean;
26
+ isScrollableContent?: boolean;
27
+ zIndex?: number;
28
+ customAnimation?: Variants;
29
+ headerClassName?: HeaderStyles;
30
+ onExitComplete?: () => void;
31
+ }
32
+ declare const MotionDialog: React.ForwardRefExoticComponent<MotionDialogProps & React.RefAttributes<HTMLDivElement>>;
33
+ //#endregion
34
+ export { MotionDialog, type MotionDialogProps };
@@ -0,0 +1 @@
1
+ "use client";import{n as e}from"../../common-ZUMpASnc.mjs";import{t}from"../../use-dialog-stack-Crj8YWJl.mjs";import n,{forwardRef as r,useEffect as i,useId as a,useState as o}from"react";import{jsx as s,jsxs as c}from"react/jsx-runtime";import{cva as l}from"class-variance-authority";import{AnimatePresence as u,motion as d}from"motion/react";import{createPortal as f}from"react-dom";const p={sm:`komc:max-w-md`,md:`komc:max-w-lg`,lg:`komc:max-w-2xl`,xl:`komc:max-w-4xl`,"2xl":`komc:max-w-6xl`,full:`komc:max-w-full komc:mx-4`},m={scale:{hidden:{opacity:0,scale:.8,y:20},visible:{opacity:1,scale:1,y:0,transition:{type:`spring`,damping:25,stiffness:300}},exit:{opacity:0,scale:.8,y:20,transition:{duration:.2}}},slide:{hidden:{opacity:0,x:300},visible:{opacity:1,x:0,transition:{type:`spring`,damping:25,stiffness:300}},exit:{opacity:0,x:300,transition:{duration:.3}}},fade:{hidden:{opacity:0},visible:{opacity:1,transition:{duration:.3}},exit:{opacity:0,transition:{duration:.2}}},"slide-up":{hidden:{opacity:0,y:100},visible:{opacity:1,y:0,transition:{type:`spring`,damping:25,stiffness:300}},exit:{opacity:0,y:100,transition:{duration:.3}}}},h={hidden:{opacity:0},visible:{opacity:1},exit:{opacity:0}},g=l(`komc:flex komc:items-center komc:justify-between`,{variants:{padding:{none:void 0,sm:`komc:p-2`,md:`komc:p-4`,lg:`komc:p-6`},border:{none:``,default:`komc:border-b komc:border-gray-200`},closeButtonPosition:{none:void 0,fixed:`komc:[&>button]:absolute komc:[&>button]:right-6 komc:[&>button]:top-10`}},defaultVariants:{padding:`lg`,border:`default`,closeButtonPosition:`none`}});var _=r(({isOpen:n,onClose:r,children:l,title:_,footer:v,size:y=`md`,animation:b=`scale`,showCloseButton:x=!0,closeOnBackdropClick:S=!0,className:C=``,showBackdrop:w=!0,isScrollableContent:T=!1,zIndex:E=1e4,customAnimation:D,headerClassName:O,onExitComplete:k},A)=>{let j=a(),[M,N]=o(!1);t(n,r),i(()=>{N(!0)},[]);let P=()=>{S&&r()},F=D||m[b];return M?f(s(u,{mode:`wait`,onExitComplete:k,children:n&&c(d.div,{"data-komc":!0,"data-komc-dialog":``,className:`komc:fixed komc:inset-0 komc:flex komc:items-center komc:justify-center komc:p-4`,style:{zIndex:E},variants:h,initial:`hidden`,animate:`visible`,exit:`exit`,children:[w&&s(d.div,{className:`komc:absolute komc:bg-black/50`,style:{zIndex:-1,top:`50%`,left:`50%`,width:`100vw`,height:`100vh`,transform:`translate(-50%, -50%)`},initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:P}),c(d.div,{ref:A,id:j,className:e(`komc:relative komc:bg-white komc:rounded-lg komc:shadow-xl komc:pointer-events-auto`,y===`full`?`komc:w-full komc:h-full`:e(p[y],`komc:w-full`),C),variants:F,initial:`hidden`,animate:`visible`,exit:`exit`,layout:!0,children:[(_||x)&&c(d.div,{className:g({padding:O?.padding,border:O?.border,closeButtonPosition:O?.closeButtonPosition}),initial:{opacity:0,y:-10},animate:{opacity:1,y:0},transition:{delay:.1},children:[_&&(typeof _==`string`?s(`h2`,{className:`komc:text-lg komc:font-semibold komc:text-gray-900`,children:_}):_),x&&s(d.button,{onClick:r,className:`komc:p-1 komc:rounded-full komc:hover:bg-gray-100 komc:transition-colors`,"aria-label":`Close dialog`,whileHover:{scale:1.1},whileTap:{scale:.9},children:s(`svg`,{className:`komc:w-5 komc:h-5 komc:text-neutral-500`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`,children:s(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M6 18L18 6M6 6l12 12`})})})]}),s(d.div,{className:e(`komc:@container/dialog-content`,`komc:p-6`,T&&`komc:overflow-y-auto komc:h-(--dialog-content-height)`),initial:{opacity:0},animate:{opacity:1},transition:{delay:.2},children:l}),v&&s(d.div,{className:`komc:flex komc:items-center komc:justify-between komc:p-6 komc:border-t komc:border-gray-200`,initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.3},children:v})]})]})}),document.body):null});export{_ as MotionDialog};
@@ -0,0 +1 @@
1
+ "use client";const e=require(`../../chunk-Bmb41Sf3.cjs`);require(`../../common-D4sUwkFd.cjs`);const t=require(`../../button-ChX3XGbR.cjs`);let n=require(`react/jsx-runtime`);function r({className:e,onMouseDown:r,...i}){return(0,n.jsx)(t.t,{...i,onMouseDown:e=>{e.preventDefault(),r?.(e)}})}exports.PreserveFocusButton=r;
@@ -0,0 +1,12 @@
1
+ import { t as Button } from "../../button-DHvx-GAg.cjs";
2
+ import { ComponentProps } from "react";
3
+ import * as react_jsx_runtime0 from "react/jsx-runtime";
4
+
5
+ //#region src/ui/preserve-focus-button/preserve-focus.d.ts
6
+ declare function PreserveFocusButton({
7
+ className,
8
+ onMouseDown,
9
+ ...props
10
+ }: ComponentProps<typeof Button>): react_jsx_runtime0.JSX.Element;
11
+ //#endregion
12
+ export { PreserveFocusButton };
@@ -0,0 +1,12 @@
1
+ import { t as Button } from "../../button-DRIyBtEB.mjs";
2
+ import { ComponentProps } from "react";
3
+ import * as react_jsx_runtime4 from "react/jsx-runtime";
4
+
5
+ //#region src/ui/preserve-focus-button/preserve-focus.d.ts
6
+ declare function PreserveFocusButton({
7
+ className,
8
+ onMouseDown,
9
+ ...props
10
+ }: ComponentProps<typeof Button>): react_jsx_runtime4.JSX.Element;
11
+ //#endregion
12
+ export { PreserveFocusButton };
@@ -0,0 +1 @@
1
+ "use client";import"../../common-ZUMpASnc.mjs";import{t as e}from"../../button-CQZuaIU7.mjs";import{jsx as t}from"react/jsx-runtime";function n({className:n,onMouseDown:r,...i}){return t(e,{...i,onMouseDown:e=>{e.preventDefault(),r?.(e)}})}export{n as PreserveFocusButton};
@@ -1 +1 @@
1
- "use client";const e=require(`../../chunk-Bmb41Sf3.cjs`);require(`../../src-CjpmdVyv.cjs`),require(`../../file-5mweNdAM.cjs`);const t=require(`../../hooks--O5RcEJq.cjs`);require(`../../providers-CkXkdYcB.cjs`),require(`../../use-subset-image-DC86cg6O.cjs`);let n=require(`clsx`);n=e.t(n);let r=require(`react`);r=e.t(r);let i=require(`react/jsx-runtime`),a=require(`class-variance-authority`);const o=(0,a.cva)((0,n.default)(`komc:absolute komc:bg-white komc:flex komc:flex-col komc:shadow-2xl`,`komc:transition-transform komc:duration-300 komc:ease-in-out`),{variants:{direction:{top:`komc:top-0 komc:left-0 komc:right-0 komc:-translate-y-full komc:data-[state=open]:translate-y-0`,bottom:`komc:bottom-0 komc:left-0 komc:right-0 komc:translate-y-full komc:data-[state=open]:translate-y-0`,left:`komc:top-0 komc:bottom-0 komc:left-0 komc:-translate-x-full komc:data-[state=open]:translate-x-0`,right:`komc:top-0 komc:bottom-0 komc:right-0 komc:translate-x-full komc:data-[state=open]:translate-x-0`}}}),s=(0,a.cva)(``,{variants:{size:{full:``,half:``,auto:``},direction:{top:``,bottom:``,left:``,right:``}},compoundVariants:[{size:`full`,direction:`top`,className:`komc:h-full`},{size:`full`,direction:`bottom`,className:`komc:h-full`},{size:`full`,direction:`left`,className:`komc:w-full`},{size:`full`,direction:`right`,className:`komc:w-full`},{size:`half`,direction:`top`,className:`komc:h-[50dvh]`},{size:`half`,direction:`bottom`,className:`komc:h-[50dvh]`},{size:`half`,direction:`left`,className:`komc:w-[50dvw]`},{size:`half`,direction:`right`,className:`komc:w-[50dvw]`},{size:`auto`,direction:`top`,className:`komc:h-auto komc:max-h-[90dvh]`},{size:`auto`,direction:`bottom`,className:`komc:h-auto komc:max-h-[90dvh]`},{size:`auto`,direction:`left`,className:`komc:w-auto komc:max-w-[90dvw]`},{size:`auto`,direction:`right`,className:`komc:w-auto komc:max-w-[90dvw]`}]});function c({isOpen:e,onClose:a,direction:c=`bottom`,size:l=`full`,children:u,className:d,closeOnBackdropClick:f=!0,zIndex:p=1001}){let m=t.o(e,300),[h,g]=(0,r.useState)(!1);(0,r.useEffect)(()=>{if(e&&m){let e=setTimeout(()=>g(!0),10);return()=>clearTimeout(e)}else e||g(!1)},[e,m]);let _=(0,r.useCallback)(e=>{e.key===`Escape`&&a()},[a]),v=(0,r.useCallback)(()=>{f&&a()},[f,a]);return(0,r.useEffect)(()=>(e?(document.addEventListener(`keydown`,_),document.body.style.overflow=`hidden`):document.body.style.overflow=`unset`,()=>{document.removeEventListener(`keydown`,_),document.body.style.overflow=`unset`}),[e,_]),m?(0,i.jsxs)(`div`,{className:`komc:fixed komc:inset-0 komc:flex komc:justify-center komc:items-center`,style:{zIndex:p},children:[(0,i.jsx)(`button`,{type:`button`,"data-state":h?`open`:`closed`,className:(0,n.default)(`komc:absolute komc:inset-0 komc:w-full komc:h-full komc:bg-black/40 komc:cursor-default`,`komc:transition-opacity komc:duration-300 komc:ease-in-out`,`komc:opacity-0 komc:data-[state=open]:opacity-100`),onClick:v,"aria-label":`close sheet`}),(0,i.jsx)(`div`,{"data-state":h?`open`:`closed`,className:(0,n.default)(o({direction:c,className:d}),s({direction:c,size:l})),role:`dialog`,"aria-modal":`true`,children:u})]}):null}exports.Sheet=c;
1
+ "use client";const e=require(`../../chunk-Bmb41Sf3.cjs`);require(`../../src-6KfzqI9Z.cjs`),require(`../../file-5mweNdAM.cjs`),require(`../../use-drag-resize-DeDqPC4h.cjs`);const t=require(`../../common-B8HXyhZa.cjs`),n=require(`../../use-dialog-stack-YiLs-sNf.cjs`);require(`../../api-client-C3o2pO0q.cjs`),require(`../../use-subset-image-o_gmC1HL.cjs`);let r=require(`react`);r=e.t(r);let i=require(`react/jsx-runtime`),a=require(`clsx`);a=e.t(a);let o=require(`class-variance-authority`);const s=(0,o.cva)((0,a.default)(`komc:absolute komc:bg-white komc:flex komc:flex-col komc:shadow-2xl`,`komc:transition-transform komc:duration-300 komc:ease-in-out`),{variants:{direction:{top:`komc:top-0 komc:left-0 komc:right-0 komc:-translate-y-full komc:data-[state=open]:translate-y-0`,bottom:`komc:bottom-0 komc:left-0 komc:right-0 komc:translate-y-full komc:data-[state=open]:translate-y-0`,left:`komc:top-0 komc:bottom-0 komc:left-0 komc:-translate-x-full komc:data-[state=open]:translate-x-0`,right:`komc:top-0 komc:bottom-0 komc:right-0 komc:translate-x-full komc:data-[state=open]:translate-x-0`}}}),c=(0,o.cva)(``,{variants:{size:{full:``,half:``,auto:``},direction:{top:``,bottom:``,left:``,right:``}},compoundVariants:[{size:`full`,direction:`top`,className:`komc:h-full`},{size:`full`,direction:`bottom`,className:`komc:h-full`},{size:`full`,direction:`left`,className:`komc:w-full`},{size:`full`,direction:`right`,className:`komc:w-full`},{size:`half`,direction:`top`,className:`komc:h-[50dvh]`},{size:`half`,direction:`bottom`,className:`komc:h-[50dvh]`},{size:`half`,direction:`left`,className:`komc:w-[50dvw]`},{size:`half`,direction:`right`,className:`komc:w-[50dvw]`},{size:`auto`,direction:`top`,className:`komc:h-auto komc:max-h-[90dvh]`},{size:`auto`,direction:`bottom`,className:`komc:h-auto komc:max-h-[90dvh]`},{size:`auto`,direction:`left`,className:`komc:w-auto komc:max-w-[90dvw]`},{size:`auto`,direction:`right`,className:`komc:w-auto komc:max-w-[90dvw]`}]});function l({isOpen:e,onClose:o,direction:l=`bottom`,size:u=`full`,children:d,className:f,closeOnBackdropClick:p=!0,zIndex:m=1001}){let h=t.l(e,300),[g,_]=(0,r.useState)(!1);n.t(e,o),(0,r.useEffect)(()=>{if(e&&h){let e=setTimeout(()=>_(!0),10);return()=>clearTimeout(e)}else e||_(!1)},[e,h]);let v=(0,r.useCallback)(()=>{p&&o()},[p,o]);return h?(0,i.jsxs)(`div`,{"data-komc":!0,className:`komc:fixed komc:inset-0 komc:flex komc:justify-center komc:items-center`,style:{zIndex:m},children:[(0,i.jsx)(`button`,{type:`button`,"data-state":g?`open`:`closed`,className:(0,a.default)(`komc:absolute komc:inset-0 komc:w-full komc:h-full komc:bg-black/40 komc:cursor-default`,`komc:transition-opacity komc:duration-300 komc:ease-in-out`,`komc:opacity-0 komc:data-[state=open]:opacity-100`),onClick:v,"aria-label":`close sheet`}),(0,i.jsx)(`div`,{"data-state":g?`open`:`closed`,className:(0,a.default)(s({direction:l,className:f}),c({direction:l,size:u})),role:`dialog`,"aria-modal":`true`,children:d})]}):null}exports.Sheet=l;
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import * as react_jsx_runtime0 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime2 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/ui/sheet/sheet.d.ts
5
5
  type Direction = 'top' | 'bottom' | 'left' | 'right';
@@ -23,6 +23,6 @@ declare function Sheet({
23
23
  className,
24
24
  closeOnBackdropClick,
25
25
  zIndex
26
- }: SheetProps): react_jsx_runtime0.JSX.Element | null;
26
+ }: SheetProps): react_jsx_runtime2.JSX.Element | null;
27
27
  //#endregion
28
28
  export { Sheet, type SheetProps };
@@ -1 +1 @@
1
- "use client";import"../../src-CukOR3K2.mjs";import"../../file-DShNxIW4.mjs";import{o as e}from"../../hooks-C9rXWkfW.mjs";import"../../providers-zftmvT1z.mjs";import"../../use-subset-image-D8ssrZhj.mjs";import t from"clsx";import n,{useCallback as r,useEffect as i,useState as a}from"react";import{jsx as o,jsxs as s}from"react/jsx-runtime";import{cva as c}from"class-variance-authority";const l=c(t(`komc:absolute komc:bg-white komc:flex komc:flex-col komc:shadow-2xl`,`komc:transition-transform komc:duration-300 komc:ease-in-out`),{variants:{direction:{top:`komc:top-0 komc:left-0 komc:right-0 komc:-translate-y-full komc:data-[state=open]:translate-y-0`,bottom:`komc:bottom-0 komc:left-0 komc:right-0 komc:translate-y-full komc:data-[state=open]:translate-y-0`,left:`komc:top-0 komc:bottom-0 komc:left-0 komc:-translate-x-full komc:data-[state=open]:translate-x-0`,right:`komc:top-0 komc:bottom-0 komc:right-0 komc:translate-x-full komc:data-[state=open]:translate-x-0`}}}),u=c(``,{variants:{size:{full:``,half:``,auto:``},direction:{top:``,bottom:``,left:``,right:``}},compoundVariants:[{size:`full`,direction:`top`,className:`komc:h-full`},{size:`full`,direction:`bottom`,className:`komc:h-full`},{size:`full`,direction:`left`,className:`komc:w-full`},{size:`full`,direction:`right`,className:`komc:w-full`},{size:`half`,direction:`top`,className:`komc:h-[50dvh]`},{size:`half`,direction:`bottom`,className:`komc:h-[50dvh]`},{size:`half`,direction:`left`,className:`komc:w-[50dvw]`},{size:`half`,direction:`right`,className:`komc:w-[50dvw]`},{size:`auto`,direction:`top`,className:`komc:h-auto komc:max-h-[90dvh]`},{size:`auto`,direction:`bottom`,className:`komc:h-auto komc:max-h-[90dvh]`},{size:`auto`,direction:`left`,className:`komc:w-auto komc:max-w-[90dvw]`},{size:`auto`,direction:`right`,className:`komc:w-auto komc:max-w-[90dvw]`}]});function d({isOpen:n,onClose:c,direction:d=`bottom`,size:f=`full`,children:p,className:m,closeOnBackdropClick:h=!0,zIndex:g=1001}){let _=e(n,300),[v,y]=a(!1);i(()=>{if(n&&_){let e=setTimeout(()=>y(!0),10);return()=>clearTimeout(e)}else n||y(!1)},[n,_]);let b=r(e=>{e.key===`Escape`&&c()},[c]),x=r(()=>{h&&c()},[h,c]);return i(()=>(n?(document.addEventListener(`keydown`,b),document.body.style.overflow=`hidden`):document.body.style.overflow=`unset`,()=>{document.removeEventListener(`keydown`,b),document.body.style.overflow=`unset`}),[n,b]),_?s(`div`,{className:`komc:fixed komc:inset-0 komc:flex komc:justify-center komc:items-center`,style:{zIndex:g},children:[o(`button`,{type:`button`,"data-state":v?`open`:`closed`,className:t(`komc:absolute komc:inset-0 komc:w-full komc:h-full komc:bg-black/40 komc:cursor-default`,`komc:transition-opacity komc:duration-300 komc:ease-in-out`,`komc:opacity-0 komc:data-[state=open]:opacity-100`),onClick:x,"aria-label":`close sheet`}),o(`div`,{"data-state":v?`open`:`closed`,className:t(l({direction:d,className:m}),u({direction:d,size:f})),role:`dialog`,"aria-modal":`true`,children:p})]}):null}export{d as Sheet};
1
+ "use client";import"../../src-CIMlbgv1.mjs";import"../../file-B-UJkabO.mjs";import"../../use-drag-resize-BdeLdulk.mjs";import{l as e}from"../../common-CWHkXe0F.mjs";import{t}from"../../use-dialog-stack-Crj8YWJl.mjs";import"../../api-client-C0sbSOQf.mjs";import"../../use-subset-image-Df2fCrtH.mjs";import n,{useCallback as r,useEffect as i,useState as a}from"react";import{jsx as o,jsxs as s}from"react/jsx-runtime";import c from"clsx";import{cva as l}from"class-variance-authority";const u=l(c(`komc:absolute komc:bg-white komc:flex komc:flex-col komc:shadow-2xl`,`komc:transition-transform komc:duration-300 komc:ease-in-out`),{variants:{direction:{top:`komc:top-0 komc:left-0 komc:right-0 komc:-translate-y-full komc:data-[state=open]:translate-y-0`,bottom:`komc:bottom-0 komc:left-0 komc:right-0 komc:translate-y-full komc:data-[state=open]:translate-y-0`,left:`komc:top-0 komc:bottom-0 komc:left-0 komc:-translate-x-full komc:data-[state=open]:translate-x-0`,right:`komc:top-0 komc:bottom-0 komc:right-0 komc:translate-x-full komc:data-[state=open]:translate-x-0`}}}),d=l(``,{variants:{size:{full:``,half:``,auto:``},direction:{top:``,bottom:``,left:``,right:``}},compoundVariants:[{size:`full`,direction:`top`,className:`komc:h-full`},{size:`full`,direction:`bottom`,className:`komc:h-full`},{size:`full`,direction:`left`,className:`komc:w-full`},{size:`full`,direction:`right`,className:`komc:w-full`},{size:`half`,direction:`top`,className:`komc:h-[50dvh]`},{size:`half`,direction:`bottom`,className:`komc:h-[50dvh]`},{size:`half`,direction:`left`,className:`komc:w-[50dvw]`},{size:`half`,direction:`right`,className:`komc:w-[50dvw]`},{size:`auto`,direction:`top`,className:`komc:h-auto komc:max-h-[90dvh]`},{size:`auto`,direction:`bottom`,className:`komc:h-auto komc:max-h-[90dvh]`},{size:`auto`,direction:`left`,className:`komc:w-auto komc:max-w-[90dvw]`},{size:`auto`,direction:`right`,className:`komc:w-auto komc:max-w-[90dvw]`}]});function f({isOpen:n,onClose:l,direction:f=`bottom`,size:p=`full`,children:m,className:h,closeOnBackdropClick:g=!0,zIndex:_=1001}){let v=e(n,300),[y,b]=a(!1);t(n,l),i(()=>{if(n&&v){let e=setTimeout(()=>b(!0),10);return()=>clearTimeout(e)}else n||b(!1)},[n,v]);let x=r(()=>{g&&l()},[g,l]);return v?s(`div`,{"data-komc":!0,className:`komc:fixed komc:inset-0 komc:flex komc:justify-center komc:items-center`,style:{zIndex:_},children:[o(`button`,{type:`button`,"data-state":y?`open`:`closed`,className:c(`komc:absolute komc:inset-0 komc:w-full komc:h-full komc:bg-black/40 komc:cursor-default`,`komc:transition-opacity komc:duration-300 komc:ease-in-out`,`komc:opacity-0 komc:data-[state=open]:opacity-100`),onClick:x,"aria-label":`close sheet`}),o(`div`,{"data-state":y?`open`:`closed`,className:c(u({direction:f,className:h}),d({direction:f,size:p})),role:`dialog`,"aria-modal":`true`,children:m})]}):null}export{f as Sheet};
@@ -0,0 +1 @@
1
+ "use client";const e=require(`../../chunk-Bmb41Sf3.cjs`);let t=require(`react`);t=e.t(t);let n=require(`react/jsx-runtime`),r=require(`clsx`);r=e.t(r);let i=require(`class-variance-authority`);const a=(0,i.cva)((0,r.default)(`komc:inline-flex komc:items-center`),{variants:{placement:{top:`komc:flex-col-reverse komc:gap-y-2.5`,bottom:`komc:flex-col komc:gap-y-2.5`,start:`komc:flex-row-reverse komc:gap-x-2`,end:`komc:flex-row komc:gap-x-2`},disabled:{false:`komc:cursor-pointer`,true:`komc:cursor-default komc:opacity-50`},checked:{false:`komc:[&>button]:bg-gray-300 komc:[&_span]:translate-x-0.5`,true:`komc:[&>button]:bg-blue-500 komc:[&_span]:translate-x-4.5`}},defaultVariants:{placement:`end`,disabled:!1,checked:!1}}),o=t.default.forwardRef(({label:e,placement:i=`end`,checked:o=!1,disabled:s=!1,onChange:c},l)=>{let u=(0,t.useId)(),d=()=>{s||c?.(!o)};return(0,n.jsxs)(`div`,{"data-komc":!0,className:(0,r.default)(a({placement:i,disabled:s,checked:o})),children:[(0,n.jsx)(`button`,{ref:l,id:u,type:`button`,role:`switch`,disabled:s,className:`komc:flex komc:items-center komc:rounded-full komc:transition komc:w-10 komc:h-6 komc:cursor-pointer komc:disabled:cursor-default`,"aria-checked":o,onClick:d,children:(0,n.jsx)(`span`,{className:`komc:size-5 komc:rounded-full komc:bg-white komc:transition komc:shadow-xs`})}),e?(0,n.jsx)(`label`,{htmlFor:u,className:`komc:text-xs komc:font-medium komc:text-neutral-500`,children:e}):null]})});exports.Switch=o;
@@ -0,0 +1,16 @@
1
+ import React from "react";
2
+
3
+ //#region src/ui/switch/switch.d.ts
4
+ type LabelPlacement = 'end' | 'start' | 'top' | 'bottom';
5
+ interface SwitchProps {
6
+ label?: string;
7
+ placement?: LabelPlacement;
8
+ checked?: boolean;
9
+ disabled?: boolean;
10
+ onChange?(checked: boolean): void;
11
+ }
12
+ /** @deprecated Use `SwitchProps`. */
13
+ type SwtichProps = SwitchProps;
14
+ declare const Switch: React.ForwardRefExoticComponent<SwitchProps & React.RefAttributes<HTMLButtonElement>>;
15
+ //#endregion
16
+ export { LabelPlacement, Switch, SwitchProps, SwtichProps };
@@ -0,0 +1,16 @@
1
+ import React from "react";
2
+
3
+ //#region src/ui/switch/switch.d.ts
4
+ type LabelPlacement = 'end' | 'start' | 'top' | 'bottom';
5
+ interface SwitchProps {
6
+ label?: string;
7
+ placement?: LabelPlacement;
8
+ checked?: boolean;
9
+ disabled?: boolean;
10
+ onChange?(checked: boolean): void;
11
+ }
12
+ /** @deprecated Use `SwitchProps`. */
13
+ type SwtichProps = SwitchProps;
14
+ declare const Switch: React.ForwardRefExoticComponent<SwitchProps & React.RefAttributes<HTMLButtonElement>>;
15
+ //#endregion
16
+ export { LabelPlacement, Switch, SwitchProps, SwtichProps };
@@ -0,0 +1 @@
1
+ "use client";import e,{useId as t}from"react";import{jsx as n,jsxs as r}from"react/jsx-runtime";import i from"clsx";import{cva as a}from"class-variance-authority";const o=a(i(`komc:inline-flex komc:items-center`),{variants:{placement:{top:`komc:flex-col-reverse komc:gap-y-2.5`,bottom:`komc:flex-col komc:gap-y-2.5`,start:`komc:flex-row-reverse komc:gap-x-2`,end:`komc:flex-row komc:gap-x-2`},disabled:{false:`komc:cursor-pointer`,true:`komc:cursor-default komc:opacity-50`},checked:{false:`komc:[&>button]:bg-gray-300 komc:[&_span]:translate-x-0.5`,true:`komc:[&>button]:bg-blue-500 komc:[&_span]:translate-x-4.5`}},defaultVariants:{placement:`end`,disabled:!1,checked:!1}}),s=e.forwardRef(({label:e,placement:a=`end`,checked:s=!1,disabled:c=!1,onChange:l},u)=>{let d=t(),f=()=>{c||l?.(!s)};return r(`div`,{"data-komc":!0,className:i(o({placement:a,disabled:c,checked:s})),children:[n(`button`,{ref:u,id:d,type:`button`,role:`switch`,disabled:c,className:`komc:flex komc:items-center komc:rounded-full komc:transition komc:w-10 komc:h-6 komc:cursor-pointer komc:disabled:cursor-default`,"aria-checked":s,onClick:f,children:n(`span`,{className:`komc:size-5 komc:rounded-full komc:bg-white komc:transition komc:shadow-xs`})}),e?n(`label`,{htmlFor:d,className:`komc:text-xs komc:font-medium komc:text-neutral-500`,children:e}):null]})});export{s as Switch};
@@ -1 +1 @@
1
- "use client";const e=require(`../../chunk-Bmb41Sf3.cjs`);require(`../../src-CjpmdVyv.cjs`);const t=require(`../../common-Bn0Ko6B7.cjs`);require(`../../file-5mweNdAM.cjs`);const n=require(`../../hooks--O5RcEJq.cjs`);require(`../../providers-CkXkdYcB.cjs`),require(`../../use-subset-image-DC86cg6O.cjs`);let r=require(`clsx`);r=e.t(r);let i=require(`react`),a=require(`react/jsx-runtime`),o=require(`class-variance-authority`),s=require(`react-dom`);function c({children:e,setOpen:t}){return(0,a.jsx)(`div`,{"data-komc":!0,className:(0,r.default)(`komc:inline-flex komc:shrink-0 komc:justify-center`,`komc:items-center komc:outline-none`),onMouseLeave:()=>t(!1),onMouseOver:()=>t(!0),onFocus:()=>t(!0),onBlur:()=>t(!1),onClick:()=>t(!0),children:e})}const l=(0,o.cva)(t.n(`komc:z-99 komc:w-max komc:max-w-70 komc:p-2 komc:rounded-md`,`komc:break-all komc:transition-opacity komc:duration-300 komc:bg-white`,`komc:drop-shadow-[0px_0.5px_3px_rgba(0,0,0,0.2)] komc:text-xs`),{variants:{portal:{true:`komc:fixed`,false:`komc:absolute`},placement:{top:``,bottom:``,"top-start":``,"top-end":``,"bottom-start":``,"bottom-end":``}},compoundVariants:[{portal:!0,placement:`top`,className:`komc:-translate-y-2`},{portal:!0,placement:`bottom`,className:`komc:translate-y-2`},{portal:!0,placement:`top-start`,className:`komc:-translate-y-2`},{portal:!0,placement:`top-end`,className:`komc:-translate-y-2`},{portal:!0,placement:`bottom-start`,className:`komc:translate-y-2`},{portal:!0,placement:`bottom-end`,className:`komc:translate-y-2`},{portal:!1,placement:`top`,className:`komc:bottom-full komc:left-1/2 komc:-translate-x-1/2`},{portal:!1,placement:`bottom`,className:`komc:top-full komc:left-1/2 komc:-translate-x-1/2`},{portal:!1,placement:`top-start`,className:`komc:bottom-full komc:left-0`},{portal:!1,placement:`top-end`,className:`komc:bottom-full komc:right-0`},{portal:!1,placement:`bottom-start`,className:`komc:top-full komc:left-0`},{portal:!1,placement:`bottom-end`,className:`komc:top-full komc:right-0`}],defaultVariants:{placement:`top`,portal:!1}}),u=(0,i.forwardRef)(({portal:e,children:t,className:n,placement:r,...i},o)=>(0,a.jsx)(`div`,{ref:o,"data-komc":!0,role:`tooltip`,className:l({portal:e,placement:r,className:n}),...i,children:t}));var d=u;const f=(0,o.cva)(t.n(`komc:absolute komc:w-2 komc:h-2 komc:bg-inherit`,`komc:transition-opacity komc:duration-300`),{variants:{placement:{top:t.n(`komc:top-full komc:-mt-1 komc:left-1/2`),bottom:t.n(`komc:bottom-full komc:-mb-1 komc:left-1/2`),"top-start":t.n(`komc:top-full komc:-mt-1 komc:left-5`),"top-end":t.n(`komc:top-full komc:-mt-1 komc:right-5`),"bottom-start":t.n(`komc:bottom-full komc:-mb-1 komc:left-5`),"bottom-end":t.n(`komc:bottom-full komc:-mb-1 komc:right-5`)}},defaultVariants:{placement:`top`}}),p=({placement:e,className:t,offset:n,...r})=>{let o=(0,i.useMemo)(()=>{switch(e){case`top`:case`top-start`:case`top-end`:return`rotate(45deg)`;case`bottom`:case`bottom-start`:case`bottom-end`:return`rotate(225deg)`;default:return`rotate(45deg)`}},[e]);return(0,a.jsx)(`div`,{className:f({placement:e,className:t}),style:{transform:`translate(${n?.x}px, ${n?.y}px) ${o}`},...r})};var m=p;const h=24,g=2,_=180,v=(e,t)=>{let[,n]=e.split(`-`);return n?`${t}-${n}`:t};function y({placement:e,className:t,content:n,open:o,hiddenRef:c,containerRef:l}){let[u,f]=(0,i.useState)(!1),[p,h]=(0,i.useState)(e),[g,_]=(0,i.useState)({top:0,left:0}),[y,b]=(0,i.useState)({x:0,y:0});(0,i.useEffect)(()=>{f(!0)},[]);let x=(0,i.useCallback)(()=>{let t=l.current,n=c.current;if(!t||!n)return;let r=t.getBoundingClientRect(),i=n.getBoundingClientRect(),a=e,[o]=a.split(`-`),s=r.top,u=window.innerHeight-r.bottom;o===`bottom`&&u<i.height&&s>=i.height?a=v(a,`top`):o===`top`&&s<i.height&&u>=i.height&&(a=v(a,`bottom`)),h(a);let[d,f]=a.split(`-`),p=r.top,m=r.left+r.width/2-i.width/2;switch(d){case`top`:p-=i.height;break;case`bottom`:p+=r.height;break}switch(f){case`start`:m+=i.width/2-24;break;case`end`:m-=i.width/2-24;break}let g=m,y=window.innerWidth;g+i.width>y-4&&(g=y-i.width-4),g<4&&(g=4),_({top:p,left:g}),b({x:m-g,y:0})},[e,l,c]);return(0,i.useEffect)(()=>{if(!u||!o)return;console.log(`updateLayout`);let e=!1,t=0,n=0,r=!1;x();let i=()=>{r||=(t=requestAnimationFrame(()=>{e||x(),r=!1}),!0)};window.addEventListener(`scroll`,i,{passive:!0}),window.addEventListener(`resize`,i);let a=0,s=0,c=``,d=()=>{if(e||a>=180)return;let t=l.current;if(t){let e=t.getBoundingClientRect(),n=`${e.top.toFixed(4)},${e.left.toFixed(4)},${e.width.toFixed(4)},${e.height.toFixed(4)}`;n===c?s+=1:(s=0,c=n,x())}s<2&&(a+=1,n=requestAnimationFrame(d))};return n=requestAnimationFrame(d),()=>{e=!0,cancelAnimationFrame(t),cancelAnimationFrame(n),window.removeEventListener(`scroll`,i),window.removeEventListener(`resize`,i)}},[u,o,x,l]),u?(0,s.createPortal)((0,a.jsxs)(d,{portal:!0,"data-komc":!0,placement:p,className:(0,r.default)(t,o?`komc:visible komc:opacity-100`:`komc:opacity-0 komc:invisible`),style:{...g},children:[(0,a.jsx)(`span`,{children:n}),(0,a.jsx)(m,{placement:p,offset:y})]}),document.body):null}const b=(0,i.forwardRef)(({children:e,content:t,defaultOpen:o=!1,className:s,placement:l=`top`})=>{let[u,f]=(0,i.useState)(o),p=(0,i.useRef)(null),m=(0,i.useRef)(null);return n.i({ref:p,setOpen:f}),(0,a.jsxs)(`div`,{ref:p,"data-komc":!0,className:`komc:flex komc:shrink-0 komc:relative komc:overflow-hidden komc:w-fit komc:h-fit`,children:[(0,a.jsx)(c,{setOpen:f,children:e}),(0,a.jsx)(y,{placement:l,className:s,open:u,content:t,hiddenRef:m,containerRef:p}),(0,a.jsx)(d,{ref:m,role:`presentation`,"aria-hidden":`true`,placement:l,className:(0,r.default)(`komc:opacity-0 komc:invisible`,s),children:(0,a.jsx)(`span`,{children:t})})]})});var x=b;exports.Tooltip=x;
1
+ "use client";const e=require(`../../chunk-Bmb41Sf3.cjs`);require(`../../src-6KfzqI9Z.cjs`);const t=require(`../../common-D4sUwkFd.cjs`);require(`../../file-5mweNdAM.cjs`),require(`../../use-drag-resize-DeDqPC4h.cjs`);const n=require(`../../common-B8HXyhZa.cjs`);require(`../../use-dialog-stack-YiLs-sNf.cjs`),require(`../../api-client-C3o2pO0q.cjs`),require(`../../use-subset-image-o_gmC1HL.cjs`);let r=require(`react`),i=require(`react/jsx-runtime`),a=require(`clsx`);a=e.t(a);let o=require(`class-variance-authority`),s=require(`react-dom`);function c({children:e,setOpen:t}){return(0,i.jsx)(`div`,{"data-komc":!0,className:(0,a.default)(`komc:inline-flex komc:shrink-0 komc:justify-center`,`komc:items-center komc:outline-none`),onMouseLeave:()=>t(!1),onMouseOver:()=>t(!0),onFocus:()=>t(!0),onBlur:()=>t(!1),onClick:()=>t(!0),children:e})}const l=(0,o.cva)(t.n(`komc:z-99 komc:w-max komc:max-w-70 komc:p-2 komc:rounded-md`,`komc:break-all komc:transition-opacity komc:duration-300 komc:bg-white`,`komc:drop-shadow-[0px_0.5px_3px_rgba(0,0,0,0.2)] komc:text-xs`),{variants:{portal:{true:`komc:fixed`,false:`komc:absolute`},placement:{top:``,bottom:``,"top-start":``,"top-end":``,"bottom-start":``,"bottom-end":``}},compoundVariants:[{portal:!0,placement:`top`,className:`komc:-translate-y-2`},{portal:!0,placement:`bottom`,className:`komc:translate-y-2`},{portal:!0,placement:`top-start`,className:`komc:-translate-y-2`},{portal:!0,placement:`top-end`,className:`komc:-translate-y-2`},{portal:!0,placement:`bottom-start`,className:`komc:translate-y-2`},{portal:!0,placement:`bottom-end`,className:`komc:translate-y-2`},{portal:!1,placement:`top`,className:`komc:bottom-full komc:left-1/2 komc:-translate-x-1/2`},{portal:!1,placement:`bottom`,className:`komc:top-full komc:left-1/2 komc:-translate-x-1/2`},{portal:!1,placement:`top-start`,className:`komc:bottom-full komc:left-0`},{portal:!1,placement:`top-end`,className:`komc:bottom-full komc:right-0`},{portal:!1,placement:`bottom-start`,className:`komc:top-full komc:left-0`},{portal:!1,placement:`bottom-end`,className:`komc:top-full komc:right-0`}],defaultVariants:{placement:`top`,portal:!1}}),u=(0,r.forwardRef)(({portal:e,children:t,className:n,placement:r,...a},o)=>(0,i.jsx)(`div`,{ref:o,"data-komc":!0,role:`tooltip`,className:l({portal:e,placement:r,className:n}),...a,children:t}));var d=u;const f=(0,o.cva)(t.n(`komc:absolute komc:w-2 komc:h-2 komc:bg-inherit`,`komc:transition-opacity komc:duration-300`),{variants:{placement:{top:t.n(`komc:top-full komc:-mt-1 komc:left-1/2`),bottom:t.n(`komc:bottom-full komc:-mb-1 komc:left-1/2`),"top-start":t.n(`komc:top-full komc:-mt-1 komc:left-5`),"top-end":t.n(`komc:top-full komc:-mt-1 komc:right-5`),"bottom-start":t.n(`komc:bottom-full komc:-mb-1 komc:left-5`),"bottom-end":t.n(`komc:bottom-full komc:-mb-1 komc:right-5`)}},defaultVariants:{placement:`top`}}),p=({placement:e,className:t,offset:n,...a})=>{let o=(0,r.useMemo)(()=>{switch(e){case`top`:case`top-start`:case`top-end`:return`rotate(45deg)`;case`bottom`:case`bottom-start`:case`bottom-end`:return`rotate(225deg)`;default:return`rotate(45deg)`}},[e]);return(0,i.jsx)(`div`,{className:f({placement:e,className:t}),style:{transform:`translate(${n?.x}px, ${n?.y}px) ${o}`},...a})};var m=p;const h=24,g=2,_=180,v=(e,t)=>{let[,n]=e.split(`-`);return n?`${t}-${n}`:t};function y({placement:e,className:t,content:n,open:o,hiddenRef:c,containerRef:l}){let[u,f]=(0,r.useState)(!1),[p,h]=(0,r.useState)(e),[g,_]=(0,r.useState)({top:0,left:0}),[y,b]=(0,r.useState)({x:0,y:0});(0,r.useEffect)(()=>{f(!0)},[]);let x=(0,r.useCallback)(()=>{let t=l.current,n=c.current;if(!t||!n)return;let r=t.getBoundingClientRect(),i=n.getBoundingClientRect(),a=e,[o]=a.split(`-`),s=r.top,u=window.innerHeight-r.bottom;o===`bottom`&&u<i.height&&s>=i.height?a=v(a,`top`):o===`top`&&s<i.height&&u>=i.height&&(a=v(a,`bottom`)),h(a);let[d,f]=a.split(`-`),p=r.top,m=r.left+r.width/2-i.width/2;switch(d){case`top`:p-=i.height;break;case`bottom`:p+=r.height;break}switch(f){case`start`:m+=i.width/2-24;break;case`end`:m-=i.width/2-24;break}let g=m,y=window.innerWidth;g+i.width>y-4&&(g=y-i.width-4),g<4&&(g=4),_({top:p,left:g}),b({x:m-g,y:0})},[e,l,c]);return(0,r.useEffect)(()=>{if(!u||!o)return;console.log(`updateLayout`);let e=!1,t=0,n=0,r=!1;x();let i=()=>{r||=(t=requestAnimationFrame(()=>{e||x(),r=!1}),!0)};window.addEventListener(`scroll`,i,{passive:!0}),window.addEventListener(`resize`,i);let a=0,s=0,c=``,d=()=>{if(e||a>=180)return;let t=l.current;if(t){let e=t.getBoundingClientRect(),n=`${e.top.toFixed(4)},${e.left.toFixed(4)},${e.width.toFixed(4)},${e.height.toFixed(4)}`;n===c?s+=1:(s=0,c=n,x())}s<2&&(a+=1,n=requestAnimationFrame(d))};return n=requestAnimationFrame(d),()=>{e=!0,cancelAnimationFrame(t),cancelAnimationFrame(n),window.removeEventListener(`scroll`,i),window.removeEventListener(`resize`,i)}},[u,o,x,l]),u?(0,s.createPortal)((0,i.jsxs)(d,{portal:!0,"data-komc":!0,placement:p,className:(0,a.default)(t,o?`komc:visible komc:opacity-100`:`komc:opacity-0 komc:invisible`),style:{...g},children:[(0,i.jsx)(`span`,{children:n}),(0,i.jsx)(m,{placement:p,offset:y})]}),document.body):null}const b=(0,r.forwardRef)(({children:e,content:t,defaultOpen:o=!1,className:s,placement:l=`top`})=>{let[u,f]=(0,r.useState)(o),p=(0,r.useRef)(null),m=(0,r.useRef)(null);return n.a({ref:p,setOpen:f}),(0,i.jsxs)(`div`,{ref:p,"data-komc":!0,className:`komc:flex komc:shrink-0 komc:relative komc:overflow-hidden komc:w-fit komc:h-fit`,children:[(0,i.jsx)(c,{setOpen:f,children:e}),(0,i.jsx)(y,{placement:l,className:s,open:u,content:t,hiddenRef:m,containerRef:p}),(0,i.jsx)(d,{ref:m,role:`presentation`,"aria-hidden":`true`,placement:l,className:(0,a.default)(`komc:opacity-0 komc:invisible`,s),children:(0,i.jsx)(`span`,{children:t})})]})});var x=b;exports.Tooltip=x;
@@ -1,4 +1,4 @@
1
- import * as react5 from "react";
1
+ import * as react10 from "react";
2
2
  import { HTMLAttributes } from "react";
3
3
 
4
4
  //#region src/ui/tooltip/tooltip-container.d.ts
@@ -11,6 +11,6 @@ interface TooltipContainerProps extends HTMLAttributes<HTMLDivElement> {
11
11
  placement?: TooltipPlacement;
12
12
  defaultOpen?: boolean;
13
13
  }
14
- declare const TooltipContainer: react5.ForwardRefExoticComponent<TooltipContainerProps & react5.RefAttributes<HTMLDivElement>>;
14
+ declare const TooltipContainer: react10.ForwardRefExoticComponent<TooltipContainerProps & react10.RefAttributes<HTMLDivElement>>;
15
15
  //#endregion
16
16
  export { TooltipContainer as Tooltip, type TooltipContainerProps as TooltipProps };
@@ -1 +1 @@
1
- "use client";import"../../src-CukOR3K2.mjs";import{n as e}from"../../common-Df03Ovdm.mjs";import"../../file-DShNxIW4.mjs";import{i as t}from"../../hooks-C9rXWkfW.mjs";import"../../providers-zftmvT1z.mjs";import"../../use-subset-image-D8ssrZhj.mjs";import n from"clsx";import{forwardRef as r,useCallback as i,useEffect as a,useMemo as o,useRef as s,useState as c}from"react";import{jsx as l,jsxs as u}from"react/jsx-runtime";import{cva as d}from"class-variance-authority";import{createPortal as f}from"react-dom";function p({children:e,setOpen:t}){return l(`div`,{"data-komc":!0,className:n(`komc:inline-flex komc:shrink-0 komc:justify-center`,`komc:items-center komc:outline-none`),onMouseLeave:()=>t(!1),onMouseOver:()=>t(!0),onFocus:()=>t(!0),onBlur:()=>t(!1),onClick:()=>t(!0),children:e})}const m=d(e(`komc:z-99 komc:w-max komc:max-w-70 komc:p-2 komc:rounded-md`,`komc:break-all komc:transition-opacity komc:duration-300 komc:bg-white`,`komc:drop-shadow-[0px_0.5px_3px_rgba(0,0,0,0.2)] komc:text-xs`),{variants:{portal:{true:`komc:fixed`,false:`komc:absolute`},placement:{top:``,bottom:``,"top-start":``,"top-end":``,"bottom-start":``,"bottom-end":``}},compoundVariants:[{portal:!0,placement:`top`,className:`komc:-translate-y-2`},{portal:!0,placement:`bottom`,className:`komc:translate-y-2`},{portal:!0,placement:`top-start`,className:`komc:-translate-y-2`},{portal:!0,placement:`top-end`,className:`komc:-translate-y-2`},{portal:!0,placement:`bottom-start`,className:`komc:translate-y-2`},{portal:!0,placement:`bottom-end`,className:`komc:translate-y-2`},{portal:!1,placement:`top`,className:`komc:bottom-full komc:left-1/2 komc:-translate-x-1/2`},{portal:!1,placement:`bottom`,className:`komc:top-full komc:left-1/2 komc:-translate-x-1/2`},{portal:!1,placement:`top-start`,className:`komc:bottom-full komc:left-0`},{portal:!1,placement:`top-end`,className:`komc:bottom-full komc:right-0`},{portal:!1,placement:`bottom-start`,className:`komc:top-full komc:left-0`},{portal:!1,placement:`bottom-end`,className:`komc:top-full komc:right-0`}],defaultVariants:{placement:`top`,portal:!1}});var h=r(({portal:e,children:t,className:n,placement:r,...i},a)=>l(`div`,{ref:a,"data-komc":!0,role:`tooltip`,className:m({portal:e,placement:r,className:n}),...i,children:t}));const g=d(e(`komc:absolute komc:w-2 komc:h-2 komc:bg-inherit`,`komc:transition-opacity komc:duration-300`),{variants:{placement:{top:e(`komc:top-full komc:-mt-1 komc:left-1/2`),bottom:e(`komc:bottom-full komc:-mb-1 komc:left-1/2`),"top-start":e(`komc:top-full komc:-mt-1 komc:left-5`),"top-end":e(`komc:top-full komc:-mt-1 komc:right-5`),"bottom-start":e(`komc:bottom-full komc:-mb-1 komc:left-5`),"bottom-end":e(`komc:bottom-full komc:-mb-1 komc:right-5`)}},defaultVariants:{placement:`top`}});var _=({placement:e,className:t,offset:n,...r})=>{let i=o(()=>{switch(e){case`top`:case`top-start`:case`top-end`:return`rotate(45deg)`;case`bottom`:case`bottom-start`:case`bottom-end`:return`rotate(225deg)`;default:return`rotate(45deg)`}},[e]);return l(`div`,{className:g({placement:e,className:t}),style:{transform:`translate(${n?.x}px, ${n?.y}px) ${i}`},...r})};const v=(e,t)=>{let[,n]=e.split(`-`);return n?`${t}-${n}`:t};function y({placement:e,className:t,content:r,open:o,hiddenRef:s,containerRef:d}){let[p,m]=c(!1),[g,y]=c(e),[b,x]=c({top:0,left:0}),[S,C]=c({x:0,y:0});a(()=>{m(!0)},[]);let w=i(()=>{let t=d.current,n=s.current;if(!t||!n)return;let r=t.getBoundingClientRect(),i=n.getBoundingClientRect(),a=e,[o]=a.split(`-`),c=r.top,l=window.innerHeight-r.bottom;o===`bottom`&&l<i.height&&c>=i.height?a=v(a,`top`):o===`top`&&c<i.height&&l>=i.height&&(a=v(a,`bottom`)),y(a);let[u,f]=a.split(`-`),p=r.top,m=r.left+r.width/2-i.width/2;switch(u){case`top`:p-=i.height;break;case`bottom`:p+=r.height;break}switch(f){case`start`:m+=i.width/2-24;break;case`end`:m-=i.width/2-24;break}let h=m,g=window.innerWidth;h+i.width>g-4&&(h=g-i.width-4),h<4&&(h=4),x({top:p,left:h}),C({x:m-h,y:0})},[e,d,s]);return a(()=>{if(!p||!o)return;console.log(`updateLayout`);let e=!1,t=0,n=0,r=!1;w();let i=()=>{r||=(t=requestAnimationFrame(()=>{e||w(),r=!1}),!0)};window.addEventListener(`scroll`,i,{passive:!0}),window.addEventListener(`resize`,i);let a=0,s=0,c=``,l=()=>{if(e||a>=180)return;let t=d.current;if(t){let e=t.getBoundingClientRect(),n=`${e.top.toFixed(4)},${e.left.toFixed(4)},${e.width.toFixed(4)},${e.height.toFixed(4)}`;n===c?s+=1:(s=0,c=n,w())}s<2&&(a+=1,n=requestAnimationFrame(l))};return n=requestAnimationFrame(l),()=>{e=!0,cancelAnimationFrame(t),cancelAnimationFrame(n),window.removeEventListener(`scroll`,i),window.removeEventListener(`resize`,i)}},[p,o,w,d]),p?f(u(h,{portal:!0,"data-komc":!0,placement:g,className:n(t,o?`komc:visible komc:opacity-100`:`komc:opacity-0 komc:invisible`),style:{...b},children:[l(`span`,{children:r}),l(_,{placement:g,offset:S})]}),document.body):null}var b=r(({children:e,content:r,defaultOpen:i=!1,className:a,placement:o=`top`})=>{let[d,f]=c(i),m=s(null),g=s(null);return t({ref:m,setOpen:f}),u(`div`,{ref:m,"data-komc":!0,className:`komc:flex komc:shrink-0 komc:relative komc:overflow-hidden komc:w-fit komc:h-fit`,children:[l(p,{setOpen:f,children:e}),l(y,{placement:o,className:a,open:d,content:r,hiddenRef:g,containerRef:m}),l(h,{ref:g,role:`presentation`,"aria-hidden":`true`,placement:o,className:n(`komc:opacity-0 komc:invisible`,a),children:l(`span`,{children:r})})]})});export{b as Tooltip};
1
+ "use client";import"../../src-CIMlbgv1.mjs";import{n as e}from"../../common-ZUMpASnc.mjs";import"../../file-B-UJkabO.mjs";import"../../use-drag-resize-BdeLdulk.mjs";import{a as t}from"../../common-CWHkXe0F.mjs";import"../../use-dialog-stack-Crj8YWJl.mjs";import"../../api-client-C0sbSOQf.mjs";import"../../use-subset-image-Df2fCrtH.mjs";import{forwardRef as n,useCallback as r,useEffect as i,useMemo as a,useRef as o,useState as s}from"react";import{jsx as c,jsxs as l}from"react/jsx-runtime";import u from"clsx";import{cva as d}from"class-variance-authority";import{createPortal as f}from"react-dom";function p({children:e,setOpen:t}){return c(`div`,{"data-komc":!0,className:u(`komc:inline-flex komc:shrink-0 komc:justify-center`,`komc:items-center komc:outline-none`),onMouseLeave:()=>t(!1),onMouseOver:()=>t(!0),onFocus:()=>t(!0),onBlur:()=>t(!1),onClick:()=>t(!0),children:e})}const m=d(e(`komc:z-99 komc:w-max komc:max-w-70 komc:p-2 komc:rounded-md`,`komc:break-all komc:transition-opacity komc:duration-300 komc:bg-white`,`komc:drop-shadow-[0px_0.5px_3px_rgba(0,0,0,0.2)] komc:text-xs`),{variants:{portal:{true:`komc:fixed`,false:`komc:absolute`},placement:{top:``,bottom:``,"top-start":``,"top-end":``,"bottom-start":``,"bottom-end":``}},compoundVariants:[{portal:!0,placement:`top`,className:`komc:-translate-y-2`},{portal:!0,placement:`bottom`,className:`komc:translate-y-2`},{portal:!0,placement:`top-start`,className:`komc:-translate-y-2`},{portal:!0,placement:`top-end`,className:`komc:-translate-y-2`},{portal:!0,placement:`bottom-start`,className:`komc:translate-y-2`},{portal:!0,placement:`bottom-end`,className:`komc:translate-y-2`},{portal:!1,placement:`top`,className:`komc:bottom-full komc:left-1/2 komc:-translate-x-1/2`},{portal:!1,placement:`bottom`,className:`komc:top-full komc:left-1/2 komc:-translate-x-1/2`},{portal:!1,placement:`top-start`,className:`komc:bottom-full komc:left-0`},{portal:!1,placement:`top-end`,className:`komc:bottom-full komc:right-0`},{portal:!1,placement:`bottom-start`,className:`komc:top-full komc:left-0`},{portal:!1,placement:`bottom-end`,className:`komc:top-full komc:right-0`}],defaultVariants:{placement:`top`,portal:!1}});var h=n(({portal:e,children:t,className:n,placement:r,...i},a)=>c(`div`,{ref:a,"data-komc":!0,role:`tooltip`,className:m({portal:e,placement:r,className:n}),...i,children:t}));const g=d(e(`komc:absolute komc:w-2 komc:h-2 komc:bg-inherit`,`komc:transition-opacity komc:duration-300`),{variants:{placement:{top:e(`komc:top-full komc:-mt-1 komc:left-1/2`),bottom:e(`komc:bottom-full komc:-mb-1 komc:left-1/2`),"top-start":e(`komc:top-full komc:-mt-1 komc:left-5`),"top-end":e(`komc:top-full komc:-mt-1 komc:right-5`),"bottom-start":e(`komc:bottom-full komc:-mb-1 komc:left-5`),"bottom-end":e(`komc:bottom-full komc:-mb-1 komc:right-5`)}},defaultVariants:{placement:`top`}});var _=({placement:e,className:t,offset:n,...r})=>{let i=a(()=>{switch(e){case`top`:case`top-start`:case`top-end`:return`rotate(45deg)`;case`bottom`:case`bottom-start`:case`bottom-end`:return`rotate(225deg)`;default:return`rotate(45deg)`}},[e]);return c(`div`,{className:g({placement:e,className:t}),style:{transform:`translate(${n?.x}px, ${n?.y}px) ${i}`},...r})};const v=(e,t)=>{let[,n]=e.split(`-`);return n?`${t}-${n}`:t};function y({placement:e,className:t,content:n,open:a,hiddenRef:o,containerRef:d}){let[p,m]=s(!1),[g,y]=s(e),[b,x]=s({top:0,left:0}),[S,C]=s({x:0,y:0});i(()=>{m(!0)},[]);let w=r(()=>{let t=d.current,n=o.current;if(!t||!n)return;let r=t.getBoundingClientRect(),i=n.getBoundingClientRect(),a=e,[s]=a.split(`-`),c=r.top,l=window.innerHeight-r.bottom;s===`bottom`&&l<i.height&&c>=i.height?a=v(a,`top`):s===`top`&&c<i.height&&l>=i.height&&(a=v(a,`bottom`)),y(a);let[u,f]=a.split(`-`),p=r.top,m=r.left+r.width/2-i.width/2;switch(u){case`top`:p-=i.height;break;case`bottom`:p+=r.height;break}switch(f){case`start`:m+=i.width/2-24;break;case`end`:m-=i.width/2-24;break}let h=m,g=window.innerWidth;h+i.width>g-4&&(h=g-i.width-4),h<4&&(h=4),x({top:p,left:h}),C({x:m-h,y:0})},[e,d,o]);return i(()=>{if(!p||!a)return;console.log(`updateLayout`);let e=!1,t=0,n=0,r=!1;w();let i=()=>{r||=(t=requestAnimationFrame(()=>{e||w(),r=!1}),!0)};window.addEventListener(`scroll`,i,{passive:!0}),window.addEventListener(`resize`,i);let o=0,s=0,c=``,l=()=>{if(e||o>=180)return;let t=d.current;if(t){let e=t.getBoundingClientRect(),n=`${e.top.toFixed(4)},${e.left.toFixed(4)},${e.width.toFixed(4)},${e.height.toFixed(4)}`;n===c?s+=1:(s=0,c=n,w())}s<2&&(o+=1,n=requestAnimationFrame(l))};return n=requestAnimationFrame(l),()=>{e=!0,cancelAnimationFrame(t),cancelAnimationFrame(n),window.removeEventListener(`scroll`,i),window.removeEventListener(`resize`,i)}},[p,a,w,d]),p?f(l(h,{portal:!0,"data-komc":!0,placement:g,className:u(t,a?`komc:visible komc:opacity-100`:`komc:opacity-0 komc:invisible`),style:{...b},children:[c(`span`,{children:n}),c(_,{placement:g,offset:S})]}),document.body):null}var b=n(({children:e,content:n,defaultOpen:r=!1,className:i,placement:a=`top`})=>{let[d,f]=s(r),m=o(null),g=o(null);return t({ref:m,setOpen:f}),l(`div`,{ref:m,"data-komc":!0,className:`komc:flex komc:shrink-0 komc:relative komc:overflow-hidden komc:w-fit komc:h-fit`,children:[c(p,{setOpen:f,children:e}),c(y,{placement:a,className:i,open:d,content:n,hiddenRef:g,containerRef:m}),c(h,{ref:g,role:`presentation`,"aria-hidden":`true`,placement:a,className:u(`komc:opacity-0 komc:invisible`,i),children:c(`span`,{children:n})})]})});export{b as Tooltip};
@@ -0,0 +1 @@
1
+ const e=require(`./chunk-Bmb41Sf3.cjs`),t=require(`./common-D4sUwkFd.cjs`);let n=require(`react`);n=e.t(n);let r=require(`react/jsx-runtime`),i=require(`clsx`);i=e.t(i);let a=require(`class-variance-authority`);function o({className:e,items:t,render:a,...o}){return(0,r.jsx)(`nav`,{"data-komc":!0,"aria-label":`bottom app bar`,className:(0,i.default)(`komc:fixed komc:bottom-0 komc:left-0 komc:right-0`,`komc:border-t komc:border-neutral-200 komc:bg-white komc:z-10`,e),...o,children:(0,r.jsx)(`div`,{className:`komc:grid komc:min-h-15`,style:{gridTemplateColumns:`repeat(${t.length}, 1fr)`},children:t.map((e,t)=>(0,r.jsx)(n.default.Fragment,{children:a(e)},t))})})}function s({condition:e,wrapper:t,children:n}){return e?t(n):n}function c({condition:e,trueWrapper:t,falseWrapper:n,children:r}){return e?t(r):n(r)}const l=(0,a.cva)(t.n(`komc:flex komc:items-center komc:w-full komc:px-2`,`komc:[&>input]:outline-none komc:[&>input]:w-full`,`komc:[&>input]:focus:ring-0 komc:[&>input]:focus:ring-offset-0`,`komc:[&>input]:h-full`),{variants:{size:{xs:`komc:h-7.5`,sm:`komc:h-8`,base:`komc:h-9`,md:`komc:h-10`,lg:`komc:h-11`,xl:`komc:h-12`,"2xl":`komc:h-13`,"3xl":`komc:h-14`},gap:{none:`komc:gap-0`,xs:`komc:gap-1`,sm:`komc:gap-2`,md:`komc:gap-3`,lg:`komc:gap-4`,xl:`komc:gap-5`},outline:{line:`komc:border`,solid:`komc:border-transparent`,clear:`komc:border-none`,dashed:`komc:border-dashed`,dotted:`komc:border-dotted`},rounded:{none:`komc:rounded-none`,sm:`komc:rounded-sm`,md:`komc:rounded-md`,lg:`komc:rounded-lg`,xl:`komc:rounded-xl`,"2xl":`komc:rounded-2xl`}}}),u=(0,n.forwardRef)(({prefix:e=null,surffix:t=null,size:n=`lg`,gap:i=`xl`,outline:a=`line`,rounded:o=`lg`,className:s,...c},u)=>(0,r.jsxs)(`div`,{"data-komc":!0,className:l({size:n,gap:i,outline:a,rounded:o,className:s}),children:[e,(0,r.jsx)(`input`,{ref:u,type:`text`,...c}),t]}));var d=u;function f({children:e,className:t,...n}){return(0,r.jsx)(`span`,{...n,"data-komc":!0,"data-text":`${e}`,className:(0,i.default)(`komc:inline-flex komc:flex-col komc:justify-center komc:items-center`,`komc:after:content-[attr(data-text)] komc:after:font-bold`,`komc:after:h-0 komc:after:invisible komc:after:overflow-hidden`,`komc:after:select-none komc:after:pointer-events-none`,t),children:e})}Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return f}});
@@ -0,0 +1 @@
1
+ import{n as e}from"./common-ZUMpASnc.mjs";import t,{forwardRef as n}from"react";import{jsx as r,jsxs as i}from"react/jsx-runtime";import a from"clsx";import{cva as o}from"class-variance-authority";function s({className:e,items:n,render:i,...o}){return r(`nav`,{"data-komc":!0,"aria-label":`bottom app bar`,className:a(`komc:fixed komc:bottom-0 komc:left-0 komc:right-0`,`komc:border-t komc:border-neutral-200 komc:bg-white komc:z-10`,e),...o,children:r(`div`,{className:`komc:grid komc:min-h-15`,style:{gridTemplateColumns:`repeat(${n.length}, 1fr)`},children:n.map((e,n)=>r(t.Fragment,{children:i(e)},n))})})}function c({condition:e,wrapper:t,children:n}){return e?t(n):n}function l({condition:e,trueWrapper:t,falseWrapper:n,children:r}){return e?t(r):n(r)}const u=o(e(`komc:flex komc:items-center komc:w-full komc:px-2`,`komc:[&>input]:outline-none komc:[&>input]:w-full`,`komc:[&>input]:focus:ring-0 komc:[&>input]:focus:ring-offset-0`,`komc:[&>input]:h-full`),{variants:{size:{xs:`komc:h-7.5`,sm:`komc:h-8`,base:`komc:h-9`,md:`komc:h-10`,lg:`komc:h-11`,xl:`komc:h-12`,"2xl":`komc:h-13`,"3xl":`komc:h-14`},gap:{none:`komc:gap-0`,xs:`komc:gap-1`,sm:`komc:gap-2`,md:`komc:gap-3`,lg:`komc:gap-4`,xl:`komc:gap-5`},outline:{line:`komc:border`,solid:`komc:border-transparent`,clear:`komc:border-none`,dashed:`komc:border-dashed`,dotted:`komc:border-dotted`},rounded:{none:`komc:rounded-none`,sm:`komc:rounded-sm`,md:`komc:rounded-md`,lg:`komc:rounded-lg`,xl:`komc:rounded-xl`,"2xl":`komc:rounded-2xl`}}});var d=n(({prefix:e=null,surffix:t=null,size:n=`lg`,gap:a=`xl`,outline:o=`line`,rounded:s=`lg`,className:c,...l},d)=>i(`div`,{"data-komc":!0,className:u({size:n,gap:a,outline:o,rounded:s,className:c}),children:[e,r(`input`,{ref:d,type:`text`,...l}),t]}));function f({children:e,className:t,...n}){return r(`span`,{...n,"data-komc":!0,"data-text":`${e}`,className:a(`komc:inline-flex komc:flex-col komc:justify-center komc:items-center`,`komc:after:content-[attr(data-text)] komc:after:font-bold`,`komc:after:h-0 komc:after:invisible komc:after:overflow-hidden`,`komc:after:select-none komc:after:pointer-events-none`,t),children:e})}export{s as a,c as i,d as n,l as r,f as t};
@@ -0,0 +1 @@
1
+ import{useEffect as e,useId as t,useRef as n}from"react";const r=[],i=()=>{document.body.style.overflow=r.some(e=>e.lockScroll)?`hidden`:`unset`},a=e=>{if(e.key!==`Escape`||r.length===0)return;let t=r[r.length-1];e.preventDefault(),e.stopImmediatePropagation(),t.onClose()};let o=!1;const s=()=>{o||=(document.addEventListener(`keydown`,a,!0),!0)},c=()=>{o&&=(document.removeEventListener(`keydown`,a,!0),!1)},l=(e,t,n)=>{r.push({id:e,onClose:t,lockScroll:n}),i(),s()},u=e=>{let t=r.findLastIndex(t=>t.id===e);t!==-1&&r.splice(t,1),i(),r.length===0&&c()};function d(r,i,a=!0){let o=t(),s=n(i);e(()=>{s.current=i},[i]),e(()=>{if(r)return l(o,()=>s.current(),a),()=>{u(o)}},[r,o,a])}export{d as t};
@@ -0,0 +1 @@
1
+ const e=require(`./chunk-Bmb41Sf3.cjs`);let t=require(`react`);const n=[],r=()=>{document.body.style.overflow=n.some(e=>e.lockScroll)?`hidden`:`unset`},i=e=>{if(e.key!==`Escape`||n.length===0)return;let t=n[n.length-1];e.preventDefault(),e.stopImmediatePropagation(),t.onClose()};let a=!1;const o=()=>{a||=(document.addEventListener(`keydown`,i,!0),!0)},s=()=>{a&&=(document.removeEventListener(`keydown`,i,!0),!1)},c=(e,t,i)=>{n.push({id:e,onClose:t,lockScroll:i}),r(),o()},l=e=>{let t=n.findLastIndex(t=>t.id===e);t!==-1&&n.splice(t,1),r(),n.length===0&&s()};function u(e,n,r=!0){let i=(0,t.useId)(),a=(0,t.useRef)(n);(0,t.useEffect)(()=>{a.current=n},[n]),(0,t.useEffect)(()=>{if(e)return c(i,()=>a.current(),r),()=>{l(i)}},[e,i,r])}Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return u}});