@deepnoid/ui 0.1.30 → 0.1.31

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 (46) hide show
  1. package/.turbo/turbo-build.log +136 -136
  2. package/dist/chunk-62X5AX5B.mjs +297 -0
  3. package/dist/{chunk-VCVQMPC7.mjs → chunk-AIIMJZ7L.mjs} +69 -39
  4. package/dist/{chunk-NKH3OF6I.mjs → chunk-BCMVEGJG.mjs} +1 -1
  5. package/dist/{chunk-QM4ZSQYX.mjs → chunk-CVQM3T2X.mjs} +1 -1
  6. package/dist/{chunk-GLMM253Q.mjs → chunk-EBRCE7XY.mjs} +2 -2
  7. package/dist/{chunk-272FMLIL.mjs → chunk-IEJRE6LT.mjs} +7 -4
  8. package/dist/{chunk-CEZQCD6Z.mjs → chunk-LWRK5TPZ.mjs} +12 -11
  9. package/dist/components/fileUpload/fileUpload.js +62 -39
  10. package/dist/components/fileUpload/fileUpload.mjs +2 -2
  11. package/dist/components/fileUpload/index.js +62 -39
  12. package/dist/components/fileUpload/index.mjs +2 -2
  13. package/dist/components/input/index.js +62 -39
  14. package/dist/components/input/index.mjs +1 -1
  15. package/dist/components/input/input.d.mts +21 -14
  16. package/dist/components/input/input.d.ts +21 -14
  17. package/dist/components/input/input.js +62 -39
  18. package/dist/components/input/input.mjs +1 -1
  19. package/dist/components/pagination/index.js +62 -39
  20. package/dist/components/pagination/index.mjs +2 -2
  21. package/dist/components/pagination/pagination.js +62 -39
  22. package/dist/components/pagination/pagination.mjs +2 -2
  23. package/dist/components/select/index.js +7 -4
  24. package/dist/components/select/index.mjs +1 -1
  25. package/dist/components/select/select.d.mts +9 -0
  26. package/dist/components/select/select.d.ts +9 -0
  27. package/dist/components/select/select.js +7 -4
  28. package/dist/components/select/select.mjs +1 -1
  29. package/dist/components/table/index.js +74 -50
  30. package/dist/components/table/index.mjs +4 -4
  31. package/dist/components/table/table-body.js +12 -11
  32. package/dist/components/table/table-body.mjs +1 -1
  33. package/dist/components/table/table.d.mts +2 -1
  34. package/dist/components/table/table.d.ts +2 -1
  35. package/dist/components/table/table.js +74 -50
  36. package/dist/components/table/table.mjs +4 -4
  37. package/dist/components/textarea/index.js +255 -138
  38. package/dist/components/textarea/index.mjs +2 -1
  39. package/dist/components/textarea/textarea.d.mts +157 -150
  40. package/dist/components/textarea/textarea.d.ts +157 -150
  41. package/dist/components/textarea/textarea.js +255 -138
  42. package/dist/components/textarea/textarea.mjs +2 -1
  43. package/dist/index.js +296 -192
  44. package/dist/index.mjs +7 -7
  45. package/package.json +1 -1
  46. package/dist/chunk-BKE6QF6W.mjs +0 -209
package/dist/index.mjs CHANGED
@@ -16,7 +16,7 @@ import {
16
16
  import "./chunk-RRAZM5D3.mjs";
17
17
  import {
18
18
  textarea_default
19
- } from "./chunk-BKE6QF6W.mjs";
19
+ } from "./chunk-62X5AX5B.mjs";
20
20
  import "./chunk-LUWGOKLG.mjs";
21
21
  import {
22
22
  ToastProvider,
@@ -33,11 +33,11 @@ import {
33
33
  import "./chunk-DX3KXNP6.mjs";
34
34
  import {
35
35
  table_default
36
- } from "./chunk-GLMM253Q.mjs";
36
+ } from "./chunk-EBRCE7XY.mjs";
37
37
  import {
38
38
  definition_table_default
39
39
  } from "./chunk-6TIIBU7J.mjs";
40
- import "./chunk-CEZQCD6Z.mjs";
40
+ import "./chunk-LWRK5TPZ.mjs";
41
41
  import "./chunk-P7YYNA6L.mjs";
42
42
  import "./chunk-DQRAFUDA.mjs";
43
43
  import {
@@ -46,7 +46,7 @@ import {
46
46
  import "./chunk-QCEKPS7U.mjs";
47
47
  import {
48
48
  select_default
49
- } from "./chunk-272FMLIL.mjs";
49
+ } from "./chunk-IEJRE6LT.mjs";
50
50
  import "./chunk-MZ76AA76.mjs";
51
51
  import {
52
52
  skeleton_default
@@ -58,7 +58,7 @@ import {
58
58
  import "./chunk-7B7LRG5J.mjs";
59
59
  import {
60
60
  pagination_default
61
- } from "./chunk-QM4ZSQYX.mjs";
61
+ } from "./chunk-CVQM3T2X.mjs";
62
62
  import "./chunk-F3HENRVM.mjs";
63
63
  import "./chunk-TPFN22HR.mjs";
64
64
  import {
@@ -83,11 +83,11 @@ import "./chunk-FWJ2ZKH6.mjs";
83
83
  import "./chunk-P732YGHO.mjs";
84
84
  import {
85
85
  fileUpload_default
86
- } from "./chunk-NKH3OF6I.mjs";
86
+ } from "./chunk-BCMVEGJG.mjs";
87
87
  import "./chunk-2GCSFWHD.mjs";
88
88
  import {
89
89
  input_default
90
- } from "./chunk-VCVQMPC7.mjs";
90
+ } from "./chunk-AIIMJZ7L.mjs";
91
91
  import "./chunk-QZ3LVYJW.mjs";
92
92
  import {
93
93
  checkbox_default
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deepnoid/ui",
3
- "version": "0.1.30",
3
+ "version": "0.1.31",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "exports": {
@@ -1,209 +0,0 @@
1
- "use client";
2
- import {
3
- mapPropsVariants
4
- } from "./chunk-E3G5QXSH.mjs";
5
-
6
- // src/components/textarea/textarea.tsx
7
- import { forwardRef, useCallback, useMemo } from "react";
8
- import { tv } from "tailwind-variants";
9
- import { jsx, jsxs } from "react/jsx-runtime";
10
- var Textarea = forwardRef((originalProps, ref) => {
11
- const [props, variantProps] = mapPropsVariants(originalProps, textareaStyle.variantKeys);
12
- const { classNames, label, errorMessage, ...textareaProps } = props;
13
- const slots = useMemo(() => textareaStyle({ ...variantProps }), [variantProps]);
14
- const getBaseProps = useCallback(
15
- () => ({
16
- className: slots.base({ class: classNames == null ? void 0 : classNames.base })
17
- }),
18
- [slots, classNames]
19
- );
20
- const getLabelProps = useCallback(
21
- () => ({
22
- className: slots.label({ class: classNames == null ? void 0 : classNames.label })
23
- }),
24
- [slots, classNames]
25
- );
26
- const getInnerWrapperProps = useCallback(
27
- () => ({
28
- className: slots.innerWrapper({ class: classNames == null ? void 0 : classNames.innerWrapper })
29
- }),
30
- [slots, classNames]
31
- );
32
- const getTextareaWrapperProps = useCallback(
33
- () => ({
34
- className: slots.textareaWrapper({ class: classNames == null ? void 0 : classNames.textareaWrapper })
35
- }),
36
- [slots, classNames]
37
- );
38
- const getTextareaProps = useCallback(
39
- () => ({
40
- ...textareaProps,
41
- ref,
42
- className: slots.textarea({ class: classNames == null ? void 0 : classNames.textarea }),
43
- disabled: originalProps.isDisabled,
44
- required: originalProps.isRequired,
45
- size: 0
46
- }),
47
- [textareaProps, ref, slots, classNames == null ? void 0 : classNames.textarea, originalProps.isDisabled, originalProps.isRequired]
48
- );
49
- const getErrorMessageProps = useCallback(
50
- () => ({
51
- className: slots.errorMessage({ class: classNames == null ? void 0 : classNames.errorMessage })
52
- }),
53
- [slots, classNames]
54
- );
55
- return /* @__PURE__ */ jsxs("div", { ...getBaseProps(), children: [
56
- props.label && /* @__PURE__ */ jsx("label", { ...getLabelProps(), children: props.label }),
57
- /* @__PURE__ */ jsxs("div", { ...getInnerWrapperProps(), children: [
58
- /* @__PURE__ */ jsx("div", { ...getTextareaWrapperProps(), children: /* @__PURE__ */ jsx("textarea", { ...getTextareaProps() }) }),
59
- props.errorMessage && /* @__PURE__ */ jsx("p", { ...getErrorMessageProps(), children: props.errorMessage })
60
- ] })
61
- ] });
62
- });
63
- Textarea.displayName = "Textarea";
64
- var textarea_default = Textarea;
65
- var textareaStyle = tv({
66
- slots: {
67
- base: ["group/textarea", "flex", "flex-col", "gap-[10px]", "select-none"],
68
- label: ["flex", "items-center"],
69
- innerWrapper: ["flex", "flex-col", "gap-[6px]"],
70
- textareaWrapper: [
71
- "flex",
72
- "bg-transparent",
73
- "border-neutral-main",
74
- "group-has-[p]/textarea:border-danger-main",
75
- "group-has-[p]/textarea:bg-danger-soft",
76
- "transition duration-200"
77
- ],
78
- textarea: [
79
- "w-full",
80
- "bg-transparent",
81
- "placeholder:text-neutral-main",
82
- "focus-visible:outline-none",
83
- "resize-none"
84
- ],
85
- errorMessage: ["text-danger-main"]
86
- },
87
- variants: {
88
- variant: {
89
- solid: {
90
- textareaWrapper: ["bg-trans-soft", "hover:bg-trans-light", "has-[:focus]:bg-trans-light"]
91
- },
92
- line: {
93
- textareaWrapper: ["border", "hover:bg-trans-soft", "has-[:focus]:bg-trans-soft"]
94
- }
95
- },
96
- color: {
97
- primary: {},
98
- secondary: {}
99
- },
100
- size: {
101
- sm: {
102
- base: "gap-[6px]",
103
- textareaWrapper: "w-[240px] rounded-sm p-[6px]",
104
- textarea: "text-sm rounded-sm",
105
- label: "text-sm",
106
- errorMessage: "text-sm"
107
- },
108
- md: {
109
- base: "gap-[8px]",
110
- textareaWrapper: "w-[240px] rounded-md p-[8px]",
111
- textarea: "text-md rounded-md",
112
- label: "text-md",
113
- errorMessage: "text-md"
114
- },
115
- lg: {
116
- base: "gap-[10px]",
117
- textareaWrapper: "w-[240px] rounded-lg p-[10px]",
118
- textarea: "text-lg rounded-lg",
119
- label: "text-lg",
120
- errorMessage: "text-lg"
121
- },
122
- xl: {
123
- base: "gap-[10px]",
124
- textareaWrapper: "w-[240px] rounded-xl p-[10px]",
125
- textarea: "text-xl rounded-xl",
126
- label: "text-xl",
127
- errorMessage: "text-xl"
128
- }
129
- },
130
- radius: {
131
- default: {},
132
- none: {
133
- textareaWrapper: "rounded-none",
134
- textarea: "rounded-none"
135
- },
136
- full: {
137
- textareaWrapper: "rounded-full",
138
- textarea: "rounded-full"
139
- }
140
- },
141
- fullWidth: {
142
- true: {
143
- base: "w-full",
144
- textareaWrapper: "w-full",
145
- textarea: "w-full"
146
- }
147
- },
148
- isDisabled: {
149
- true: {
150
- base: ["opacity-disabled", "pointer-events-none"],
151
- textareaWrapper: ["bg-neutral-soft", "border-neutral-light", "pointer-events-none"],
152
- textarea: ["text-neutral-light placeholder:text-neutral-light", "border-neutral-light"],
153
- label: ["text-neutral-light", "pointer-events-none"],
154
- errorMessage: "text-danger-light"
155
- }
156
- },
157
- isRequired: {
158
- true: {
159
- label: ["after:content-['*']", "after:text-danger-main", "after:ml-0.5"]
160
- }
161
- }
162
- },
163
- defaultVariants: {
164
- variant: "solid",
165
- color: "primary",
166
- size: "md",
167
- fullWidth: false,
168
- isDisabled: false,
169
- isRequired: false
170
- },
171
- compoundVariants: [
172
- // variants & color
173
- {
174
- variant: "line",
175
- color: "primary",
176
- class: {
177
- textareaWrapper: "has-[:focus]:border-primary-main"
178
- }
179
- },
180
- {
181
- variant: "line",
182
- color: "secondary",
183
- class: {
184
- textareaWrapper: "has-[:focus]:border-secondary-main",
185
- textarea: "focus:bg-secondary-main"
186
- }
187
- },
188
- // Variants & isDisabled
189
- {
190
- variant: "line",
191
- isDisabled: true,
192
- class: {
193
- textareaWrapper: "bg-neutral-soft"
194
- }
195
- },
196
- // isRequired & isDisabled
197
- {
198
- isRequired: true,
199
- isDisabled: true,
200
- class: {
201
- label: "after:text-danger-light"
202
- }
203
- }
204
- ]
205
- });
206
-
207
- export {
208
- textarea_default
209
- };