@choice-ui/react 1.6.8 → 1.7.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 (81) hide show
  1. package/dist/components/description/dist/index.d.ts +8 -0
  2. package/dist/components/description/dist/index.js +29 -0
  3. package/dist/components/description/src/description.d.ts +6 -0
  4. package/dist/components/description/src/description.js +18 -0
  5. package/dist/components/description/src/index.d.ts +2 -0
  6. package/dist/components/description/src/tv.d.ts +13 -0
  7. package/dist/components/description/src/tv.js +15 -0
  8. package/dist/components/description/tsup.config.d.ts +2 -0
  9. package/dist/components/emoji-picker/dist/index.d.ts +1 -0
  10. package/dist/components/emoji-picker/dist/index.js +4 -2
  11. package/dist/components/emoji-picker/src/emoji-picker.d.ts +1 -0
  12. package/dist/components/emoji-picker/src/emoji-picker.js +4 -2
  13. package/dist/components/error-message/dist/index.d.ts +8 -0
  14. package/dist/components/error-message/dist/index.js +30 -0
  15. package/dist/components/error-message/src/error-message.d.ts +6 -0
  16. package/dist/components/error-message/src/error-message.js +19 -0
  17. package/dist/components/error-message/src/index.d.ts +2 -0
  18. package/dist/components/error-message/src/tv.d.ts +13 -0
  19. package/dist/components/error-message/src/tv.js +15 -0
  20. package/dist/components/error-message/tsup.config.d.ts +2 -0
  21. package/dist/components/form/src/adapters/base-adapter.js +4 -2
  22. package/dist/components/form/src/tv.d.ts +0 -12
  23. package/dist/components/form/src/tv.js +1 -13
  24. package/dist/components/index.d.ts +3 -0
  25. package/dist/components/md-render/dist/index.d.ts +2 -1
  26. package/dist/components/md-render/dist/index.js +3 -1
  27. package/dist/components/md-render/src/md-render.js +3 -1
  28. package/dist/components/md-render/src/types.d.ts +2 -1
  29. package/dist/components/notifications/dist/index.d.ts +1 -5
  30. package/dist/components/notifications/src/notifications.d.ts +0 -1
  31. package/dist/components/notifications/src/notifications.js +0 -1
  32. package/dist/components/numeric-input/dist/index.d.ts +23 -9
  33. package/dist/components/numeric-input/dist/index.js +26 -3
  34. package/dist/components/numeric-input/src/components/numeric-input-menu-trigger.js +4 -1
  35. package/dist/components/numeric-input/src/hooks/index.d.ts +1 -0
  36. package/dist/components/numeric-input/src/hooks/use-numeric-long-press.d.ts +13 -0
  37. package/dist/components/numeric-input/src/hooks/use-numeric-long-press.js +27 -0
  38. package/dist/components/numeric-input/src/index.d.ts +1 -0
  39. package/dist/components/numeric-input/src/tv.js +22 -2
  40. package/dist/components/picture-preview/dist/index.d.ts +5 -0
  41. package/dist/components/picture-preview/dist/index.js +287 -140
  42. package/dist/components/picture-preview/src/hooks/useWheelHandler.d.ts +6 -1
  43. package/dist/components/picture-preview/src/hooks/useWheelHandler.js +25 -7
  44. package/dist/components/picture-preview/src/picture-preview.d.ts +5 -0
  45. package/dist/components/picture-preview/src/picture-preview.js +214 -123
  46. package/dist/components/picture-preview/src/tv.d.ts +93 -3
  47. package/dist/components/picture-preview/src/tv.js +48 -10
  48. package/dist/components/separator/dist/index.d.ts +1 -8
  49. package/dist/components/separator/src/separator.d.ts +1 -8
  50. package/dist/components/separator/src/separator.js +33 -5
  51. package/dist/components/separator/src/tv.d.ts +39 -18
  52. package/dist/components/separator/src/tv.js +37 -7
  53. package/dist/components/text-field/dist/index.d.ts +2 -3
  54. package/dist/components/text-field/dist/index.js +4 -19
  55. package/dist/components/text-field/src/components/index.d.ts +0 -1
  56. package/dist/components/text-field/src/text-field.d.ts +3 -2
  57. package/dist/components/text-field/src/text-field.js +2 -2
  58. package/dist/components/text-field/src/tv.d.ts +3 -3
  59. package/dist/components/text-field/src/tv.js +1 -6
  60. package/dist/components/toast/dist/index.d.ts +260 -0
  61. package/dist/components/toast/src/components/index.d.ts +3 -0
  62. package/dist/components/toast/src/components/toast-progress-bar.d.ts +7 -0
  63. package/dist/components/toast/src/components/toast-progress-bar.js +53 -0
  64. package/dist/components/toast/src/components/toaster-item.d.ts +26 -0
  65. package/dist/components/toast/src/components/toaster-item.js +412 -0
  66. package/dist/components/toast/src/components/toaster-slots.d.ts +87 -0
  67. package/dist/components/toast/src/components/toaster-slots.js +38 -0
  68. package/dist/components/toast/src/index.d.ts +5 -0
  69. package/dist/components/toast/src/store.d.ts +113 -0
  70. package/dist/components/toast/src/store.js +204 -0
  71. package/dist/components/toast/src/toaster.d.ts +87 -0
  72. package/dist/components/toast/src/toaster.js +271 -0
  73. package/dist/components/toast/src/tv.d.ts +365 -0
  74. package/dist/components/toast/src/tv.js +412 -0
  75. package/dist/components/toast/src/types.d.ts +79 -0
  76. package/dist/components/toast/tsup.config.d.ts +2 -0
  77. package/dist/index.js +11 -2
  78. package/dist/styles/components.css +2 -0
  79. package/package.json +1 -1
  80. package/dist/components/text-field/src/components/field-description.d.ts +0 -2
  81. package/dist/components/text-field/src/components/field-description.js +0 -16
@@ -0,0 +1,8 @@
1
+ import { default as React } from 'react';
2
+ interface DescriptionProps extends React.HTMLAttributes<HTMLParagraphElement> {
3
+ children: React.ReactNode;
4
+ disabled?: boolean;
5
+ }
6
+ declare const Description: React.NamedExoticComponent<DescriptionProps>;
7
+
8
+ export { Description, type DescriptionProps };
@@ -0,0 +1,29 @@
1
+ import { memo } from "react";
2
+ import { jsx } from "react/jsx-runtime";
3
+ import { tcv } from "../../../shared/utils/tcx/tcx.js";
4
+ var descriptionTv = tcv({
5
+ base: "text-secondary-foreground px-0.5 break-words whitespace-pre-wrap",
6
+ variants: {
7
+ disabled: {
8
+ true: "text-disabled-foreground"
9
+ }
10
+ },
11
+ defaultVariants: {
12
+ disabled: false
13
+ }
14
+ });
15
+ var Description = memo(function Description2(props) {
16
+ const { children, className, disabled, ...rest } = props;
17
+ return /* @__PURE__ */ jsx(
18
+ "p",
19
+ {
20
+ className: descriptionTv({ disabled, className }),
21
+ slot: "description",
22
+ ...rest,
23
+ children
24
+ }
25
+ );
26
+ });
27
+ export {
28
+ Description
29
+ };
@@ -0,0 +1,6 @@
1
+ import { default as React } from 'react';
2
+ export interface DescriptionProps extends React.HTMLAttributes<HTMLParagraphElement> {
3
+ children: React.ReactNode;
4
+ disabled?: boolean;
5
+ }
6
+ export declare const Description: React.NamedExoticComponent<DescriptionProps>;
@@ -0,0 +1,18 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { memo } from "react";
3
+ import { descriptionTv } from "./tv.js";
4
+ const Description = memo(function Description2(props) {
5
+ const { children, className, disabled, ...rest } = props;
6
+ return /* @__PURE__ */ jsx(
7
+ "p",
8
+ {
9
+ className: descriptionTv({ disabled, className }),
10
+ slot: "description",
11
+ ...rest,
12
+ children
13
+ }
14
+ );
15
+ });
16
+ export {
17
+ Description
18
+ };
@@ -0,0 +1,2 @@
1
+ export { Description } from './description';
2
+ export type { DescriptionProps } from './description';
@@ -0,0 +1,13 @@
1
+ export declare const descriptionTv: import('tailwind-variants').TVReturnType<{
2
+ disabled: {
3
+ true: string;
4
+ };
5
+ }, undefined, "text-secondary-foreground px-0.5 break-words whitespace-pre-wrap", {
6
+ disabled: {
7
+ true: string;
8
+ };
9
+ }, undefined, import('tailwind-variants').TVReturnType<{
10
+ disabled: {
11
+ true: string;
12
+ };
13
+ }, undefined, "text-secondary-foreground px-0.5 break-words whitespace-pre-wrap", unknown, unknown, undefined>>;
@@ -0,0 +1,15 @@
1
+ import { tcv } from "../../../shared/utils/tcx/tcx.js";
2
+ const descriptionTv = tcv({
3
+ base: "text-secondary-foreground px-0.5 break-words whitespace-pre-wrap",
4
+ variants: {
5
+ disabled: {
6
+ true: "text-disabled-foreground"
7
+ }
8
+ },
9
+ defaultVariants: {
10
+ disabled: false
11
+ }
12
+ });
13
+ export {
14
+ descriptionTv
15
+ };
@@ -0,0 +1,2 @@
1
+ declare const _default: import('tsup').Options | import('tsup').Options[] | ((overrideOptions: import('tsup').Options) => import('tsup').Options | import('tsup').Options[] | Promise<import('tsup').Options | import('tsup').Options[]>);
2
+ export default _default;
@@ -49,6 +49,7 @@ interface EmojiPickerProps {
49
49
  showCategories?: boolean;
50
50
  showFrequentlyUsed?: boolean;
51
51
  showSearch?: boolean;
52
+ showFooter?: boolean;
52
53
  value?: EmojiData | null;
53
54
  variant?: "default" | "dark" | "light";
54
55
  }
@@ -12017,6 +12017,7 @@ var EmojiPicker = memo(function EmojiPicker2({
12017
12017
  showCategories = true,
12018
12018
  showFrequentlyUsed = true,
12019
12019
  showSearch = true,
12020
+ showFooter = true,
12020
12021
  children,
12021
12022
  variant = "dark"
12022
12023
  }) {
@@ -12063,6 +12064,7 @@ var EmojiPicker = memo(function EmojiPicker2({
12063
12064
  onChange == null ? void 0 : onChange(emoji);
12064
12065
  });
12065
12066
  const handleEmojiHover = useEventCallback((emoji) => {
12067
+ if (!showFooter) return;
12066
12068
  setHoveredEmoji(emoji);
12067
12069
  });
12068
12070
  const handleCategoryClick = useEventCallback((category) => {
@@ -12079,7 +12081,7 @@ var EmojiPicker = memo(function EmojiPicker2({
12079
12081
  className: tv.container({ className }),
12080
12082
  style: rootStyle,
12081
12083
  children: [
12082
- /* @__PURE__ */ jsxs("div", { className: tv.header(), children: [
12084
+ (showSearch || showCategories) && /* @__PURE__ */ jsxs("div", { className: tv.header(), children: [
12083
12085
  showSearch && /* @__PURE__ */ jsx(
12084
12086
  SearchInput,
12085
12087
  {
@@ -12181,7 +12183,7 @@ var EmojiPicker = memo(function EmojiPicker2({
12181
12183
  )
12182
12184
  }
12183
12185
  ),
12184
- /* @__PURE__ */ jsx(
12186
+ showFooter && /* @__PURE__ */ jsx(
12185
12187
  EmojiFooter,
12186
12188
  {
12187
12189
  hoveredEmoji,
@@ -10,6 +10,7 @@ export interface EmojiPickerProps {
10
10
  showCategories?: boolean;
11
11
  showFrequentlyUsed?: boolean;
12
12
  showSearch?: boolean;
13
+ showFooter?: boolean;
13
14
  value?: EmojiData | null;
14
15
  variant?: "default" | "dark" | "light";
15
16
  }
@@ -33,6 +33,7 @@ const EmojiPicker = memo(function EmojiPicker2({
33
33
  showCategories = true,
34
34
  showFrequentlyUsed = true,
35
35
  showSearch = true,
36
+ showFooter = true,
36
37
  children,
37
38
  variant = "dark"
38
39
  }) {
@@ -80,6 +81,7 @@ const EmojiPicker = memo(function EmojiPicker2({
80
81
  onChange == null ? void 0 : onChange(emoji);
81
82
  });
82
83
  const handleEmojiHover = useEventCallback((emoji) => {
84
+ if (!showFooter) return;
83
85
  setHoveredEmoji(emoji);
84
86
  });
85
87
  const handleCategoryClick = useEventCallback((category) => {
@@ -96,7 +98,7 @@ const EmojiPicker = memo(function EmojiPicker2({
96
98
  className: tv.container({ className }),
97
99
  style: rootStyle,
98
100
  children: [
99
- /* @__PURE__ */ jsxs("div", { className: tv.header(), children: [
101
+ (showSearch || showCategories) && /* @__PURE__ */ jsxs("div", { className: tv.header(), children: [
100
102
  showSearch && /* @__PURE__ */ jsx(
101
103
  SearchInput,
102
104
  {
@@ -198,7 +200,7 @@ const EmojiPicker = memo(function EmojiPicker2({
198
200
  )
199
201
  }
200
202
  ),
201
- /* @__PURE__ */ jsx(
203
+ showFooter && /* @__PURE__ */ jsx(
202
204
  EmojiFooter,
203
205
  {
204
206
  hoveredEmoji,
@@ -0,0 +1,8 @@
1
+ import { default as React } from 'react';
2
+ interface ErrorMessageProps extends React.HTMLAttributes<HTMLParagraphElement> {
3
+ children: React.ReactNode;
4
+ disabled?: boolean;
5
+ }
6
+ declare const ErrorMessage: React.NamedExoticComponent<ErrorMessageProps>;
7
+
8
+ export { ErrorMessage, type ErrorMessageProps };
@@ -0,0 +1,30 @@
1
+ import { memo } from "react";
2
+ import { jsx } from "react/jsx-runtime";
3
+ import { tcv } from "../../../shared/utils/tcx/tcx.js";
4
+ var errorMessageTv = tcv({
5
+ base: "text-danger-foreground break-words whitespace-pre-wrap px-0.5",
6
+ variants: {
7
+ disabled: {
8
+ true: "text-disabled-foreground"
9
+ }
10
+ },
11
+ defaultVariants: {
12
+ disabled: false
13
+ }
14
+ });
15
+ var ErrorMessage = memo(function ErrorMessage2(props) {
16
+ const { children, className, disabled, ...rest } = props;
17
+ return /* @__PURE__ */ jsx(
18
+ "em",
19
+ {
20
+ className: errorMessageTv({ disabled, className }),
21
+ slot: "errorMessage",
22
+ role: "alert",
23
+ ...rest,
24
+ children
25
+ }
26
+ );
27
+ });
28
+ export {
29
+ ErrorMessage
30
+ };
@@ -0,0 +1,6 @@
1
+ import { default as React } from 'react';
2
+ export interface ErrorMessageProps extends React.HTMLAttributes<HTMLParagraphElement> {
3
+ children: React.ReactNode;
4
+ disabled?: boolean;
5
+ }
6
+ export declare const ErrorMessage: React.NamedExoticComponent<ErrorMessageProps>;
@@ -0,0 +1,19 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { memo } from "react";
3
+ import { errorMessageTv } from "./tv.js";
4
+ const ErrorMessage = memo(function ErrorMessage2(props) {
5
+ const { children, className, disabled, ...rest } = props;
6
+ return /* @__PURE__ */ jsx(
7
+ "em",
8
+ {
9
+ className: errorMessageTv({ disabled, className }),
10
+ slot: "errorMessage",
11
+ role: "alert",
12
+ ...rest,
13
+ children
14
+ }
15
+ );
16
+ });
17
+ export {
18
+ ErrorMessage
19
+ };
@@ -0,0 +1,2 @@
1
+ export { ErrorMessage } from './error-message';
2
+ export type { ErrorMessageProps } from './error-message';
@@ -0,0 +1,13 @@
1
+ export declare const errorMessageTv: import('tailwind-variants').TVReturnType<{
2
+ disabled: {
3
+ true: string;
4
+ };
5
+ }, undefined, "text-danger-foreground break-words whitespace-pre-wrap px-0.5", {
6
+ disabled: {
7
+ true: string;
8
+ };
9
+ }, undefined, import('tailwind-variants').TVReturnType<{
10
+ disabled: {
11
+ true: string;
12
+ };
13
+ }, undefined, "text-danger-foreground break-words whitespace-pre-wrap px-0.5", unknown, unknown, undefined>>;
@@ -0,0 +1,15 @@
1
+ import { tcv } from "../../../shared/utils/tcx/tcx.js";
2
+ const errorMessageTv = tcv({
3
+ base: "text-danger-foreground break-words whitespace-pre-wrap px-0.5",
4
+ variants: {
5
+ disabled: {
6
+ true: "text-disabled-foreground"
7
+ }
8
+ },
9
+ defaultVariants: {
10
+ disabled: false
11
+ }
12
+ });
13
+ export {
14
+ errorMessageTv
15
+ };
@@ -0,0 +1,2 @@
1
+ declare const _default: import('tsup').Options | import('tsup').Options[] | ((overrideOptions: import('tsup').Options) => import('tsup').Options | import('tsup').Options[] | Promise<import('tsup').Options | import('tsup').Options[]>);
2
+ export default _default;
@@ -1,4 +1,6 @@
1
1
  import { jsxs, jsx } from "react/jsx-runtime";
2
+ import { Description } from "../../../description/dist/index.js";
3
+ import { ErrorMessage } from "../../../error-message/dist/index.js";
2
4
  import { Label } from "../../../label/dist/index.js";
3
5
  import { FormTv } from "../tv.js";
4
6
  import { tcx } from "../../../../shared/utils/tcx/tcx.js";
@@ -23,8 +25,8 @@ function BaseAdapter({
23
25
  }
24
26
  ),
25
27
  children,
26
- description && /* @__PURE__ */ jsx("p", { className: tv.description(), children: description }),
27
- error && /* @__PURE__ */ jsx("p", { className: tv.error(), children: error })
28
+ typeof description === "string" ? /* @__PURE__ */ jsx(Description, { id: `${htmlFor}-description`, children: description }) : description,
29
+ typeof error === "string" ? /* @__PURE__ */ jsx(ErrorMessage, { id: `${htmlFor}-error`, children: error }) : error
28
30
  ] });
29
31
  }
30
32
  function filterFormProps(props) {
@@ -1,37 +1,25 @@
1
1
  export declare const FormTv: import('tailwind-variants').TVReturnType<{
2
2
  [key: string]: {
3
3
  [key: string]: import('tailwind-merge').ClassNameValue | {
4
- error?: import('tailwind-merge').ClassNameValue;
5
- description?: import('tailwind-merge').ClassNameValue;
6
4
  field?: import('tailwind-merge').ClassNameValue;
7
5
  };
8
6
  };
9
7
  } | {
10
8
  [x: string]: {
11
9
  [x: string]: import('tailwind-merge').ClassNameValue | {
12
- error?: import('tailwind-merge').ClassNameValue;
13
- description?: import('tailwind-merge').ClassNameValue;
14
10
  field?: import('tailwind-merge').ClassNameValue;
15
11
  };
16
12
  };
17
13
  } | {}, {
18
14
  field: string[];
19
- error: string[];
20
- description: string[];
21
15
  }, undefined, {
22
16
  [key: string]: {
23
17
  [key: string]: import('tailwind-merge').ClassNameValue | {
24
- error?: import('tailwind-merge').ClassNameValue;
25
- description?: import('tailwind-merge').ClassNameValue;
26
18
  field?: import('tailwind-merge').ClassNameValue;
27
19
  };
28
20
  };
29
21
  } | {}, {
30
22
  field: string[];
31
- error: string[];
32
- description: string[];
33
23
  }, import('tailwind-variants').TVReturnType<unknown, {
34
24
  field: string[];
35
- error: string[];
36
- description: string[];
37
25
  }, undefined, unknown, unknown, undefined>>;
@@ -1,19 +1,7 @@
1
1
  import { tcv } from "../../../shared/utils/tcx/tcx.js";
2
2
  const FormTv = tcv({
3
3
  slots: {
4
- field: ["flex min-w-0 flex-col gap-2"],
5
- error: [
6
- "text-body-medium",
7
- "px-0.5",
8
- "break-words whitespace-pre-wrap",
9
- "text-danger-foreground"
10
- ],
11
- description: [
12
- "text-body-medium",
13
- "px-0.5",
14
- "break-words whitespace-pre-wrap",
15
- "text-secondary-foreground"
16
- ]
4
+ field: ["flex min-w-0 flex-col gap-2"]
17
5
  }
18
6
  });
19
7
  export {
@@ -15,9 +15,11 @@ export * from './comments/src';
15
15
  export * from './conditions/src';
16
16
  export * from './context-input/src';
17
17
  export * from './context-menu/src';
18
+ export * from './description/src';
18
19
  export * from './dialog/src';
19
20
  export * from './dropdown/src';
20
21
  export * from './emoji-picker/src';
22
+ export * from './error-message/src';
21
23
  export * from './file-upload/src';
22
24
  export * from './form/src';
23
25
  export * from './hint/src';
@@ -61,6 +63,7 @@ export * from './table/src';
61
63
  export * from './tabs/src';
62
64
  export * from './text-field/src';
63
65
  export * from './textarea/src';
66
+ export * from './toast/src';
64
67
  export * from './toggle-button/src';
65
68
  export * from './tooltip/src';
66
69
  export * from './tree-list/src';
@@ -8,9 +8,10 @@ interface MentionItemProps {
8
8
  }
9
9
  interface MdRenderProps {
10
10
  allowedPrefixes?: string[];
11
+ children?: string;
11
12
  className?: string;
12
13
  components?: Partial<Components>;
13
- content: string;
14
+ content?: string;
14
15
  customColor?: {
15
16
  codeBackground?: string;
16
17
  defaultBackground?: string;
@@ -415,6 +415,7 @@ var MdRender = memo(
415
415
  id,
416
416
  components: customComponents,
417
417
  content,
418
+ children,
418
419
  className,
419
420
  mentionRenderComponent,
420
421
  mentionItems,
@@ -423,9 +424,10 @@ var MdRender = memo(
423
424
  size = "default",
424
425
  variant = "default"
425
426
  } = props;
427
+ const markdownContent = content ?? children ?? "";
426
428
  const generatedId = useId();
427
429
  const blockId = id ?? generatedId;
428
- const blocks = useMdBlocks(content);
430
+ const blocks = useMdBlocks(markdownContent);
429
431
  const tv = useMemo(() => mdRenderTv({ size, variant }), [size, variant]);
430
432
  const tvComponents = useMemo(
431
433
  () => createMarkdownComponents(tv, mentionRenderComponent, mentionItems),
@@ -37,6 +37,7 @@ const MdRender = memo(
37
37
  id,
38
38
  components: customComponents,
39
39
  content,
40
+ children,
40
41
  className,
41
42
  mentionRenderComponent,
42
43
  mentionItems,
@@ -45,9 +46,10 @@ const MdRender = memo(
45
46
  size = "default",
46
47
  variant = "default"
47
48
  } = props;
49
+ const markdownContent = content ?? children ?? "";
48
50
  const generatedId = useId();
49
51
  const blockId = id ?? generatedId;
50
- const blocks = useMdBlocks(content);
52
+ const blocks = useMdBlocks(markdownContent);
51
53
  const tv = useMemo(() => mdRenderTv({ size, variant }), [size, variant]);
52
54
  const tvComponents = useMemo(
53
55
  () => createMarkdownComponents(tv, mentionRenderComponent, mentionItems),
@@ -6,9 +6,10 @@ interface MentionItemProps {
6
6
  }
7
7
  export interface MdRenderProps {
8
8
  allowedPrefixes?: string[];
9
+ children?: string;
9
10
  className?: string;
10
11
  components?: Partial<Components>;
11
- content: string;
12
+ content?: string;
12
13
  customColor?: {
13
14
  codeBackground?: string;
14
15
  defaultBackground?: string;
@@ -1,7 +1,4 @@
1
1
  import { ToasterProps } from 'sonner';
2
- import * as react from 'react';
3
- import * as react_jsx_runtime from 'react/jsx-runtime';
4
-
5
2
  interface NotificationsProps extends Omit<ToasterProps, "id"> {
6
3
  actions?: (id: string | number) => {
7
4
  action?: {
@@ -20,7 +17,6 @@ interface NotificationsProps extends Omit<ToasterProps, "id"> {
20
17
  text?: string;
21
18
  toasterId?: string;
22
19
  }
23
- declare const Toast: react.MemoExoticComponent<(props: NotificationsProps) => react_jsx_runtime.JSX.Element>;
24
20
  declare function notifications(toast: Omit<NotificationsProps, "id">): string | number;
25
21
 
26
- export { type NotificationsProps, Toast, notifications };
22
+ export { type NotificationsProps, notifications };
@@ -17,5 +17,4 @@ export interface NotificationsProps extends Omit<ToasterProps, "id"> {
17
17
  text?: string;
18
18
  toasterId?: string;
19
19
  }
20
- export declare const Toast: import('react').MemoExoticComponent<(props: NotificationsProps) => import("react/jsx-runtime").JSX.Element>;
21
20
  export declare function notifications(toast: Omit<NotificationsProps, "id">): string | number;
@@ -70,6 +70,5 @@ function notifications(toast$1) {
70
70
  );
71
71
  }
72
72
  export {
73
- Toast,
74
73
  notifications
75
74
  };
@@ -1,8 +1,8 @@
1
1
  import { TooltipProps } from '../../tooltip/src';
2
- import { default as react__default, ReactNode, HTMLProps } from 'react';
2
+ import { default as React__default, ReactNode, HTMLProps } from 'react';
3
3
  import { IconButtonProps } from '../../icon-button/src';
4
4
  import { PressMoveProps } from '../../../../../shared/src';
5
- import * as react from 'react';
5
+ import * as React$1 from 'react';
6
6
 
7
7
  type ElementType = "action" | "handler" | "menu";
8
8
  interface NumericInputElementProps {
@@ -11,18 +11,18 @@ interface NumericInputElementProps {
11
11
  position?: "prefix" | "suffix";
12
12
  type?: ElementType;
13
13
  }
14
- declare const NumericInputElement: react.MemoExoticComponent<react.ForwardRefExoticComponent<NumericInputElementProps & react.RefAttributes<HTMLDivElement>>>;
14
+ declare const NumericInputElement: React$1.MemoExoticComponent<React$1.ForwardRefExoticComponent<NumericInputElementProps & React$1.RefAttributes<HTMLDivElement>>>;
15
15
 
16
16
  interface NumericInputMenuTriggerProps extends IconButtonProps {
17
17
  className?: string;
18
18
  type?: "menu" | "action";
19
19
  }
20
- declare const NumericInputMenuTrigger: react.ForwardRefExoticComponent<Omit<NumericInputMenuTriggerProps, "ref"> & react.RefAttributes<HTMLButtonElement>>;
20
+ declare const NumericInputMenuTrigger: React$1.ForwardRefExoticComponent<Omit<NumericInputMenuTriggerProps, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
21
21
  interface NumericInputMenuActionPromptProps extends HTMLProps<HTMLDivElement> {
22
22
  children?: React.ReactNode;
23
23
  className?: string;
24
24
  }
25
- declare const NumericInputMenuActionPrompt: react.ForwardRefExoticComponent<Omit<NumericInputMenuActionPromptProps, "ref"> & react.RefAttributes<HTMLDivElement>>;
25
+ declare const NumericInputMenuActionPrompt: React$1.ForwardRefExoticComponent<Omit<NumericInputMenuActionPromptProps, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
26
26
 
27
27
  interface NumericInputVariableProps {
28
28
  className?: string;
@@ -30,7 +30,7 @@ interface NumericInputVariableProps {
30
30
  onClick?: (e: React.MouseEvent<HTMLDivElement>) => void;
31
31
  value?: number | null;
32
32
  }
33
- declare const NumericInputVariable: react.ForwardRefExoticComponent<NumericInputVariableProps & react.RefAttributes<HTMLDivElement>>;
33
+ declare const NumericInputVariable: React$1.ForwardRefExoticComponent<NumericInputVariableProps & React$1.RefAttributes<HTMLDivElement>>;
34
34
 
35
35
  type NumericInputValue = string | number | (string | number | undefined)[] | Record<string, number>;
36
36
  type NumberResult = {
@@ -75,9 +75,9 @@ interface NumericInputProps extends NumericInputContextValue, Omit<HTMLProps<HTM
75
75
  id?: string;
76
76
  onChange?: (value: NumericInputValue, detail: NumericChangeDetail) => void;
77
77
  tooltip?: TooltipProps;
78
- triggerRef?: react__default.RefObject<HTMLDivElement> | ((el: HTMLDivElement | null) => void);
78
+ triggerRef?: React__default.RefObject<HTMLDivElement> | ((el: HTMLDivElement | null) => void);
79
79
  }
80
- interface NumericInputComponent extends react__default.ForwardRefExoticComponent<NumericInputProps & react__default.RefAttributes<HTMLInputElement>> {
80
+ interface NumericInputComponent extends React__default.ForwardRefExoticComponent<NumericInputProps & React__default.RefAttributes<HTMLInputElement>> {
81
81
  ActionPrompt: typeof NumericInputMenuActionPrompt;
82
82
  MenuTrigger: typeof NumericInputMenuTrigger;
83
83
  Prefix: typeof NumericInputElement;
@@ -86,4 +86,18 @@ interface NumericInputComponent extends react__default.ForwardRefExoticComponent
86
86
  }
87
87
  declare const NumericInput: NumericInputComponent;
88
88
 
89
- export { type NumberResult, type NumericChangeDetail, NumericInput, NumericInputElement, type NumericInputElementProps, NumericInputMenuTrigger, type NumericInputMenuTriggerProps, type NumericInputProps, type NumericInputValue, NumericInputVariable, type NumericInputVariableProps };
89
+ /**
90
+ * Hook for handling long press on numeric input increment/decrement buttons.
91
+ * Triggers the callback immediately on press, then repeatedly after a delay.
92
+ *
93
+ * @param callback - Function to call on press and during long press
94
+ * @param delay - Interval between repeated calls (default: 150ms)
95
+ * @param initialDelay - Delay before starting repeated calls (default: 400ms)
96
+ */
97
+ declare function useNumericLongPress(callback: () => void, delay?: number, initialDelay?: number): {
98
+ onMouseDown: () => void;
99
+ onMouseUp: () => void;
100
+ onMouseLeave: () => void;
101
+ };
102
+
103
+ export { type NumberResult, type NumericChangeDetail, NumericInput, NumericInputElement, type NumericInputElementProps, NumericInputMenuTrigger, type NumericInputMenuTriggerProps, type NumericInputProps, type NumericInputValue, NumericInputVariable, type NumericInputVariableProps, useNumericLongPress };
@@ -345,8 +345,8 @@ var NumericInputElementTv = tcv({
345
345
  variants: {
346
346
  type: {
347
347
  handler: "select-none",
348
- action: "[grid-area:action]",
349
- menu: "ml-px [grid-area:action]"
348
+ action: "",
349
+ menu: ""
350
350
  },
351
351
  position: {
352
352
  prefix: "rounded-l-md",
@@ -378,6 +378,26 @@ var NumericInputElementTv = tcv({
378
378
  position: "suffix",
379
379
  class: "[grid-area:suffix-handler]"
380
380
  },
381
+ {
382
+ type: "action",
383
+ position: "prefix",
384
+ class: "[grid-area:prefix-handler]"
385
+ },
386
+ {
387
+ type: "action",
388
+ position: "suffix",
389
+ class: "[grid-area:action]"
390
+ },
391
+ {
392
+ type: "menu",
393
+ position: "prefix",
394
+ class: "[grid-area:prefix-handler]"
395
+ },
396
+ {
397
+ type: "menu",
398
+ position: "suffix",
399
+ class: "ml-px [grid-area:action]"
400
+ },
381
401
  {
382
402
  type: "handler",
383
403
  disabled: false,
@@ -505,7 +525,10 @@ var NumericInputMenuActionPrompt = forwardRef((props, ref) => {
505
525
  "div",
506
526
  {
507
527
  ref,
508
- className: tcx(NumericInputMenuActionPromptTv({ size: context.size, disabled: context.disabled }), className),
528
+ className: tcx(
529
+ NumericInputMenuActionPromptTv({ size: context.size, disabled: context.disabled }),
530
+ className
531
+ ),
509
532
  ...rest,
510
533
  children
511
534
  }
@@ -37,7 +37,10 @@ const NumericInputMenuActionPrompt = forwardRef((props, ref) => {
37
37
  "div",
38
38
  {
39
39
  ref,
40
- className: tcx(NumericInputMenuActionPromptTv({ size: context.size, disabled: context.disabled }), className),
40
+ className: tcx(
41
+ NumericInputMenuActionPromptTv({ size: context.size, disabled: context.disabled }),
42
+ className
43
+ ),
41
44
  ...rest,
42
45
  children
43
46
  }
@@ -2,3 +2,4 @@ export * from './use-numeric-input';
2
2
  export * from './use-step-calculation';
3
3
  export * from './use-numeric-value-processing';
4
4
  export * from './use-input-interactions';
5
+ export * from './use-numeric-long-press';