@deepnoid/ui 0.0.86 → 0.0.88

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 (73) hide show
  1. package/dist/{chunk-KA4L5SCT.mjs → chunk-4DLTBZUQ.mjs} +1 -1
  2. package/dist/{chunk-RVGOARET.mjs → chunk-4VIEZ5FT.mjs} +2 -2
  3. package/dist/{chunk-QURXBWKK.mjs → chunk-IOV7MEPG.mjs} +323 -331
  4. package/dist/{chunk-PSXPOYLX.mjs → chunk-IXFP2WQ4.mjs} +1 -1
  5. package/dist/{chunk-FRIK4CS7.mjs → chunk-K6HPMTN4.mjs} +3 -3
  6. package/dist/{chunk-LGELMZCN.mjs → chunk-KHWFCTPX.mjs} +3 -3
  7. package/dist/{chunk-SQLRQTFC.mjs → chunk-LY6LJRUX.mjs} +1 -1
  8. package/dist/{chunk-AHORH5PH.mjs → chunk-PRUAIZTU.mjs} +1 -1
  9. package/dist/{chunk-HH2LF2SU.mjs → chunk-QRHT7MSO.mjs} +10 -6
  10. package/dist/{chunk-QCOPD2HG.mjs → chunk-SFNR4F3J.mjs} +1 -1
  11. package/dist/{chunk-EWKYBS7I.mjs → chunk-YGTJU3GD.mjs} +4 -4
  12. package/dist/components/accordion/accordion.test.mjs +3 -3
  13. package/dist/components/accordion/accordionItem.js +323 -331
  14. package/dist/components/accordion/accordionItem.mjs +3 -3
  15. package/dist/components/accordion/index.js +323 -331
  16. package/dist/components/accordion/index.mjs +3 -3
  17. package/dist/components/button/button-group.test.mjs +3 -3
  18. package/dist/components/button/button.test.mjs +3 -3
  19. package/dist/components/checkbox/checkbox.test.mjs +4 -4
  20. package/dist/components/icon/Icon.js +323 -331
  21. package/dist/components/icon/Icon.mjs +2 -2
  22. package/dist/components/icon/index.js +323 -331
  23. package/dist/components/icon/index.mjs +2 -2
  24. package/dist/components/icon/template.js +323 -331
  25. package/dist/components/icon/template.mjs +1 -1
  26. package/dist/components/input/index.js +323 -331
  27. package/dist/components/input/index.mjs +3 -3
  28. package/dist/components/input/input.js +323 -331
  29. package/dist/components/input/input.mjs +3 -3
  30. package/dist/components/input/input.test.js +323 -331
  31. package/dist/components/input/input.test.mjs +6 -6
  32. package/dist/components/list/list.test.mjs +1 -1
  33. package/dist/components/modal/index.js +323 -331
  34. package/dist/components/modal/index.mjs +4 -4
  35. package/dist/components/modal/modal.js +323 -331
  36. package/dist/components/modal/modal.mjs +4 -4
  37. package/dist/components/modal/modal.test.js +323 -331
  38. package/dist/components/modal/modal.test.mjs +5 -5
  39. package/dist/components/pagination/pagination.test.mjs +1 -1
  40. package/dist/components/radio/radio.test.mjs +1 -1
  41. package/dist/components/select/index.js +323 -331
  42. package/dist/components/select/index.mjs +4 -4
  43. package/dist/components/select/option.js +323 -331
  44. package/dist/components/select/option.mjs +3 -3
  45. package/dist/components/select/select.js +323 -331
  46. package/dist/components/select/select.mjs +4 -4
  47. package/dist/components/select/select.test.js +323 -331
  48. package/dist/components/select/select.test.mjs +9 -9
  49. package/dist/components/switch/switch.test.mjs +1 -1
  50. package/dist/components/table/index.js +323 -331
  51. package/dist/components/table/index.mjs +5 -5
  52. package/dist/components/table/table-body.js +323 -331
  53. package/dist/components/table/table-body.mjs +4 -4
  54. package/dist/components/table/table.js +323 -331
  55. package/dist/components/table/table.mjs +5 -5
  56. package/dist/components/table/table.test.js +323 -331
  57. package/dist/components/table/table.test.mjs +6 -6
  58. package/dist/components/tabs/tabs.test.mjs +4 -4
  59. package/dist/components/textarea/textarea.test.mjs +1 -1
  60. package/dist/components/toast/index.js +334 -338
  61. package/dist/components/toast/index.mjs +4 -4
  62. package/dist/components/toast/toast.d.mts +1 -0
  63. package/dist/components/toast/toast.d.ts +1 -0
  64. package/dist/components/toast/toast.js +332 -336
  65. package/dist/components/toast/toast.mjs +3 -3
  66. package/dist/components/toast/toast.test.js +332 -336
  67. package/dist/components/toast/toast.test.mjs +5 -5
  68. package/dist/components/toast/use-toast.js +334 -338
  69. package/dist/components/toast/use-toast.mjs +4 -4
  70. package/dist/components/tooltip/tooltip.test.mjs +4 -4
  71. package/dist/index.js +334 -338
  72. package/dist/index.mjs +30 -30
  73. package/package.json +2 -1
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-PUFNT5LS.mjs";
5
5
  import {
6
6
  table_body_default
7
- } from "./chunk-LGELMZCN.mjs";
7
+ } from "./chunk-KHWFCTPX.mjs";
8
8
  import {
9
9
  clsx
10
10
  } from "./chunk-27Y6K5NK.mjs";
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-ZOTHPHXA.mjs";
5
5
  import {
6
6
  toast_default
7
- } from "./chunk-HH2LF2SU.mjs";
7
+ } from "./chunk-QRHT7MSO.mjs";
8
8
 
9
9
  // src/components/toast/use-toast.tsx
10
10
  import { createContext, useContext, useState, useCallback, useEffect, useRef } from "react";
@@ -25,7 +25,7 @@ var ToastProvider = ({
25
25
  const [containerStyle, setContainerStyle] = useState({});
26
26
  const toastRef = useRef();
27
27
  const addToast = useCallback((content, options) => {
28
- const id = Date.now();
28
+ const id = Date.now() + Math.floor(Math.random() * 1e5);
29
29
  const newToast = {
30
30
  id,
31
31
  content,
@@ -54,7 +54,7 @@ var ToastProvider = ({
54
54
  };
55
55
  useEffect(() => {
56
56
  var _a;
57
- const width = typeof ((_a = toastRef.current) == null ? void 0 : _a.getWidth) === "function" ? toastRef.current.getWidth() : (globalOptions == null ? void 0 : globalOptions.width) || 300;
57
+ const width = (globalOptions == null ? void 0 : globalOptions.width) ? globalOptions == null ? void 0 : globalOptions.width : typeof ((_a = toastRef.current) == null ? void 0 : _a.getWidth) === "function" ? toastRef.current.getWidth() : 300;
58
58
  const offset = 20;
59
59
  const calculatePosition = () => {
60
60
  const placement = (globalOptions == null ? void 0 : globalOptions.placement) || "bottom-right";
@@ -2,12 +2,12 @@
2
2
  import {
3
3
  checkbox_default
4
4
  } from "./chunk-BE2OG6M4.mjs";
5
+ import {
6
+ Icon_default
7
+ } from "./chunk-PRUAIZTU.mjs";
5
8
  import {
6
9
  clsx
7
10
  } from "./chunk-27Y6K5NK.mjs";
8
- import {
9
- Icon_default
10
- } from "./chunk-AHORH5PH.mjs";
11
11
 
12
12
  // src/components/table/table-body.tsx
13
13
  import React, { useState, useCallback, useEffect } from "react";
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import {
3
3
  Icon_default
4
- } from "./chunk-AHORH5PH.mjs";
4
+ } from "./chunk-PRUAIZTU.mjs";
5
5
  import {
6
6
  tv
7
7
  } from "./chunk-J725QONZ.mjs";
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import {
3
3
  template
4
- } from "./chunk-QURXBWKK.mjs";
4
+ } from "./chunk-IOV7MEPG.mjs";
5
5
 
6
6
  // src/components/icon/Icon.tsx
7
7
  import { jsx } from "react/jsx-runtime";
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import {
3
3
  Icon_default
4
- } from "./chunk-AHORH5PH.mjs";
4
+ } from "./chunk-PRUAIZTU.mjs";
5
5
  import {
6
6
  mapPropsVariants
7
7
  } from "./chunk-E3G5QXSH.mjs";
@@ -14,7 +14,7 @@ import { forwardRef, useCallback, useImperativeHandle, useMemo, useRef } from "r
14
14
  import { jsx, jsxs } from "react/jsx-runtime";
15
15
  var Toast = forwardRef((originalProps, ref) => {
16
16
  const [props, variantProps] = mapPropsVariants(originalProps, toast.variantKeys);
17
- const { placement, classNames, showIcon = true, showCloseButton = true, onClose, ...toastProps } = props;
17
+ const { width = 300, placement, classNames, showIcon = true, showCloseButton = true, onClose, ...toastProps } = props;
18
18
  const slots = useMemo(() => toast({ ...variantProps }), [variantProps]);
19
19
  const toastRef = useRef(null);
20
20
  useImperativeHandle(
@@ -31,14 +31,18 @@ var Toast = forwardRef((originalProps, ref) => {
31
31
  const getBaseProps = useCallback(
32
32
  () => ({
33
33
  className: slots.base({
34
- class: [classNames == null ? void 0 : classNames.base, (placement == null ? void 0 : placement.includes("top")) ? "animate-slideInFromTop" : "animate-slideInFromBottom"]
34
+ class: [
35
+ classNames == null ? void 0 : classNames.base,
36
+ width ? `w-[${width}px]` : "",
37
+ (placement == null ? void 0 : placement.includes("top")) ? "animate-slideInFromTop" : "animate-slideInFromBottom"
38
+ ]
35
39
  })
36
40
  }),
37
41
  [slots, classNames == null ? void 0 : classNames.base]
38
42
  );
39
43
  return /* @__PURE__ */ jsxs("div", { ref: toastRef, ...getBaseProps(), children: [
40
44
  showIcon && /* @__PURE__ */ jsx(Icon_default, { name: originalProps.icon || "info-circle", fill: true, className: "mt-[2px]" }),
41
- /* @__PURE__ */ jsx("div", { className: "flex-1", children: props.content }),
45
+ /* @__PURE__ */ jsx("div", { className: "flex-1 select-none", children: props.content }),
42
46
  showCloseButton && /* @__PURE__ */ jsx(Icon_default, { name: "close", className: "cursor-pointer mt-[2px]", onClick: onClose })
43
47
  ] });
44
48
  });
@@ -47,7 +51,6 @@ var toast_default = Toast;
47
51
  var toast = tv({
48
52
  slots: {
49
53
  base: [
50
- "w-[300px]",
51
54
  "relative",
52
55
  "inline-flex",
53
56
  "items-start",
@@ -58,7 +61,8 @@ var toast = tv({
58
61
  "gap-[5px]",
59
62
  "z-0",
60
63
  "transition-all",
61
- "duration-300"
64
+ "duration-300",
65
+ "overflow-auto"
62
66
  ],
63
67
  content: [
64
68
  "absolute",
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import {
3
3
  Icon_default
4
- } from "./chunk-AHORH5PH.mjs";
4
+ } from "./chunk-PRUAIZTU.mjs";
5
5
  import {
6
6
  mapPropsVariants
7
7
  } from "./chunk-E3G5QXSH.mjs";
@@ -1,13 +1,13 @@
1
1
  "use client";
2
- import {
3
- button_default
4
- } from "./chunk-66WCZEEU.mjs";
5
2
  import {
6
3
  Icon_default
7
- } from "./chunk-AHORH5PH.mjs";
4
+ } from "./chunk-PRUAIZTU.mjs";
8
5
  import {
9
6
  mapPropsVariants
10
7
  } from "./chunk-E3G5QXSH.mjs";
8
+ import {
9
+ button_default
10
+ } from "./chunk-66WCZEEU.mjs";
11
11
  import {
12
12
  tv
13
13
  } from "./chunk-J725QONZ.mjs";
@@ -1,11 +1,11 @@
1
1
  "use client";
2
- import {
3
- render
4
- } from "../../chunk-FNPWLOGV.mjs";
5
2
  import {
6
3
  accordion_default
7
4
  } from "../../chunk-SWR7E3NU.mjs";
8
5
  import "../../chunk-E3G5QXSH.mjs";
6
+ import {
7
+ render
8
+ } from "../../chunk-FNPWLOGV.mjs";
9
9
  import "../../chunk-J725QONZ.mjs";
10
10
  import "../../chunk-IZ6II3QA.mjs";
11
11