@deepnoid/ui 0.1.34 → 0.1.36
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.
- package/.turbo/turbo-build.log +148 -148
- package/dist/{chunk-IC25OKBJ.mjs → chunk-K7VUN5BS.mjs} +1 -1
- package/dist/{chunk-IEJRE6LT.mjs → chunk-Q5JOHEP7.mjs} +7 -7
- package/dist/{chunk-PSO2IJIF.mjs → chunk-YVPN5H5T.mjs} +4 -3
- package/dist/components/breadcrumb/breadcrumb.mjs +3 -3
- package/dist/components/breadcrumb/index.mjs +3 -3
- package/dist/components/button/button.mjs +2 -2
- package/dist/components/button/icon-button.mjs +2 -2
- package/dist/components/button/index.mjs +3 -3
- package/dist/components/fileUpload/fileUpload.d.mts +2 -1
- package/dist/components/fileUpload/fileUpload.d.ts +2 -1
- package/dist/components/fileUpload/fileUpload.js +2 -1
- package/dist/components/fileUpload/fileUpload.mjs +4 -4
- package/dist/components/fileUpload/index.js +2 -1
- package/dist/components/fileUpload/index.mjs +4 -4
- package/dist/components/modal/index.mjs +4 -4
- package/dist/components/modal/modal.mjs +4 -4
- package/dist/components/ripple/index.mjs +3 -3
- package/dist/components/select/index.d.mts +1 -1
- package/dist/components/select/index.d.ts +1 -1
- package/dist/components/select/index.js +7 -7
- package/dist/components/select/index.mjs +1 -1
- package/dist/components/select/select.d.mts +3 -3
- package/dist/components/select/select.d.ts +3 -3
- package/dist/components/select/select.js +7 -7
- package/dist/components/select/select.mjs +1 -1
- package/dist/components/table/index.mjs +3 -3
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +9 -8
- package/dist/index.mjs +25 -25
- package/package.json +1 -1
- package/dist/{chunk-UB4YBFOT.mjs → chunk-JTZUXVOU.mjs} +3 -3
- package/dist/{chunk-7TAGGLNY.mjs → chunk-QIEKOGY7.mjs} +3 -3
|
@@ -4,11 +4,11 @@ import {
|
|
|
4
4
|
} from "../../chunk-G67WUZO3.mjs";
|
|
5
5
|
import "../../chunk-MY5U63QO.mjs";
|
|
6
6
|
import "../../chunk-LPZOH3RP.mjs";
|
|
7
|
-
import "../../chunk-
|
|
8
|
-
import "../../chunk-
|
|
7
|
+
import "../../chunk-JTZUXVOU.mjs";
|
|
8
|
+
import "../../chunk-QIEKOGY7.mjs";
|
|
9
9
|
import "../../chunk-6WSACUIB.mjs";
|
|
10
|
-
import "../../chunk-LXHUO6VM.mjs";
|
|
11
10
|
import "../../chunk-6PNKRBUT.mjs";
|
|
11
|
+
import "../../chunk-LXHUO6VM.mjs";
|
|
12
12
|
import "../../chunk-WFMFC7R6.mjs";
|
|
13
13
|
import "../../chunk-ZYIIXWVY.mjs";
|
|
14
14
|
import "../../chunk-2TKEWFGH.mjs";
|
|
@@ -5,11 +5,11 @@ import {
|
|
|
5
5
|
} from "../../chunk-G67WUZO3.mjs";
|
|
6
6
|
import "../../chunk-MY5U63QO.mjs";
|
|
7
7
|
import "../../chunk-LPZOH3RP.mjs";
|
|
8
|
-
import "../../chunk-
|
|
9
|
-
import "../../chunk-
|
|
8
|
+
import "../../chunk-JTZUXVOU.mjs";
|
|
9
|
+
import "../../chunk-QIEKOGY7.mjs";
|
|
10
10
|
import "../../chunk-6WSACUIB.mjs";
|
|
11
|
-
import "../../chunk-LXHUO6VM.mjs";
|
|
12
11
|
import "../../chunk-6PNKRBUT.mjs";
|
|
12
|
+
import "../../chunk-LXHUO6VM.mjs";
|
|
13
13
|
import "../../chunk-WFMFC7R6.mjs";
|
|
14
14
|
import "../../chunk-ZYIIXWVY.mjs";
|
|
15
15
|
import "../../chunk-2TKEWFGH.mjs";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
button_default
|
|
4
|
-
} from "../../chunk-
|
|
4
|
+
} from "../../chunk-JTZUXVOU.mjs";
|
|
5
5
|
import "../../chunk-6WSACUIB.mjs";
|
|
6
|
-
import "../../chunk-LXHUO6VM.mjs";
|
|
7
6
|
import "../../chunk-6PNKRBUT.mjs";
|
|
7
|
+
import "../../chunk-LXHUO6VM.mjs";
|
|
8
8
|
import "../../chunk-ZYIIXWVY.mjs";
|
|
9
9
|
import "../../chunk-2TKEWFGH.mjs";
|
|
10
10
|
import "../../chunk-2SDYFOZL.mjs";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
icon_button_default
|
|
4
|
-
} from "../../chunk-
|
|
4
|
+
} from "../../chunk-QIEKOGY7.mjs";
|
|
5
5
|
import "../../chunk-6WSACUIB.mjs";
|
|
6
|
-
import "../../chunk-LXHUO6VM.mjs";
|
|
7
6
|
import "../../chunk-6PNKRBUT.mjs";
|
|
7
|
+
import "../../chunk-LXHUO6VM.mjs";
|
|
8
8
|
import "../../chunk-ZYIIXWVY.mjs";
|
|
9
9
|
import "../../chunk-2TKEWFGH.mjs";
|
|
10
10
|
import "../../chunk-2SDYFOZL.mjs";
|
|
@@ -5,13 +5,13 @@ import {
|
|
|
5
5
|
} from "../../chunk-LPZOH3RP.mjs";
|
|
6
6
|
import {
|
|
7
7
|
button_default
|
|
8
|
-
} from "../../chunk-
|
|
8
|
+
} from "../../chunk-JTZUXVOU.mjs";
|
|
9
9
|
import {
|
|
10
10
|
icon_button_default
|
|
11
|
-
} from "../../chunk-
|
|
11
|
+
} from "../../chunk-QIEKOGY7.mjs";
|
|
12
12
|
import "../../chunk-6WSACUIB.mjs";
|
|
13
|
-
import "../../chunk-LXHUO6VM.mjs";
|
|
14
13
|
import "../../chunk-6PNKRBUT.mjs";
|
|
14
|
+
import "../../chunk-LXHUO6VM.mjs";
|
|
15
15
|
import {
|
|
16
16
|
text_button_default
|
|
17
17
|
} from "../../chunk-WFMFC7R6.mjs";
|
|
@@ -13,9 +13,10 @@ type FileUploadProps = {
|
|
|
13
13
|
onFileUpload?: (file: File) => void;
|
|
14
14
|
helperMessage?: string;
|
|
15
15
|
showProgress?: boolean;
|
|
16
|
+
name?: string;
|
|
16
17
|
classNames?: SlotsToClasses<FileUploadSlots>;
|
|
17
18
|
};
|
|
18
|
-
declare function FileUpload({ buttonText, maxSizeMB, placeholder, accept, acceptErrorMessage, sizeErrorMessage, onFileUpload, helperMessage, showProgress, classNames, }: FileUploadProps): react_jsx_runtime.JSX.Element;
|
|
19
|
+
declare function FileUpload({ buttonText, maxSizeMB, placeholder, accept, acceptErrorMessage, sizeErrorMessage, onFileUpload, helperMessage, showProgress, name, classNames, }: FileUploadProps): react_jsx_runtime.JSX.Element;
|
|
19
20
|
declare namespace FileUpload {
|
|
20
21
|
var displayName: string;
|
|
21
22
|
}
|
|
@@ -13,9 +13,10 @@ type FileUploadProps = {
|
|
|
13
13
|
onFileUpload?: (file: File) => void;
|
|
14
14
|
helperMessage?: string;
|
|
15
15
|
showProgress?: boolean;
|
|
16
|
+
name?: string;
|
|
16
17
|
classNames?: SlotsToClasses<FileUploadSlots>;
|
|
17
18
|
};
|
|
18
|
-
declare function FileUpload({ buttonText, maxSizeMB, placeholder, accept, acceptErrorMessage, sizeErrorMessage, onFileUpload, helperMessage, showProgress, classNames, }: FileUploadProps): react_jsx_runtime.JSX.Element;
|
|
19
|
+
declare function FileUpload({ buttonText, maxSizeMB, placeholder, accept, acceptErrorMessage, sizeErrorMessage, onFileUpload, helperMessage, showProgress, name, classNames, }: FileUploadProps): react_jsx_runtime.JSX.Element;
|
|
19
20
|
declare namespace FileUpload {
|
|
20
21
|
var displayName: string;
|
|
21
22
|
}
|
|
@@ -5568,6 +5568,7 @@ function FileUpload({
|
|
|
5568
5568
|
onFileUpload,
|
|
5569
5569
|
helperMessage,
|
|
5570
5570
|
showProgress,
|
|
5571
|
+
name,
|
|
5571
5572
|
classNames
|
|
5572
5573
|
}) {
|
|
5573
5574
|
const fileInputRef = (0, import_react5.useRef)(null);
|
|
@@ -5634,7 +5635,7 @@ function FileUpload({
|
|
|
5634
5635
|
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: slots.base({ class: classNames == null ? void 0 : classNames.base }), children: [
|
|
5635
5636
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: slots.container({ class: classNames == null ? void 0 : classNames.container }), children: [
|
|
5636
5637
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: slots.inputWrapper(), children: [
|
|
5637
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(input_default, { name
|
|
5638
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(input_default, { name, readOnly: true, variant: "outline", full: true, placeholder, defaultValue: file == null ? void 0 : file.name }),
|
|
5638
5639
|
file && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
5639
5640
|
icon_button_default,
|
|
5640
5641
|
{
|
|
@@ -3,16 +3,16 @@ import {
|
|
|
3
3
|
FileUpload,
|
|
4
4
|
fileUploadStyle,
|
|
5
5
|
fileUpload_default
|
|
6
|
-
} from "../../chunk-
|
|
6
|
+
} from "../../chunk-YVPN5H5T.mjs";
|
|
7
7
|
import "../../chunk-2GCSFWHD.mjs";
|
|
8
8
|
import "../../chunk-GH6CPGFN.mjs";
|
|
9
9
|
import "../../chunk-MY5U63QO.mjs";
|
|
10
10
|
import "../../chunk-LPZOH3RP.mjs";
|
|
11
|
-
import "../../chunk-
|
|
12
|
-
import "../../chunk-
|
|
11
|
+
import "../../chunk-JTZUXVOU.mjs";
|
|
12
|
+
import "../../chunk-QIEKOGY7.mjs";
|
|
13
13
|
import "../../chunk-6WSACUIB.mjs";
|
|
14
|
-
import "../../chunk-LXHUO6VM.mjs";
|
|
15
14
|
import "../../chunk-6PNKRBUT.mjs";
|
|
15
|
+
import "../../chunk-LXHUO6VM.mjs";
|
|
16
16
|
import "../../chunk-WFMFC7R6.mjs";
|
|
17
17
|
import "../../chunk-ZYIIXWVY.mjs";
|
|
18
18
|
import "../../chunk-2TKEWFGH.mjs";
|
|
@@ -5568,6 +5568,7 @@ function FileUpload({
|
|
|
5568
5568
|
onFileUpload,
|
|
5569
5569
|
helperMessage,
|
|
5570
5570
|
showProgress,
|
|
5571
|
+
name,
|
|
5571
5572
|
classNames
|
|
5572
5573
|
}) {
|
|
5573
5574
|
const fileInputRef = (0, import_react5.useRef)(null);
|
|
@@ -5634,7 +5635,7 @@ function FileUpload({
|
|
|
5634
5635
|
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: slots.base({ class: classNames == null ? void 0 : classNames.base }), children: [
|
|
5635
5636
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: slots.container({ class: classNames == null ? void 0 : classNames.container }), children: [
|
|
5636
5637
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: slots.inputWrapper(), children: [
|
|
5637
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(input_default, { name
|
|
5638
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(input_default, { name, readOnly: true, variant: "outline", full: true, placeholder, defaultValue: file == null ? void 0 : file.name }),
|
|
5638
5639
|
file && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
5639
5640
|
icon_button_default,
|
|
5640
5641
|
{
|
|
@@ -2,16 +2,16 @@
|
|
|
2
2
|
import "../../chunk-RLXOHILK.mjs";
|
|
3
3
|
import {
|
|
4
4
|
fileUpload_default
|
|
5
|
-
} from "../../chunk-
|
|
5
|
+
} from "../../chunk-YVPN5H5T.mjs";
|
|
6
6
|
import "../../chunk-2GCSFWHD.mjs";
|
|
7
7
|
import "../../chunk-GH6CPGFN.mjs";
|
|
8
8
|
import "../../chunk-MY5U63QO.mjs";
|
|
9
9
|
import "../../chunk-LPZOH3RP.mjs";
|
|
10
|
-
import "../../chunk-
|
|
11
|
-
import "../../chunk-
|
|
10
|
+
import "../../chunk-JTZUXVOU.mjs";
|
|
11
|
+
import "../../chunk-QIEKOGY7.mjs";
|
|
12
12
|
import "../../chunk-6WSACUIB.mjs";
|
|
13
|
-
import "../../chunk-LXHUO6VM.mjs";
|
|
14
13
|
import "../../chunk-6PNKRBUT.mjs";
|
|
14
|
+
import "../../chunk-LXHUO6VM.mjs";
|
|
15
15
|
import "../../chunk-WFMFC7R6.mjs";
|
|
16
16
|
import "../../chunk-ZYIIXWVY.mjs";
|
|
17
17
|
import "../../chunk-2TKEWFGH.mjs";
|
|
@@ -2,16 +2,16 @@
|
|
|
2
2
|
import "../../chunk-DJOG6Z35.mjs";
|
|
3
3
|
import {
|
|
4
4
|
modal_default
|
|
5
|
-
} from "../../chunk-
|
|
5
|
+
} from "../../chunk-K7VUN5BS.mjs";
|
|
6
6
|
import "../../chunk-SE5TU755.mjs";
|
|
7
7
|
import "../../chunk-LL6F3WDX.mjs";
|
|
8
8
|
import "../../chunk-MY5U63QO.mjs";
|
|
9
9
|
import "../../chunk-LPZOH3RP.mjs";
|
|
10
|
-
import "../../chunk-
|
|
11
|
-
import "../../chunk-
|
|
10
|
+
import "../../chunk-JTZUXVOU.mjs";
|
|
11
|
+
import "../../chunk-QIEKOGY7.mjs";
|
|
12
12
|
import "../../chunk-6WSACUIB.mjs";
|
|
13
|
-
import "../../chunk-LXHUO6VM.mjs";
|
|
14
13
|
import "../../chunk-6PNKRBUT.mjs";
|
|
14
|
+
import "../../chunk-LXHUO6VM.mjs";
|
|
15
15
|
import "../../chunk-WFMFC7R6.mjs";
|
|
16
16
|
import "../../chunk-ZYIIXWVY.mjs";
|
|
17
17
|
import "../../chunk-2TKEWFGH.mjs";
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
modal_default
|
|
4
|
-
} from "../../chunk-
|
|
4
|
+
} from "../../chunk-K7VUN5BS.mjs";
|
|
5
5
|
import "../../chunk-SE5TU755.mjs";
|
|
6
6
|
import "../../chunk-LL6F3WDX.mjs";
|
|
7
7
|
import "../../chunk-MY5U63QO.mjs";
|
|
8
8
|
import "../../chunk-LPZOH3RP.mjs";
|
|
9
|
-
import "../../chunk-
|
|
10
|
-
import "../../chunk-
|
|
9
|
+
import "../../chunk-JTZUXVOU.mjs";
|
|
10
|
+
import "../../chunk-QIEKOGY7.mjs";
|
|
11
11
|
import "../../chunk-6WSACUIB.mjs";
|
|
12
|
-
import "../../chunk-LXHUO6VM.mjs";
|
|
13
12
|
import "../../chunk-6PNKRBUT.mjs";
|
|
13
|
+
import "../../chunk-LXHUO6VM.mjs";
|
|
14
14
|
import "../../chunk-WFMFC7R6.mjs";
|
|
15
15
|
import "../../chunk-ZYIIXWVY.mjs";
|
|
16
16
|
import "../../chunk-2TKEWFGH.mjs";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import "../../chunk-6WSACUIB.mjs";
|
|
3
|
-
import {
|
|
4
|
-
ripple_default
|
|
5
|
-
} from "../../chunk-LXHUO6VM.mjs";
|
|
6
3
|
import {
|
|
7
4
|
useRipple
|
|
8
5
|
} from "../../chunk-6PNKRBUT.mjs";
|
|
6
|
+
import {
|
|
7
|
+
ripple_default
|
|
8
|
+
} from "../../chunk-LXHUO6VM.mjs";
|
|
9
9
|
import "../../chunk-AC6TWLRT.mjs";
|
|
10
10
|
export {
|
|
11
11
|
ripple_default as Ripple,
|
|
@@ -4419,8 +4419,8 @@ var Select = (0, import_react.forwardRef)((originalProps, ref) => {
|
|
|
4419
4419
|
const handleChangeOption = (option) => {
|
|
4420
4420
|
let nextOptions;
|
|
4421
4421
|
if (multiple) {
|
|
4422
|
-
const exists = selectedOptions.some((o) => o.
|
|
4423
|
-
nextOptions = exists ? selectedOptions.filter((o) => o.
|
|
4422
|
+
const exists = selectedOptions.some((o) => o.value === option.value);
|
|
4423
|
+
nextOptions = exists ? selectedOptions.filter((o) => o.value !== option.value) : [...selectedOptions, option];
|
|
4424
4424
|
} else {
|
|
4425
4425
|
nextOptions = [option];
|
|
4426
4426
|
setIsOpen(false);
|
|
@@ -4446,15 +4446,15 @@ var Select = (0, import_react.forwardRef)((originalProps, ref) => {
|
|
|
4446
4446
|
}
|
|
4447
4447
|
}, [targetRect]);
|
|
4448
4448
|
const position = targetRect ? calculatePositionWithScroll(targetRect, optionWrapperHeight) : null;
|
|
4449
|
-
const displayValue = multiple ? selectedOptions.map((opt) => opt.
|
|
4449
|
+
const displayValue = multiple ? selectedOptions.map((opt) => opt.label).join(", ") : ((_a = selectedOptions[0]) == null ? void 0 : _a.label) || "";
|
|
4450
4450
|
const Option = ({
|
|
4451
4451
|
option,
|
|
4452
4452
|
isSelected,
|
|
4453
4453
|
onClick
|
|
4454
4454
|
}) => {
|
|
4455
4455
|
const slot = select({ ...variantProps, isSelected });
|
|
4456
|
-
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { title: option.
|
|
4457
|
-
option.
|
|
4456
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { title: option.label, onClick, className: clsx(slot.option({ class: classNames == null ? void 0 : classNames.option })), children: [
|
|
4457
|
+
option.label,
|
|
4458
4458
|
isSelected && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Icon_default, { name: "check", size: originalProps.size })
|
|
4459
4459
|
] });
|
|
4460
4460
|
};
|
|
@@ -4528,7 +4528,7 @@ var Select = (0, import_react.forwardRef)((originalProps, ref) => {
|
|
|
4528
4528
|
transition: "opacity 150ms ease-out, transform 150ms ease-out"
|
|
4529
4529
|
},
|
|
4530
4530
|
children: options.map((option) => {
|
|
4531
|
-
const isSelected = selectedOptions.some((o) => o.
|
|
4531
|
+
const isSelected = selectedOptions.some((o) => o.value === option.value);
|
|
4532
4532
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
4533
4533
|
Option,
|
|
4534
4534
|
{
|
|
@@ -4536,7 +4536,7 @@ var Select = (0, import_react.forwardRef)((originalProps, ref) => {
|
|
|
4536
4536
|
isSelected,
|
|
4537
4537
|
onClick: () => handleChangeOption(option)
|
|
4538
4538
|
},
|
|
4539
|
-
option.
|
|
4539
|
+
option.value
|
|
4540
4540
|
);
|
|
4541
4541
|
})
|
|
4542
4542
|
}
|
|
@@ -5,8 +5,8 @@ import { ComponentPropsWithRef } from 'react';
|
|
|
5
5
|
import { SlotsToClasses } from '../../utils/types.mjs';
|
|
6
6
|
|
|
7
7
|
interface SelectOption {
|
|
8
|
-
|
|
9
|
-
value: string;
|
|
8
|
+
label: string;
|
|
9
|
+
value: string | number;
|
|
10
10
|
}
|
|
11
11
|
interface Props extends Omit<ComponentPropsWithRef<"input">, "onChange" | keyof SelectVariantProps> {
|
|
12
12
|
options: SelectOption[];
|
|
@@ -307,4 +307,4 @@ declare const select: tailwind_variants.TVReturnType<{
|
|
|
307
307
|
type SelectVariantProps = VariantProps<typeof select>;
|
|
308
308
|
type SelectSlots = keyof ReturnType<typeof select>;
|
|
309
309
|
|
|
310
|
-
export { type SelectProps, type SelectVariantProps, Select as default };
|
|
310
|
+
export { type SelectOption, type SelectProps, type SelectVariantProps, Select as default };
|
|
@@ -5,8 +5,8 @@ import { ComponentPropsWithRef } from 'react';
|
|
|
5
5
|
import { SlotsToClasses } from '../../utils/types.js';
|
|
6
6
|
|
|
7
7
|
interface SelectOption {
|
|
8
|
-
|
|
9
|
-
value: string;
|
|
8
|
+
label: string;
|
|
9
|
+
value: string | number;
|
|
10
10
|
}
|
|
11
11
|
interface Props extends Omit<ComponentPropsWithRef<"input">, "onChange" | keyof SelectVariantProps> {
|
|
12
12
|
options: SelectOption[];
|
|
@@ -307,4 +307,4 @@ declare const select: tailwind_variants.TVReturnType<{
|
|
|
307
307
|
type SelectVariantProps = VariantProps<typeof select>;
|
|
308
308
|
type SelectSlots = keyof ReturnType<typeof select>;
|
|
309
309
|
|
|
310
|
-
export { type SelectProps, type SelectVariantProps, Select as default };
|
|
310
|
+
export { type SelectOption, type SelectProps, type SelectVariantProps, Select as default };
|
|
@@ -4417,8 +4417,8 @@ var Select = (0, import_react.forwardRef)((originalProps, ref) => {
|
|
|
4417
4417
|
const handleChangeOption = (option) => {
|
|
4418
4418
|
let nextOptions;
|
|
4419
4419
|
if (multiple) {
|
|
4420
|
-
const exists = selectedOptions.some((o) => o.
|
|
4421
|
-
nextOptions = exists ? selectedOptions.filter((o) => o.
|
|
4420
|
+
const exists = selectedOptions.some((o) => o.value === option.value);
|
|
4421
|
+
nextOptions = exists ? selectedOptions.filter((o) => o.value !== option.value) : [...selectedOptions, option];
|
|
4422
4422
|
} else {
|
|
4423
4423
|
nextOptions = [option];
|
|
4424
4424
|
setIsOpen(false);
|
|
@@ -4444,15 +4444,15 @@ var Select = (0, import_react.forwardRef)((originalProps, ref) => {
|
|
|
4444
4444
|
}
|
|
4445
4445
|
}, [targetRect]);
|
|
4446
4446
|
const position = targetRect ? calculatePositionWithScroll(targetRect, optionWrapperHeight) : null;
|
|
4447
|
-
const displayValue = multiple ? selectedOptions.map((opt) => opt.
|
|
4447
|
+
const displayValue = multiple ? selectedOptions.map((opt) => opt.label).join(", ") : ((_a = selectedOptions[0]) == null ? void 0 : _a.label) || "";
|
|
4448
4448
|
const Option = ({
|
|
4449
4449
|
option,
|
|
4450
4450
|
isSelected,
|
|
4451
4451
|
onClick
|
|
4452
4452
|
}) => {
|
|
4453
4453
|
const slot = select({ ...variantProps, isSelected });
|
|
4454
|
-
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { title: option.
|
|
4455
|
-
option.
|
|
4454
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { title: option.label, onClick, className: clsx(slot.option({ class: classNames == null ? void 0 : classNames.option })), children: [
|
|
4455
|
+
option.label,
|
|
4456
4456
|
isSelected && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Icon_default, { name: "check", size: originalProps.size })
|
|
4457
4457
|
] });
|
|
4458
4458
|
};
|
|
@@ -4526,7 +4526,7 @@ var Select = (0, import_react.forwardRef)((originalProps, ref) => {
|
|
|
4526
4526
|
transition: "opacity 150ms ease-out, transform 150ms ease-out"
|
|
4527
4527
|
},
|
|
4528
4528
|
children: options.map((option) => {
|
|
4529
|
-
const isSelected = selectedOptions.some((o) => o.
|
|
4529
|
+
const isSelected = selectedOptions.some((o) => o.value === option.value);
|
|
4530
4530
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
4531
4531
|
Option,
|
|
4532
4532
|
{
|
|
@@ -4534,7 +4534,7 @@ var Select = (0, import_react.forwardRef)((originalProps, ref) => {
|
|
|
4534
4534
|
isSelected,
|
|
4535
4535
|
onClick: () => handleChangeOption(option)
|
|
4536
4536
|
},
|
|
4537
|
-
option.
|
|
4537
|
+
option.value
|
|
4538
4538
|
);
|
|
4539
4539
|
})
|
|
4540
4540
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import "../../chunk-DX3KXNP6.mjs";
|
|
3
|
-
import {
|
|
4
|
-
table_default
|
|
5
|
-
} from "../../chunk-2M5G4MRK.mjs";
|
|
6
3
|
import {
|
|
7
4
|
definition_table_default
|
|
8
5
|
} from "../../chunk-6TIIBU7J.mjs";
|
|
6
|
+
import {
|
|
7
|
+
table_default
|
|
8
|
+
} from "../../chunk-2M5G4MRK.mjs";
|
|
9
9
|
import "../../chunk-LWRK5TPZ.mjs";
|
|
10
10
|
import "../../chunk-P7YYNA6L.mjs";
|
|
11
11
|
import "../../chunk-DQRAFUDA.mjs";
|
package/dist/index.d.mts
CHANGED
|
@@ -10,7 +10,7 @@ export { default as Tabs, TabsDataType } from './components/tabs/tabs.mjs';
|
|
|
10
10
|
export { default as Textarea } from './components/textarea/textarea.mjs';
|
|
11
11
|
export { default as Table, TableColumn, TableRow } from './components/table/table.mjs';
|
|
12
12
|
export { default as DefinitionTable } from './components/table/definition-table.mjs';
|
|
13
|
-
export { default as Select } from './components/select/select.mjs';
|
|
13
|
+
export { default as Select, SelectOption, SelectProps } from './components/select/select.mjs';
|
|
14
14
|
export { default as CheckBox } from './components/checkbox/checkbox.mjs';
|
|
15
15
|
export { default as Chip } from './components/chip/chip.mjs';
|
|
16
16
|
export { default as Radio } from './components/radio/radio.mjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ export { default as Tabs, TabsDataType } from './components/tabs/tabs.js';
|
|
|
10
10
|
export { default as Textarea } from './components/textarea/textarea.js';
|
|
11
11
|
export { default as Table, TableColumn, TableRow } from './components/table/table.js';
|
|
12
12
|
export { default as DefinitionTable } from './components/table/definition-table.js';
|
|
13
|
-
export { default as Select } from './components/select/select.js';
|
|
13
|
+
export { default as Select, SelectOption, SelectProps } from './components/select/select.js';
|
|
14
14
|
export { default as CheckBox } from './components/checkbox/checkbox.js';
|
|
15
15
|
export { default as Chip } from './components/chip/chip.js';
|
|
16
16
|
export { default as Radio } from './components/radio/radio.js';
|
package/dist/index.js
CHANGED
|
@@ -7831,8 +7831,8 @@ var Select = (0, import_react17.forwardRef)((originalProps, ref) => {
|
|
|
7831
7831
|
const handleChangeOption = (option) => {
|
|
7832
7832
|
let nextOptions;
|
|
7833
7833
|
if (multiple) {
|
|
7834
|
-
const exists = selectedOptions.some((o) => o.
|
|
7835
|
-
nextOptions = exists ? selectedOptions.filter((o) => o.
|
|
7834
|
+
const exists = selectedOptions.some((o) => o.value === option.value);
|
|
7835
|
+
nextOptions = exists ? selectedOptions.filter((o) => o.value !== option.value) : [...selectedOptions, option];
|
|
7836
7836
|
} else {
|
|
7837
7837
|
nextOptions = [option];
|
|
7838
7838
|
setIsOpen(false);
|
|
@@ -7858,15 +7858,15 @@ var Select = (0, import_react17.forwardRef)((originalProps, ref) => {
|
|
|
7858
7858
|
}
|
|
7859
7859
|
}, [targetRect]);
|
|
7860
7860
|
const position = targetRect ? calculatePositionWithScroll(targetRect, optionWrapperHeight) : null;
|
|
7861
|
-
const displayValue = multiple ? selectedOptions.map((opt) => opt.
|
|
7861
|
+
const displayValue = multiple ? selectedOptions.map((opt) => opt.label).join(", ") : ((_a = selectedOptions[0]) == null ? void 0 : _a.label) || "";
|
|
7862
7862
|
const Option = ({
|
|
7863
7863
|
option,
|
|
7864
7864
|
isSelected,
|
|
7865
7865
|
onClick
|
|
7866
7866
|
}) => {
|
|
7867
7867
|
const slot = select({ ...variantProps, isSelected });
|
|
7868
|
-
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { title: option.
|
|
7869
|
-
option.
|
|
7868
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { title: option.label, onClick, className: clsx(slot.option({ class: classNames == null ? void 0 : classNames.option })), children: [
|
|
7869
|
+
option.label,
|
|
7870
7870
|
isSelected && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Icon_default, { name: "check", size: originalProps.size })
|
|
7871
7871
|
] });
|
|
7872
7872
|
};
|
|
@@ -7940,7 +7940,7 @@ var Select = (0, import_react17.forwardRef)((originalProps, ref) => {
|
|
|
7940
7940
|
transition: "opacity 150ms ease-out, transform 150ms ease-out"
|
|
7941
7941
|
},
|
|
7942
7942
|
children: options.map((option) => {
|
|
7943
|
-
const isSelected = selectedOptions.some((o) => o.
|
|
7943
|
+
const isSelected = selectedOptions.some((o) => o.value === option.value);
|
|
7944
7944
|
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
7945
7945
|
Option,
|
|
7946
7946
|
{
|
|
@@ -7948,7 +7948,7 @@ var Select = (0, import_react17.forwardRef)((originalProps, ref) => {
|
|
|
7948
7948
|
isSelected,
|
|
7949
7949
|
onClick: () => handleChangeOption(option)
|
|
7950
7950
|
},
|
|
7951
|
-
option.
|
|
7951
|
+
option.value
|
|
7952
7952
|
);
|
|
7953
7953
|
})
|
|
7954
7954
|
}
|
|
@@ -10372,6 +10372,7 @@ function FileUpload({
|
|
|
10372
10372
|
onFileUpload,
|
|
10373
10373
|
helperMessage,
|
|
10374
10374
|
showProgress,
|
|
10375
|
+
name,
|
|
10375
10376
|
classNames
|
|
10376
10377
|
}) {
|
|
10377
10378
|
const fileInputRef = (0, import_react33.useRef)(null);
|
|
@@ -10438,7 +10439,7 @@ function FileUpload({
|
|
|
10438
10439
|
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: slots.base({ class: classNames == null ? void 0 : classNames.base }), children: [
|
|
10439
10440
|
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: slots.container({ class: classNames == null ? void 0 : classNames.container }), children: [
|
|
10440
10441
|
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: slots.inputWrapper(), children: [
|
|
10441
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(input_default, { name
|
|
10442
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(input_default, { name, readOnly: true, variant: "outline", full: true, placeholder, defaultValue: file == null ? void 0 : file.name }),
|
|
10442
10443
|
file && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
10443
10444
|
icon_button_default,
|
|
10444
10445
|
{
|
package/dist/index.mjs
CHANGED
|
@@ -1,18 +1,12 @@
|
|
|
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
|
|
11
5
|
} from "./chunk-NFQMXW4Z.mjs";
|
|
12
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-TPFN22HR.mjs";
|
|
13
7
|
import {
|
|
14
|
-
|
|
15
|
-
} from "./chunk-
|
|
8
|
+
radio_default
|
|
9
|
+
} from "./chunk-QIRL6HY6.mjs";
|
|
16
10
|
import "./chunk-RRAZM5D3.mjs";
|
|
17
11
|
import {
|
|
18
12
|
textarea_default
|
|
@@ -26,19 +20,25 @@ import "./chunk-ZOTHPHXA.mjs";
|
|
|
26
20
|
import {
|
|
27
21
|
toast_default
|
|
28
22
|
} from "./chunk-MEY4IL7D.mjs";
|
|
29
|
-
import "./chunk-
|
|
23
|
+
import "./chunk-HIE2YRGA.mjs";
|
|
30
24
|
import {
|
|
31
|
-
|
|
32
|
-
} from "./chunk-
|
|
25
|
+
tooltip_default
|
|
26
|
+
} from "./chunk-Z2537DF6.mjs";
|
|
27
|
+
import "./chunk-ZMOAFSYE.mjs";
|
|
28
|
+
import "./chunk-WSIADHVC.mjs";
|
|
33
29
|
import "./chunk-DX3KXNP6.mjs";
|
|
34
|
-
import {
|
|
35
|
-
table_default
|
|
36
|
-
} from "./chunk-2M5G4MRK.mjs";
|
|
37
30
|
import {
|
|
38
31
|
definition_table_default
|
|
39
32
|
} from "./chunk-6TIIBU7J.mjs";
|
|
33
|
+
import {
|
|
34
|
+
table_default
|
|
35
|
+
} from "./chunk-2M5G4MRK.mjs";
|
|
40
36
|
import "./chunk-LWRK5TPZ.mjs";
|
|
41
37
|
import "./chunk-P7YYNA6L.mjs";
|
|
38
|
+
import "./chunk-3MY6LO7N.mjs";
|
|
39
|
+
import {
|
|
40
|
+
tabs_default
|
|
41
|
+
} from "./chunk-2YMAKIZ6.mjs";
|
|
42
42
|
import "./chunk-DQRAFUDA.mjs";
|
|
43
43
|
import {
|
|
44
44
|
scrollArea_default
|
|
@@ -46,7 +46,11 @@ import {
|
|
|
46
46
|
import "./chunk-QCEKPS7U.mjs";
|
|
47
47
|
import {
|
|
48
48
|
select_default
|
|
49
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-Q5JOHEP7.mjs";
|
|
50
|
+
import "./chunk-LVFI2NOH.mjs";
|
|
51
|
+
import {
|
|
52
|
+
switch_default
|
|
53
|
+
} from "./chunk-Z74QNVPG.mjs";
|
|
50
54
|
import "./chunk-MZ76AA76.mjs";
|
|
51
55
|
import {
|
|
52
56
|
skeleton_default
|
|
@@ -54,16 +58,12 @@ import {
|
|
|
54
58
|
import "./chunk-DJOG6Z35.mjs";
|
|
55
59
|
import {
|
|
56
60
|
modal_default
|
|
57
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-K7VUN5BS.mjs";
|
|
58
62
|
import "./chunk-7B7LRG5J.mjs";
|
|
59
63
|
import {
|
|
60
64
|
pagination_default
|
|
61
65
|
} from "./chunk-MCNCHQ33.mjs";
|
|
62
66
|
import "./chunk-F3HENRVM.mjs";
|
|
63
|
-
import "./chunk-TPFN22HR.mjs";
|
|
64
|
-
import {
|
|
65
|
-
radio_default
|
|
66
|
-
} from "./chunk-QIRL6HY6.mjs";
|
|
67
67
|
import "./chunk-RLXOHILK.mjs";
|
|
68
68
|
import "./chunk-MGEWSREV.mjs";
|
|
69
69
|
import "./chunk-75HLCORR.mjs";
|
|
@@ -83,7 +83,7 @@ import "./chunk-FWJ2ZKH6.mjs";
|
|
|
83
83
|
import "./chunk-P732YGHO.mjs";
|
|
84
84
|
import {
|
|
85
85
|
fileUpload_default
|
|
86
|
-
} from "./chunk-
|
|
86
|
+
} from "./chunk-YVPN5H5T.mjs";
|
|
87
87
|
import "./chunk-2GCSFWHD.mjs";
|
|
88
88
|
import {
|
|
89
89
|
input_default
|
|
@@ -113,13 +113,13 @@ import {
|
|
|
113
113
|
} from "./chunk-LPZOH3RP.mjs";
|
|
114
114
|
import {
|
|
115
115
|
button_default
|
|
116
|
-
} from "./chunk-
|
|
116
|
+
} from "./chunk-JTZUXVOU.mjs";
|
|
117
117
|
import {
|
|
118
118
|
icon_button_default
|
|
119
|
-
} from "./chunk-
|
|
119
|
+
} from "./chunk-QIEKOGY7.mjs";
|
|
120
120
|
import "./chunk-6WSACUIB.mjs";
|
|
121
|
-
import "./chunk-LXHUO6VM.mjs";
|
|
122
121
|
import "./chunk-6PNKRBUT.mjs";
|
|
122
|
+
import "./chunk-LXHUO6VM.mjs";
|
|
123
123
|
import {
|
|
124
124
|
text_button_default
|
|
125
125
|
} from "./chunk-WFMFC7R6.mjs";
|
package/package.json
CHANGED