@deepnoid/ui 0.1.20 → 0.1.22

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 (56) hide show
  1. package/.turbo/turbo-build.log +162 -172
  2. package/dist/{chunk-LNYMVBV5.mjs → chunk-6OMHIMIA.mjs} +8 -6
  3. package/dist/{chunk-3DPVPTHL.mjs → chunk-EAK5DVWA.mjs} +2 -2
  4. package/dist/{chunk-3BKCODIL.mjs → chunk-ICZTNO4V.mjs} +3 -3
  5. package/dist/{chunk-EGHTZLZJ.mjs → chunk-IVK24VIL.mjs} +1 -1
  6. package/dist/chunk-MSAULFDB.mjs +348 -0
  7. package/dist/{chunk-JOCMCOEK.mjs → chunk-P5PJTJLY.mjs} +13 -2
  8. package/dist/{chunk-63WXGSTV.mjs → chunk-XRC5OUYQ.mjs} +23 -13
  9. package/dist/components/input/index.js +13 -2
  10. package/dist/components/input/index.mjs +1 -1
  11. package/dist/components/input/input.js +13 -2
  12. package/dist/components/input/input.mjs +1 -1
  13. package/dist/components/modal/index.mjs +1 -1
  14. package/dist/components/modal/modal.mjs +1 -1
  15. package/dist/components/pagination/index.js +13 -2
  16. package/dist/components/pagination/index.mjs +2 -2
  17. package/dist/components/pagination/pagination.js +13 -2
  18. package/dist/components/pagination/pagination.mjs +2 -2
  19. package/dist/components/select/index.d.mts +1 -1
  20. package/dist/components/select/index.d.ts +1 -1
  21. package/dist/components/select/index.js +301 -286
  22. package/dist/components/select/index.mjs +2 -3
  23. package/dist/components/select/select.d.mts +190 -177
  24. package/dist/components/select/select.d.ts +190 -177
  25. package/dist/components/select/select.js +301 -286
  26. package/dist/components/select/select.mjs +2 -3
  27. package/dist/components/table/form-table.js +3 -3
  28. package/dist/components/table/form-table.mjs +1 -1
  29. package/dist/components/table/index.js +46 -23
  30. package/dist/components/table/index.mjs +6 -6
  31. package/dist/components/table/table-body.d.mts +3 -2
  32. package/dist/components/table/table-body.d.ts +3 -2
  33. package/dist/components/table/table-body.js +23 -13
  34. package/dist/components/table/table-body.mjs +1 -1
  35. package/dist/components/table/table-head.d.mts +2 -2
  36. package/dist/components/table/table-head.d.ts +2 -2
  37. package/dist/components/table/table-head.js +2 -2
  38. package/dist/components/table/table-head.mjs +1 -1
  39. package/dist/components/table/table.d.mts +2 -1
  40. package/dist/components/table/table.d.ts +2 -1
  41. package/dist/components/table/table.js +43 -20
  42. package/dist/components/table/table.mjs +5 -5
  43. package/dist/index.js +493 -497
  44. package/dist/index.mjs +28 -30
  45. package/package.json +1 -1
  46. package/dist/chunk-BXXAMH3R.mjs +0 -255
  47. package/dist/chunk-OF3X4BXG.mjs +0 -76
  48. package/dist/chunk-S3QS5B7F.mjs +0 -61
  49. package/dist/components/select/option.d.mts +0 -17
  50. package/dist/components/select/option.d.ts +0 -17
  51. package/dist/components/select/option.js +0 -4359
  52. package/dist/components/select/option.mjs +0 -12
  53. package/dist/components/select/useSelect.d.mts +0 -31
  54. package/dist/components/select/useSelect.d.ts +0 -31
  55. package/dist/components/select/useSelect.js +0 -84
  56. package/dist/components/select/useSelect.mjs +0 -8
package/dist/index.mjs CHANGED
@@ -1,10 +1,4 @@
1
1
  "use client";
2
- import "./chunk-HIE2YRGA.mjs";
3
- import {
4
- tooltip_default
5
- } from "./chunk-Z2537DF6.mjs";
6
- import "./chunk-ZMOAFSYE.mjs";
7
- import "./chunk-WSIADHVC.mjs";
8
2
  import "./chunk-MBLZYQCN.mjs";
9
3
  import {
10
4
  tree_default
@@ -13,10 +7,6 @@ import "./chunk-RRAZM5D3.mjs";
13
7
  import {
14
8
  textarea_default
15
9
  } from "./chunk-BKE6QF6W.mjs";
16
- import "./chunk-3MY6LO7N.mjs";
17
- import {
18
- tabs_default
19
- } from "./chunk-2YMAKIZ6.mjs";
20
10
  import "./chunk-LUWGOKLG.mjs";
21
11
  import {
22
12
  ToastProvider,
@@ -26,19 +16,25 @@ import "./chunk-ZOTHPHXA.mjs";
26
16
  import {
27
17
  toast_default
28
18
  } from "./chunk-OUAKGMDW.mjs";
29
- import "./chunk-LVFI2NOH.mjs";
19
+ import "./chunk-HIE2YRGA.mjs";
30
20
  import {
31
- switch_default
32
- } from "./chunk-Z74QNVPG.mjs";
21
+ tooltip_default
22
+ } from "./chunk-Z2537DF6.mjs";
23
+ import "./chunk-ZMOAFSYE.mjs";
24
+ import "./chunk-WSIADHVC.mjs";
33
25
  import "./chunk-DX3KXNP6.mjs";
34
26
  import {
35
27
  form_table_default
36
- } from "./chunk-3BKCODIL.mjs";
28
+ } from "./chunk-ICZTNO4V.mjs";
37
29
  import {
38
30
  table_default
39
- } from "./chunk-LNYMVBV5.mjs";
40
- import "./chunk-63WXGSTV.mjs";
41
- import "./chunk-3DPVPTHL.mjs";
31
+ } from "./chunk-6OMHIMIA.mjs";
32
+ import "./chunk-XRC5OUYQ.mjs";
33
+ import "./chunk-EAK5DVWA.mjs";
34
+ import "./chunk-3MY6LO7N.mjs";
35
+ import {
36
+ tabs_default
37
+ } from "./chunk-2YMAKIZ6.mjs";
42
38
  import "./chunk-DQRAFUDA.mjs";
43
39
  import {
44
40
  scrollArea_default
@@ -46,9 +42,11 @@ import {
46
42
  import "./chunk-QCEKPS7U.mjs";
47
43
  import {
48
44
  select_default
49
- } from "./chunk-BXXAMH3R.mjs";
50
- import "./chunk-S3QS5B7F.mjs";
51
- import "./chunk-OF3X4BXG.mjs";
45
+ } from "./chunk-MSAULFDB.mjs";
46
+ import "./chunk-LVFI2NOH.mjs";
47
+ import {
48
+ switch_default
49
+ } from "./chunk-Z74QNVPG.mjs";
52
50
  import "./chunk-DJOG6Z35.mjs";
53
51
  import {
54
52
  modal_default
@@ -56,21 +54,21 @@ import {
56
54
  import "./chunk-7B7LRG5J.mjs";
57
55
  import {
58
56
  pagination_default
59
- } from "./chunk-EGHTZLZJ.mjs";
57
+ } from "./chunk-IVK24VIL.mjs";
60
58
  import "./chunk-F3HENRVM.mjs";
61
59
  import "./chunk-TPFN22HR.mjs";
62
60
  import {
63
61
  radio_default
64
62
  } from "./chunk-QIRL6HY6.mjs";
65
- import "./chunk-2GCSFWHD.mjs";
66
- import {
67
- input_default
68
- } from "./chunk-JOCMCOEK.mjs";
69
- import "./chunk-QZ3LVYJW.mjs";
70
63
  import "./chunk-MGEWSREV.mjs";
71
64
  import {
72
65
  chip_default
73
66
  } from "./chunk-6HX3PPL6.mjs";
67
+ import "./chunk-2GCSFWHD.mjs";
68
+ import {
69
+ input_default
70
+ } from "./chunk-P5PJTJLY.mjs";
71
+ import "./chunk-QZ3LVYJW.mjs";
74
72
  import "./chunk-75HLCORR.mjs";
75
73
  import {
76
74
  dateTimePicker_default
@@ -116,15 +114,15 @@ import {
116
114
  } from "./chunk-D6QI3DJG.mjs";
117
115
  import "./chunk-7USF56CT.mjs";
118
116
  import "./chunk-IZM66FHP.mjs";
119
- import "./chunk-SE5TU755.mjs";
120
- import {
121
- backdrop_default
122
- } from "./chunk-LL6F3WDX.mjs";
123
117
  import "./chunk-7DLOYKVC.mjs";
124
118
  import {
125
119
  avatar_default
126
120
  } from "./chunk-XQGD4ZIX.mjs";
127
121
  import "./chunk-3IU2RPSM.mjs";
122
+ import "./chunk-SE5TU755.mjs";
123
+ import {
124
+ backdrop_default
125
+ } from "./chunk-LL6F3WDX.mjs";
128
126
  import {
129
127
  deepnoidUi,
130
128
  tv
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deepnoid/ui",
3
- "version": "0.1.20",
3
+ "version": "0.1.22",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "exports": {
@@ -1,255 +0,0 @@
1
- "use client";
2
- import {
3
- useSelect
4
- } from "./chunk-S3QS5B7F.mjs";
5
- import {
6
- option_default
7
- } from "./chunk-OF3X4BXG.mjs";
8
- import {
9
- Icon_default
10
- } from "./chunk-HWL7TPUN.mjs";
11
- import {
12
- tv
13
- } from "./chunk-4ZJFD3L3.mjs";
14
- import {
15
- mapPropsVariants
16
- } from "./chunk-E3G5QXSH.mjs";
17
-
18
- // src/components/select/select.tsx
19
- import { forwardRef, useMemo, useCallback } from "react";
20
- import { createPortal } from "react-dom";
21
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
22
- var Select = forwardRef((originalProps, ref) => {
23
- const [props, variantProps] = mapPropsVariants(originalProps, select.variantKeys);
24
- const { classNames, options, defaultOption, onChange, ...inputProps } = props;
25
- const slots = useMemo(() => select({ ...variantProps }), [variantProps]);
26
- const {
27
- targetRect,
28
- selectedOption,
29
- optionWrapperHeight,
30
- selectWrapperRef,
31
- optionWrapperRef,
32
- handleToggleSelect,
33
- handleChangeOption,
34
- calculatePositionWithScroll
35
- } = useSelect({
36
- options,
37
- defaultOption,
38
- onChange
39
- });
40
- const position = targetRect ? calculatePositionWithScroll(targetRect, optionWrapperHeight) : null;
41
- const getBaseProps = useCallback(
42
- () => ({
43
- className: slots.base({ class: classNames == null ? void 0 : classNames.base })
44
- }),
45
- [slots, classNames]
46
- );
47
- const getLabelProps = useCallback(
48
- () => ({
49
- className: slots.label({ class: classNames == null ? void 0 : classNames.label })
50
- }),
51
- [slots, classNames]
52
- );
53
- const getSelectWrapperProps = useCallback(
54
- () => ({
55
- className: slots.selectWrapper({ class: classNames == null ? void 0 : classNames.selectWrapper }),
56
- ref: selectWrapperRef,
57
- onClick: handleToggleSelect
58
- }),
59
- [slots, classNames]
60
- );
61
- const getSelectProps = useCallback(
62
- () => ({
63
- ...inputProps,
64
- ref,
65
- className: slots.select({ class: classNames == null ? void 0 : classNames.select }),
66
- value: (selectedOption == null ? void 0 : selectedOption.value) || "",
67
- readOnly: true,
68
- size: 0
69
- }),
70
- [slots, classNames, inputProps, selectedOption, ref]
71
- );
72
- const getOptionsWrapperProps = useCallback(
73
- () => ({
74
- className: slots.optionsWrapper({ class: classNames == null ? void 0 : classNames.optionsWrapper }),
75
- ref: optionWrapperRef
76
- }),
77
- [slots, classNames]
78
- );
79
- const getErrorMessageProps = useCallback(
80
- () => ({
81
- className: slots.errorMessage({ class: classNames == null ? void 0 : classNames.errorMessage })
82
- }),
83
- [slots, classNames]
84
- );
85
- return /* @__PURE__ */ jsxs(Fragment, { children: [
86
- /* @__PURE__ */ jsxs("div", { ...getBaseProps(), children: [
87
- props.label && /* @__PURE__ */ jsx("label", { ...getLabelProps(), children: props.label }),
88
- /* @__PURE__ */ jsxs("div", { "data-expanded": !!targetRect, ...getSelectWrapperProps(), children: [
89
- /* @__PURE__ */ jsx("input", { ...getSelectProps() }),
90
- /* @__PURE__ */ jsx(Icon_default, { name: !!targetRect ? "arrow-triangle-up" : "arrow-triangle-down", size: originalProps.size, fill: true })
91
- ] }),
92
- props.errorMessage && /* @__PURE__ */ jsx("p", { ...getErrorMessageProps(), children: props.errorMessage })
93
- ] }),
94
- targetRect && /* @__PURE__ */ jsx(Fragment, { children: createPortal(
95
- /* @__PURE__ */ jsx(
96
- "div",
97
- {
98
- ...getOptionsWrapperProps(),
99
- style: {
100
- position: "absolute",
101
- top: position == null ? void 0 : position.top,
102
- left: position == null ? void 0 : position.left,
103
- width: targetRect.width
104
- },
105
- children: options.map((option) => /* @__PURE__ */ jsx(
106
- option_default,
107
- {
108
- variant: originalProps.variant,
109
- size: originalProps.size,
110
- color: originalProps.color,
111
- option,
112
- isSelected: (selectedOption == null ? void 0 : selectedOption.key) === option.key,
113
- onClick: () => handleChangeOption(option),
114
- children: option.value
115
- },
116
- option.key
117
- ))
118
- }
119
- ),
120
- document.body
121
- ) })
122
- ] });
123
- });
124
- Select.displayName = "Select";
125
- var select_default = Select;
126
- var select = tv({
127
- slots: {
128
- base: ["group/select", "flex flex-col"],
129
- label: ["flex", "items-center"],
130
- selectWrapper: [
131
- "flex",
132
- "items-center",
133
- "bg-transparent",
134
- "border-neutral-main",
135
- "transition duration-200",
136
- "group-has-[p]/select:border-danger-main",
137
- "group-has-[p]/select:text-danger-main",
138
- "group-has-[p]/select:bg-danger-soft"
139
- ],
140
- select: [
141
- "w-full",
142
- "bg-transparent",
143
- "text-foreground",
144
- "cursor-inherit",
145
- "cursor-pointer",
146
- "placeholder:text-neutral-main",
147
- "group-has-[p]/select:text-danger-main",
148
- "focus-visible:outline-none"
149
- ],
150
- optionsWrapper: ["w-[240px]", "border", "bg-background", "cursor-pointer", "overflow-y-auto"],
151
- errorMessage: ["text-danger-main"]
152
- },
153
- variants: {
154
- variant: {
155
- solid: {
156
- selectWrapper: "bg-trans-soft hover:bg-trans-light data-[expanded=true]:bg-trans-light group-has-[p]/select:bg-danger-soft"
157
- },
158
- normal: {
159
- selectWrapper: "border hover:bg-trans-soft data-[expanded=true]:bg-trans-soft"
160
- },
161
- line: {
162
- selectWrapper: "border-b !rounded-none hover:bg-trans-soft data-[expanded=true]:bg-trans-soft",
163
- optionsWrapper: "!rounded-none"
164
- }
165
- },
166
- color: {
167
- primary: {
168
- selectWrapper: "data-[expanded=true]:border-primary-main text-primary-main",
169
- optionsWrapper: "border-primary-main",
170
- select: "data-[expanded=true]:text-primary-main"
171
- },
172
- secondary: {
173
- selectWrapper: "data-[expanded=true]:border-secondary-main text-secondary-main",
174
- optionsWrapper: "border-secondary-main",
175
- select: "data-[expanded=true]:text-secondary-main"
176
- }
177
- },
178
- size: {
179
- sm: {
180
- base: "text-sm gap-[6px]",
181
- selectWrapper: "w-[240px] h-[24px] px-[6px] py-[4.5px] gap-[6px] rounded-sm",
182
- optionsWrapper: "max-h-[96px] rounded-sm",
183
- errorMessage: "text-sm"
184
- },
185
- md: {
186
- base: "text-md gap-[8px]",
187
- selectWrapper: "w-[240px] h-[30px] px-[8px] py-[6.5px] gap-[8px] rounded-md",
188
- optionsWrapper: "max-h-[120px] rounded-md",
189
- errorMessage: "text-md"
190
- },
191
- lg: {
192
- base: "text-lg gap-[10px]",
193
- selectWrapper: "w-[240px] h-[36px] px-[10px] py-[8px] gap-[10px] rounded-lg",
194
- optionsWrapper: "max-h-[144px] rounded-lg",
195
- errorMessage: "text-lg"
196
- },
197
- xl: {
198
- base: "text-lg gap-[10px]",
199
- selectWrapper: "w-[240px] h-[36px] px-[10px] py-[8px] gap-[10px] rounded-xl",
200
- optionsWrapper: "max-h-[144px] rounded-xl",
201
- errorMessage: "text-xl"
202
- }
203
- },
204
- radius: {
205
- default: "",
206
- none: {
207
- selectWrapper: "rounded-none",
208
- optionsWrapper: "rounded-none"
209
- },
210
- full: {
211
- selectWrapper: "rounded-full"
212
- }
213
- },
214
- fullWidth: {
215
- true: {
216
- selectWrapper: "w-full",
217
- optionsWrapper: "w-full"
218
- }
219
- },
220
- isDisabled: {
221
- true: {
222
- base: "cursor-default",
223
- selectWrapper: "bg-neutral-soft border-neutral-light text-neutral-light pointer-events-none",
224
- select: "text-neutral-light focus:text-neutral-light",
225
- label: "text-neutral-light"
226
- }
227
- },
228
- isRequired: {
229
- true: {
230
- label: "after:content-['*'] after:text-danger-main after:ml-0.5"
231
- }
232
- }
233
- },
234
- defaultVariants: {
235
- variant: "solid",
236
- color: "primary",
237
- size: "md",
238
- fullWidth: false,
239
- isDisabled: false,
240
- isRequired: false
241
- },
242
- compoundVariants: [
243
- {
244
- isDisabled: true,
245
- isRequired: true,
246
- class: {
247
- label: "after:text-danger-light"
248
- }
249
- }
250
- ]
251
- });
252
-
253
- export {
254
- select_default
255
- };
@@ -1,76 +0,0 @@
1
- "use client";
2
- import {
3
- Icon_default
4
- } from "./chunk-HWL7TPUN.mjs";
5
- import {
6
- tv
7
- } from "./chunk-4ZJFD3L3.mjs";
8
-
9
- // src/components/select/option.tsx
10
- import { jsx, jsxs } from "react/jsx-runtime";
11
- var Option = (props) => {
12
- const { base, option, icon } = optionStyle(props);
13
- return /* @__PURE__ */ jsxs(
14
- "div",
15
- {
16
- title: props.option.value,
17
- className: base(),
18
- onClick: () => props.onClick(props.option),
19
- ref: (node) => {
20
- props.isSelected && (node == null ? void 0 : node.scrollIntoView());
21
- },
22
- children: [
23
- /* @__PURE__ */ jsx("div", { className: option(), children: props.children }),
24
- props.isSelected && /* @__PURE__ */ jsx("div", { className: icon(), children: /* @__PURE__ */ jsx(Icon_default, { name: "check", size: props.size }) })
25
- ]
26
- }
27
- );
28
- };
29
- var option_default = Option;
30
- var optionStyle = tv({
31
- slots: {
32
- base: ["w-full", "flex", "items-center", "justify-between", , "overflow-hidden"],
33
- option: ["text-ellipsis overflow-hidden "],
34
- icon: ""
35
- },
36
- variants: {
37
- variant: {
38
- solid: {},
39
- normal: {},
40
- line: {}
41
- },
42
- color: {
43
- primary: {
44
- base: ["border-primary-main", "hover:bg-primary-soft", "hover:text-primary-main"],
45
- icon: "text-primary-main"
46
- },
47
- secondary: {
48
- base: ["border-secondary-main", "hover:bg-secondary-soft", "hover:text-secondary-main"],
49
- icon: "text-secondary-main"
50
- }
51
- },
52
- size: {
53
- sm: {
54
- base: "text-sm px-[6px] py-[4.5px]"
55
- },
56
- md: {
57
- base: "text-md px-[8px] py-[6.5px]"
58
- },
59
- lg: {
60
- base: "text-lg px-[10px] py-[8px]"
61
- },
62
- xl: {
63
- base: "text-xl px-[10px] py-[8px]"
64
- }
65
- }
66
- },
67
- defaultVariants: {
68
- variant: "normal",
69
- color: "primary",
70
- size: "md"
71
- }
72
- });
73
-
74
- export {
75
- option_default
76
- };
@@ -1,61 +0,0 @@
1
- "use client";
2
-
3
- // src/components/select/useSelect.tsx
4
- import { useState, useEffect, useRef } from "react";
5
- var useSelect = ({ options, defaultOption, onChange }) => {
6
- const [selectedOption, setSelectedOption] = useState(defaultOption);
7
- const [targetRect, setTargetRect] = useState(null);
8
- const [optionWrapperHeight, setOptionWrapperHeight] = useState(0);
9
- const selectWrapperRef = useRef(null);
10
- const optionWrapperRef = useRef(null);
11
- const calculatePositionWithScroll = (targetRect2, optionWrapperHeight2) => {
12
- const scrollTop = window.scrollY || document.documentElement.scrollTop || document.body.scrollTop;
13
- const scrollLeft = window.scrollX || document.documentElement.scrollLeft || document.body.scrollLeft;
14
- const spaceBelow = window.innerHeight - (targetRect2.y + targetRect2.height + 4);
15
- const spaceAbove = targetRect2.y - 4;
16
- const top = spaceBelow < optionWrapperHeight2 && spaceAbove > optionWrapperHeight2 ? targetRect2.y - optionWrapperHeight2 - 4 : targetRect2.y + targetRect2.height + 4;
17
- return {
18
- top: top + scrollTop,
19
- left: targetRect2.x + scrollLeft
20
- };
21
- };
22
- const handleToggleSelect = () => {
23
- if (selectWrapperRef.current) {
24
- const rect = selectWrapperRef.current.getBoundingClientRect();
25
- setTargetRect((prevRect) => prevRect ? null : { x: rect.x, y: rect.y, width: rect.width, height: rect.height });
26
- }
27
- };
28
- const handleChangeOption = (option) => {
29
- onChange == null ? void 0 : onChange(option);
30
- setSelectedOption(option);
31
- handleToggleSelect();
32
- };
33
- useEffect(() => {
34
- const onClickOutside = (e) => {
35
- if (optionWrapperRef.current && !optionWrapperRef.current.contains(e.target)) {
36
- setTargetRect(null);
37
- }
38
- };
39
- window.addEventListener("mousedown", onClickOutside);
40
- return () => window.removeEventListener("mousedown", onClickOutside);
41
- }, []);
42
- useEffect(() => {
43
- if (optionWrapperRef.current) {
44
- setOptionWrapperHeight(optionWrapperRef.current.getBoundingClientRect().height);
45
- }
46
- }, [targetRect]);
47
- return {
48
- selectedOption,
49
- targetRect,
50
- optionWrapperHeight,
51
- selectWrapperRef,
52
- optionWrapperRef,
53
- handleToggleSelect,
54
- handleChangeOption,
55
- calculatePositionWithScroll
56
- };
57
- };
58
-
59
- export {
60
- useSelect
61
- };
@@ -1,17 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { ComponentProps } from 'react';
3
- import { SelectOption } from './select.mjs';
4
- import { Size } from '../../utils/types.mjs';
5
- import 'tailwind-variants';
6
-
7
- interface OptionProps extends Omit<ComponentProps<"div">, "onClick"> {
8
- variant?: "solid" | "normal" | "line";
9
- color?: "primary" | "secondary";
10
- size?: Size;
11
- option: SelectOption;
12
- isSelected?: boolean;
13
- onClick: (option: SelectOption) => void;
14
- }
15
- declare const Option: (props: OptionProps) => react_jsx_runtime.JSX.Element;
16
-
17
- export { type OptionProps, Option as default };
@@ -1,17 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { ComponentProps } from 'react';
3
- import { SelectOption } from './select.js';
4
- import { Size } from '../../utils/types.js';
5
- import 'tailwind-variants';
6
-
7
- interface OptionProps extends Omit<ComponentProps<"div">, "onClick"> {
8
- variant?: "solid" | "normal" | "line";
9
- color?: "primary" | "secondary";
10
- size?: Size;
11
- option: SelectOption;
12
- isSelected?: boolean;
13
- onClick: (option: SelectOption) => void;
14
- }
15
- declare const Option: (props: OptionProps) => react_jsx_runtime.JSX.Element;
16
-
17
- export { type OptionProps, Option as default };