@deepnoid/ui 0.1.20 → 0.1.21

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 (102) hide show
  1. package/.turbo/turbo-build.log +149 -159
  2. package/dist/{chunk-JOCMCOEK.mjs → chunk-2Y7IBUAZ.mjs} +17 -6
  3. package/dist/{chunk-LNYMVBV5.mjs → chunk-7CFOD7G4.mjs} +11 -9
  4. package/dist/{chunk-YBDA3WQP.mjs → chunk-7KUFDVGL.mjs} +1 -1
  5. package/dist/{chunk-6KXBXGYR.mjs → chunk-HQLSHEK6.mjs} +1 -1
  6. package/dist/{chunk-EYVRTVRM.mjs → chunk-JHDYQCEE.mjs} +5 -5
  7. package/dist/{chunk-3DPVPTHL.mjs → chunk-MV7RSV4D.mjs} +3 -3
  8. package/dist/chunk-MW7CSRIE.mjs +348 -0
  9. package/dist/{chunk-ZUSUVPYV.mjs → chunk-OV7CZNXU.mjs} +5 -5
  10. package/dist/{chunk-OWG4RL2T.mjs → chunk-Q6BZ76DI.mjs} +2 -2
  11. package/dist/{chunk-63WXGSTV.mjs → chunk-QHWFHOW2.mjs} +24 -14
  12. package/dist/{chunk-EGHTZLZJ.mjs → chunk-UTC2D6GV.mjs} +5 -5
  13. package/dist/components/backdrop/backdrop.mjs +2 -2
  14. package/dist/components/backdrop/index.mjs +2 -2
  15. package/dist/components/breadcrumb/breadcrumb.mjs +6 -6
  16. package/dist/components/breadcrumb/index.mjs +6 -6
  17. package/dist/components/button/button.mjs +2 -2
  18. package/dist/components/button/icon-button.mjs +2 -2
  19. package/dist/components/button/index.mjs +5 -5
  20. package/dist/components/button/text-button.mjs +3 -3
  21. package/dist/components/checkbox/checkbox.mjs +3 -3
  22. package/dist/components/checkbox/index.mjs +3 -3
  23. package/dist/components/chip/chip.mjs +2 -2
  24. package/dist/components/chip/index.mjs +2 -2
  25. package/dist/components/dateTimePicker/calendar.mjs +2 -2
  26. package/dist/components/dateTimePicker/dateTimePicker.mjs +6 -6
  27. package/dist/components/dateTimePicker/index.mjs +6 -6
  28. package/dist/components/dateTimePicker/timePicker.mjs +4 -4
  29. package/dist/components/input/index.js +13 -2
  30. package/dist/components/input/index.mjs +3 -3
  31. package/dist/components/input/input.js +13 -2
  32. package/dist/components/input/input.mjs +3 -3
  33. package/dist/components/list/index.mjs +3 -3
  34. package/dist/components/list/list.mjs +2 -2
  35. package/dist/components/list/listItem.mjs +2 -2
  36. package/dist/components/modal/index.mjs +8 -8
  37. package/dist/components/modal/modal.mjs +8 -8
  38. package/dist/components/pagination/index.js +13 -2
  39. package/dist/components/pagination/index.mjs +4 -4
  40. package/dist/components/pagination/pagination.js +13 -2
  41. package/dist/components/pagination/pagination.mjs +4 -4
  42. package/dist/components/radio/index.mjs +3 -3
  43. package/dist/components/radio/radio.mjs +3 -3
  44. package/dist/components/select/index.d.mts +1 -1
  45. package/dist/components/select/index.d.ts +1 -1
  46. package/dist/components/select/index.js +301 -286
  47. package/dist/components/select/index.mjs +3 -4
  48. package/dist/components/select/select.d.mts +190 -177
  49. package/dist/components/select/select.d.ts +190 -177
  50. package/dist/components/select/select.js +301 -286
  51. package/dist/components/select/select.mjs +3 -4
  52. package/dist/components/table/index.js +43 -20
  53. package/dist/components/table/index.mjs +8 -8
  54. package/dist/components/table/table-body.d.mts +3 -2
  55. package/dist/components/table/table-body.d.ts +3 -2
  56. package/dist/components/table/table-body.js +23 -13
  57. package/dist/components/table/table-body.mjs +4 -4
  58. package/dist/components/table/table-head.d.mts +2 -2
  59. package/dist/components/table/table-head.d.ts +2 -2
  60. package/dist/components/table/table-head.js +2 -2
  61. package/dist/components/table/table-head.mjs +4 -4
  62. package/dist/components/table/table.d.mts +2 -1
  63. package/dist/components/table/table.d.ts +2 -1
  64. package/dist/components/table/table.js +43 -20
  65. package/dist/components/table/table.mjs +8 -8
  66. package/dist/components/tabs/index.mjs +2 -2
  67. package/dist/components/tabs/tabs.mjs +2 -2
  68. package/dist/components/toast/index.mjs +4 -4
  69. package/dist/components/toast/toast.mjs +3 -3
  70. package/dist/components/toast/use-toast.mjs +4 -4
  71. package/dist/components/tooltip/index.mjs +2 -2
  72. package/dist/components/tooltip/tooltip.mjs +2 -2
  73. package/dist/components/tree/index.mjs +3 -3
  74. package/dist/components/tree/tree.mjs +3 -3
  75. package/dist/index.js +490 -494
  76. package/dist/index.mjs +50 -52
  77. package/package.json +1 -1
  78. package/dist/chunk-BXXAMH3R.mjs +0 -255
  79. package/dist/chunk-OF3X4BXG.mjs +0 -76
  80. package/dist/chunk-S3QS5B7F.mjs +0 -61
  81. package/dist/components/select/option.d.mts +0 -17
  82. package/dist/components/select/option.d.ts +0 -17
  83. package/dist/components/select/option.js +0 -4359
  84. package/dist/components/select/option.mjs +0 -12
  85. package/dist/components/select/useSelect.d.mts +0 -31
  86. package/dist/components/select/useSelect.d.ts +0 -31
  87. package/dist/components/select/useSelect.js +0 -84
  88. package/dist/components/select/useSelect.mjs +0 -8
  89. package/dist/{chunk-OUAKGMDW.mjs → chunk-2DLKV6TT.mjs} +4 -4
  90. package/dist/{chunk-D6QI3DJG.mjs → chunk-7H5XPHY6.mjs} +4 -4
  91. package/dist/{chunk-Q72LZAPG.mjs → chunk-DUPQBPI2.mjs} +3 -3
  92. package/dist/{chunk-VQROXH43.mjs → chunk-EWZAHXN7.mjs} +3 -3
  93. package/dist/{chunk-6HX3PPL6.mjs → chunk-FBAR75U4.mjs} +3 -3
  94. package/dist/{chunk-Z2537DF6.mjs → chunk-IL5ENWCR.mjs} +3 -3
  95. package/dist/{chunk-WFMFC7R6.mjs → chunk-KCOHU7X7.mjs} +4 -4
  96. package/dist/{chunk-PNRS23HE.mjs → chunk-MQI5SZWO.mjs} +3 -3
  97. package/dist/{chunk-LL6F3WDX.mjs → chunk-P5QCU457.mjs} +3 -3
  98. package/dist/{chunk-PZIVMTKX.mjs → chunk-SDHQUYFI.mjs} +3 -3
  99. package/dist/{chunk-2YMAKIZ6.mjs → chunk-SSMMWMQC.mjs} +3 -3
  100. package/dist/{chunk-HIVPDIEP.mjs → chunk-UFVQPPPW.mjs} +3 -3
  101. package/dist/{chunk-BPVRXFIC.mjs → chunk-XGYQ6D3S.mjs} +3 -3
  102. package/dist/{chunk-QIRL6HY6.mjs → chunk-YIIFWADW.mjs} +4 -4
@@ -1,12 +0,0 @@
1
- "use client";
2
- import {
3
- option_default
4
- } from "../../chunk-OF3X4BXG.mjs";
5
- import "../../chunk-ZYIIXWVY.mjs";
6
- import "../../chunk-HWL7TPUN.mjs";
7
- import "../../chunk-3IU2RPSM.mjs";
8
- import "../../chunk-4ZJFD3L3.mjs";
9
- import "../../chunk-AC6TWLRT.mjs";
10
- export {
11
- option_default as default
12
- };
@@ -1,31 +0,0 @@
1
- import * as react from 'react';
2
- import { SelectOption } from './select.mjs';
3
- import 'tailwind-variants';
4
- import '../../utils/types.mjs';
5
-
6
- interface SelectHookProps {
7
- options: SelectOption[];
8
- defaultOption?: SelectOption;
9
- onChange?: (option: SelectOption) => void;
10
- }
11
- type TargetRect = {
12
- x: number;
13
- y: number;
14
- width: number;
15
- height: number;
16
- };
17
- declare const useSelect: ({ options, defaultOption, onChange }: SelectHookProps) => {
18
- selectedOption: SelectOption | undefined;
19
- targetRect: TargetRect | null;
20
- optionWrapperHeight: number;
21
- selectWrapperRef: react.RefObject<HTMLDivElement | null>;
22
- optionWrapperRef: react.RefObject<HTMLDivElement | null>;
23
- handleToggleSelect: () => void;
24
- handleChangeOption: (option: SelectOption) => void;
25
- calculatePositionWithScroll: (targetRect: TargetRect, optionWrapperHeight: number) => {
26
- top: number;
27
- left: number;
28
- };
29
- };
30
-
31
- export { useSelect };
@@ -1,31 +0,0 @@
1
- import * as react from 'react';
2
- import { SelectOption } from './select.js';
3
- import 'tailwind-variants';
4
- import '../../utils/types.js';
5
-
6
- interface SelectHookProps {
7
- options: SelectOption[];
8
- defaultOption?: SelectOption;
9
- onChange?: (option: SelectOption) => void;
10
- }
11
- type TargetRect = {
12
- x: number;
13
- y: number;
14
- width: number;
15
- height: number;
16
- };
17
- declare const useSelect: ({ options, defaultOption, onChange }: SelectHookProps) => {
18
- selectedOption: SelectOption | undefined;
19
- targetRect: TargetRect | null;
20
- optionWrapperHeight: number;
21
- selectWrapperRef: react.RefObject<HTMLDivElement | null>;
22
- optionWrapperRef: react.RefObject<HTMLDivElement | null>;
23
- handleToggleSelect: () => void;
24
- handleChangeOption: (option: SelectOption) => void;
25
- calculatePositionWithScroll: (targetRect: TargetRect, optionWrapperHeight: number) => {
26
- top: number;
27
- left: number;
28
- };
29
- };
30
-
31
- export { useSelect };
@@ -1,84 +0,0 @@
1
- "use client";
2
- "use strict";
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __export = (target, all) => {
8
- for (var name in all)
9
- __defProp(target, name, { get: all[name], enumerable: true });
10
- };
11
- var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from))
14
- if (!__hasOwnProp.call(to, key) && key !== except)
15
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
- }
17
- return to;
18
- };
19
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
-
21
- // src/components/select/useSelect.tsx
22
- var useSelect_exports = {};
23
- __export(useSelect_exports, {
24
- useSelect: () => useSelect
25
- });
26
- module.exports = __toCommonJS(useSelect_exports);
27
- var import_react = require("react");
28
- var useSelect = ({ options, defaultOption, onChange }) => {
29
- const [selectedOption, setSelectedOption] = (0, import_react.useState)(defaultOption);
30
- const [targetRect, setTargetRect] = (0, import_react.useState)(null);
31
- const [optionWrapperHeight, setOptionWrapperHeight] = (0, import_react.useState)(0);
32
- const selectWrapperRef = (0, import_react.useRef)(null);
33
- const optionWrapperRef = (0, import_react.useRef)(null);
34
- const calculatePositionWithScroll = (targetRect2, optionWrapperHeight2) => {
35
- const scrollTop = window.scrollY || document.documentElement.scrollTop || document.body.scrollTop;
36
- const scrollLeft = window.scrollX || document.documentElement.scrollLeft || document.body.scrollLeft;
37
- const spaceBelow = window.innerHeight - (targetRect2.y + targetRect2.height + 4);
38
- const spaceAbove = targetRect2.y - 4;
39
- const top = spaceBelow < optionWrapperHeight2 && spaceAbove > optionWrapperHeight2 ? targetRect2.y - optionWrapperHeight2 - 4 : targetRect2.y + targetRect2.height + 4;
40
- return {
41
- top: top + scrollTop,
42
- left: targetRect2.x + scrollLeft
43
- };
44
- };
45
- const handleToggleSelect = () => {
46
- if (selectWrapperRef.current) {
47
- const rect = selectWrapperRef.current.getBoundingClientRect();
48
- setTargetRect((prevRect) => prevRect ? null : { x: rect.x, y: rect.y, width: rect.width, height: rect.height });
49
- }
50
- };
51
- const handleChangeOption = (option) => {
52
- onChange == null ? void 0 : onChange(option);
53
- setSelectedOption(option);
54
- handleToggleSelect();
55
- };
56
- (0, import_react.useEffect)(() => {
57
- const onClickOutside = (e) => {
58
- if (optionWrapperRef.current && !optionWrapperRef.current.contains(e.target)) {
59
- setTargetRect(null);
60
- }
61
- };
62
- window.addEventListener("mousedown", onClickOutside);
63
- return () => window.removeEventListener("mousedown", onClickOutside);
64
- }, []);
65
- (0, import_react.useEffect)(() => {
66
- if (optionWrapperRef.current) {
67
- setOptionWrapperHeight(optionWrapperRef.current.getBoundingClientRect().height);
68
- }
69
- }, [targetRect]);
70
- return {
71
- selectedOption,
72
- targetRect,
73
- optionWrapperHeight,
74
- selectWrapperRef,
75
- optionWrapperRef,
76
- handleToggleSelect,
77
- handleChangeOption,
78
- calculatePositionWithScroll
79
- };
80
- };
81
- // Annotate the CommonJS export names for ESM import in node:
82
- 0 && (module.exports = {
83
- useSelect
84
- });
@@ -1,8 +0,0 @@
1
- "use client";
2
- import {
3
- useSelect
4
- } from "../../chunk-S3QS5B7F.mjs";
5
- import "../../chunk-AC6TWLRT.mjs";
6
- export {
7
- useSelect
8
- };
@@ -3,14 +3,14 @@ import {
3
3
  Icon_default
4
4
  } from "./chunk-HWL7TPUN.mjs";
5
5
  import {
6
- tv
7
- } from "./chunk-4ZJFD3L3.mjs";
6
+ mapPropsVariants
7
+ } from "./chunk-E3G5QXSH.mjs";
8
8
  import {
9
9
  clsx
10
10
  } from "./chunk-27Y6K5NK.mjs";
11
11
  import {
12
- mapPropsVariants
13
- } from "./chunk-E3G5QXSH.mjs";
12
+ tv
13
+ } from "./chunk-4ZJFD3L3.mjs";
14
14
 
15
15
  // src/components/toast/toast.tsx
16
16
  import { forwardRef, useImperativeHandle, useMemo, useRef } from "react";
@@ -1,13 +1,13 @@
1
1
  "use client";
2
2
  import {
3
- tv
4
- } from "./chunk-4ZJFD3L3.mjs";
3
+ mapPropsVariants
4
+ } from "./chunk-E3G5QXSH.mjs";
5
5
  import {
6
6
  clsx
7
7
  } from "./chunk-27Y6K5NK.mjs";
8
8
  import {
9
- mapPropsVariants
10
- } from "./chunk-E3G5QXSH.mjs";
9
+ tv
10
+ } from "./chunk-4ZJFD3L3.mjs";
11
11
 
12
12
  // src/components/checkbox/checkbox.tsx
13
13
  import { forwardRef, useMemo } from "react";
@@ -6,12 +6,12 @@ import {
6
6
  import {
7
7
  Icon_default
8
8
  } from "./chunk-HWL7TPUN.mjs";
9
- import {
10
- tv
11
- } from "./chunk-4ZJFD3L3.mjs";
12
9
  import {
13
10
  mapPropsVariants
14
11
  } from "./chunk-E3G5QXSH.mjs";
12
+ import {
13
+ tv
14
+ } from "./chunk-4ZJFD3L3.mjs";
15
15
 
16
16
  // src/components/dateTimePicker/calendar.tsx
17
17
  import React, {
@@ -8,12 +8,12 @@ import {
8
8
  import {
9
9
  Icon_default
10
10
  } from "./chunk-HWL7TPUN.mjs";
11
- import {
12
- tv
13
- } from "./chunk-4ZJFD3L3.mjs";
14
11
  import {
15
12
  mapPropsVariants
16
13
  } from "./chunk-E3G5QXSH.mjs";
14
+ import {
15
+ tv
16
+ } from "./chunk-4ZJFD3L3.mjs";
17
17
 
18
18
  // src/components/button/icon-button.tsx
19
19
  import { forwardRef, useMemo, useCallback } from "react";
@@ -2,12 +2,12 @@
2
2
  import {
3
3
  Icon_default
4
4
  } from "./chunk-HWL7TPUN.mjs";
5
- import {
6
- tv
7
- } from "./chunk-4ZJFD3L3.mjs";
8
5
  import {
9
6
  mapPropsVariants
10
7
  } from "./chunk-E3G5QXSH.mjs";
8
+ import {
9
+ tv
10
+ } from "./chunk-4ZJFD3L3.mjs";
11
11
 
12
12
  // src/components/chip/chip.tsx
13
13
  import { forwardRef, useMemo } from "react";
@@ -6,12 +6,12 @@ import {
6
6
  getTailClassName,
7
7
  getTailStyles
8
8
  } from "./chunk-WSIADHVC.mjs";
9
- import {
10
- tv
11
- } from "./chunk-4ZJFD3L3.mjs";
12
9
  import {
13
10
  mapPropsVariants
14
11
  } from "./chunk-E3G5QXSH.mjs";
12
+ import {
13
+ tv
14
+ } from "./chunk-4ZJFD3L3.mjs";
15
15
 
16
16
  // src/components/tooltip/tooltip.tsx
17
17
  import { forwardRef, useCallback, useMemo, useRef, useState, useEffect } from "react";
@@ -1,13 +1,13 @@
1
1
  "use client";
2
2
  import {
3
- tv
4
- } from "./chunk-4ZJFD3L3.mjs";
3
+ mapPropsVariants
4
+ } from "./chunk-E3G5QXSH.mjs";
5
5
  import {
6
6
  clsx
7
7
  } from "./chunk-27Y6K5NK.mjs";
8
8
  import {
9
- mapPropsVariants
10
- } from "./chunk-E3G5QXSH.mjs";
9
+ tv
10
+ } from "./chunk-4ZJFD3L3.mjs";
11
11
 
12
12
  // src/components/button/text-button.tsx
13
13
  import {
@@ -8,12 +8,12 @@ import {
8
8
  import {
9
9
  Icon_default
10
10
  } from "./chunk-HWL7TPUN.mjs";
11
- import {
12
- tv
13
- } from "./chunk-4ZJFD3L3.mjs";
14
11
  import {
15
12
  mapPropsVariants
16
13
  } from "./chunk-E3G5QXSH.mjs";
14
+ import {
15
+ tv
16
+ } from "./chunk-4ZJFD3L3.mjs";
17
17
 
18
18
  // src/components/button/button.tsx
19
19
  import React, { forwardRef, useMemo, useCallback } from "react";
@@ -1,10 +1,10 @@
1
1
  "use client";
2
- import {
3
- tv
4
- } from "./chunk-4ZJFD3L3.mjs";
5
2
  import {
6
3
  clsx
7
4
  } from "./chunk-27Y6K5NK.mjs";
5
+ import {
6
+ tv
7
+ } from "./chunk-4ZJFD3L3.mjs";
8
8
 
9
9
  // src/components/backdrop/backdrop.tsx
10
10
  import { useEffect, useState } from "react";
@@ -2,15 +2,15 @@
2
2
  import {
3
3
  Icon_default
4
4
  } from "./chunk-HWL7TPUN.mjs";
5
+ import {
6
+ mapPropsVariants
7
+ } from "./chunk-E3G5QXSH.mjs";
5
8
  import {
6
9
  avatar_default
7
10
  } from "./chunk-XQGD4ZIX.mjs";
8
11
  import {
9
12
  tv
10
13
  } from "./chunk-4ZJFD3L3.mjs";
11
- import {
12
- mapPropsVariants
13
- } from "./chunk-E3G5QXSH.mjs";
14
14
 
15
15
  // src/components/list/listItem.tsx
16
16
  import { forwardRef, useMemo } from "react";
@@ -1,10 +1,10 @@
1
1
  "use client";
2
- import {
3
- tv
4
- } from "./chunk-4ZJFD3L3.mjs";
5
2
  import {
6
3
  mapPropsVariants
7
4
  } from "./chunk-E3G5QXSH.mjs";
5
+ import {
6
+ tv
7
+ } from "./chunk-4ZJFD3L3.mjs";
8
8
 
9
9
  // src/components/tabs/tabs.tsx
10
10
  import { forwardRef, useCallback, useMemo, useState } from "react";
@@ -1,10 +1,10 @@
1
1
  "use client";
2
- import {
3
- tv
4
- } from "./chunk-4ZJFD3L3.mjs";
5
2
  import {
6
3
  mapPropsVariants
7
4
  } from "./chunk-E3G5QXSH.mjs";
5
+ import {
6
+ tv
7
+ } from "./chunk-4ZJFD3L3.mjs";
8
8
 
9
9
  // src/components/list/list.tsx
10
10
  import { Children, cloneElement, forwardRef, isValidElement, useMemo } from "react";
@@ -2,15 +2,15 @@
2
2
  import {
3
3
  Icon_default
4
4
  } from "./chunk-HWL7TPUN.mjs";
5
+ import {
6
+ tv
7
+ } from "./chunk-4ZJFD3L3.mjs";
5
8
  import {
6
9
  cogwheel_default
7
10
  } from "./chunk-7USF56CT.mjs";
8
11
  import {
9
12
  folder_default
10
13
  } from "./chunk-IZM66FHP.mjs";
11
- import {
12
- tv
13
- } from "./chunk-4ZJFD3L3.mjs";
14
14
 
15
15
  // src/components/tree/tree.tsx
16
16
  import { forwardRef, useMemo, useState, useCallback } from "react";
@@ -1,13 +1,13 @@
1
1
  "use client";
2
2
  import {
3
- tv
4
- } from "./chunk-4ZJFD3L3.mjs";
3
+ mapPropsVariants
4
+ } from "./chunk-E3G5QXSH.mjs";
5
5
  import {
6
6
  clsx
7
7
  } from "./chunk-27Y6K5NK.mjs";
8
8
  import {
9
- mapPropsVariants
10
- } from "./chunk-E3G5QXSH.mjs";
9
+ tv
10
+ } from "./chunk-4ZJFD3L3.mjs";
11
11
 
12
12
  // src/components/radio/radio.tsx
13
13
  import { forwardRef, useMemo } from "react";