@bioturing/components 0.46.3 → 0.47.0
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/dist/components/base-menu/component.js +19 -21
- package/dist/components/base-menu/component.js.map +1 -1
- package/dist/components/base-menu/index.js +12 -7
- package/dist/components/base-menu/index.js.map +1 -1
- package/dist/components/checkbox/component.d.ts +2 -2
- package/dist/components/checkbox/component.d.ts.map +1 -1
- package/dist/components/checkbox/component.js.map +1 -1
- package/dist/components/choice-list/component.js +12 -12
- package/dist/components/combobox/component.d.ts.map +1 -1
- package/dist/components/combobox/component.js +74 -74
- package/dist/components/combobox/component.js.map +1 -1
- package/dist/components/data-table/component.d.ts.map +1 -1
- package/dist/components/data-table/component.js +73 -64
- package/dist/components/data-table/component.js.map +1 -1
- package/dist/components/data-table/components/TableBody.d.ts +1 -1
- package/dist/components/data-table/components/TableBody.d.ts.map +1 -1
- package/dist/components/data-table/components/TableBody.js +62 -53
- package/dist/components/data-table/components/TableBody.js.map +1 -1
- package/dist/components/data-table/components/TableHeader.d.ts +1 -1
- package/dist/components/data-table/components/TableHeader.d.ts.map +1 -1
- package/dist/components/data-table/components/TableHeader.js +46 -46
- package/dist/components/data-table/components/TableHeader.js.map +1 -1
- package/dist/components/data-table/components/TablePagination.d.ts.map +1 -1
- package/dist/components/data-table/components/TablePagination.js +22 -28
- package/dist/components/data-table/components/TablePagination.js.map +1 -1
- package/dist/components/data-table/hooks.d.ts.map +1 -1
- package/dist/components/data-table/hooks.js +15 -14
- package/dist/components/data-table/hooks.js.map +1 -1
- package/dist/components/data-table/style.css +1 -1
- package/dist/components/data-table/types.d.ts +1 -1
- package/dist/components/data-table/types.d.ts.map +1 -1
- package/dist/components/data-table/variant-minimal.css +1 -0
- package/dist/components/data-table/variant-zebra.css +1 -0
- package/dist/components/dialog/Dialog.js +46 -46
- package/dist/components/dialog/Dialog.js.map +1 -1
- package/dist/components/dialog/dialog.css +1 -1
- package/dist/components/form/FormItem/ItemHolder.d.ts +6 -5
- package/dist/components/form/FormItem/ItemHolder.d.ts.map +1 -1
- package/dist/components/form/FormItem/ItemHolder.js +32 -29
- package/dist/components/form/FormItem/ItemHolder.js.map +1 -1
- package/dist/components/form/FormItem/index.d.ts +6 -0
- package/dist/components/form/FormItem/index.d.ts.map +1 -1
- package/dist/components/form/FormItem/index.js +138 -127
- package/dist/components/form/FormItem/index.js.map +1 -1
- package/dist/components/form/FormValidationContext.d.ts +5 -0
- package/dist/components/form/FormValidationContext.d.ts.map +1 -0
- package/dist/components/form/FormValidationContext.js +7 -0
- package/dist/components/form/FormValidationContext.js.map +1 -0
- package/dist/components/form/component.d.ts +6 -1
- package/dist/components/form/component.d.ts.map +1 -1
- package/dist/components/form/component.js +30 -20
- package/dist/components/form/component.js.map +1 -1
- package/dist/components/form/formValidationRule.d.ts +19 -0
- package/dist/components/form/formValidationRule.d.ts.map +1 -0
- package/dist/components/form/formValidationRule.js +22 -0
- package/dist/components/form/formValidationRule.js.map +1 -0
- package/dist/components/form/index.d.ts +2 -0
- package/dist/components/form/index.d.ts.map +1 -1
- package/dist/components/form/useFormValidation.d.ts +3 -0
- package/dist/components/form/useFormValidation.d.ts.map +1 -0
- package/dist/components/form/useFormValidation.js +18 -0
- package/dist/components/form/useFormValidation.js.map +1 -0
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/keyboard-shortcut/component.d.ts +2 -0
- package/dist/components/keyboard-shortcut/component.d.ts.map +1 -1
- package/dist/components/keyboard-shortcut/component.js +69 -49
- package/dist/components/keyboard-shortcut/component.js.map +1 -1
- package/dist/components/modal/Modal.d.ts +1 -1
- package/dist/components/modal/Modal.js +9 -9
- package/dist/components/modal/Modal.js.map +1 -1
- package/dist/components/modal/style.css +1 -1
- package/dist/components/theme-provider/component.d.ts +3 -1
- package/dist/components/theme-provider/component.d.ts.map +1 -1
- package/dist/components/theme-provider/component.js +32 -31
- package/dist/components/theme-provider/component.js.map +1 -1
- package/dist/components/theme-provider/context/index.d.ts +2 -1
- package/dist/components/theme-provider/context/index.d.ts.map +1 -1
- package/dist/components/theme-provider/context/provider.d.ts +2 -3
- package/dist/components/theme-provider/context/provider.d.ts.map +1 -1
- package/dist/components/theme-provider/context/provider.js +13 -6
- package/dist/components/theme-provider/context/provider.js.map +1 -1
- package/dist/components/theme-provider/context/themeStore.d.ts +15 -0
- package/dist/components/theme-provider/context/themeStore.d.ts.map +1 -1
- package/dist/components/theme-provider/context/themeStore.js +10 -9
- package/dist/components/theme-provider/context/themeStore.js.map +1 -1
- package/dist/components/theme-provider/style.css +1 -1
- package/dist/components/tooltip/component.d.ts.map +1 -1
- package/dist/components/tooltip/component.js +23 -12
- package/dist/components/tooltip/component.js.map +1 -1
- package/dist/index.js +286 -275
- package/dist/index.js.map +1 -1
- package/dist/metadata.d.ts +9 -0
- package/dist/metadata.d.ts.map +1 -1
- package/dist/metadata.js +14 -0
- package/dist/metadata.js.map +1 -1
- package/dist/stats.html +1 -1
- package/package.json +6 -6
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import
|
|
2
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
3
|
+
import t from "react";
|
|
4
4
|
import './style.css';/* empty css */
|
|
5
5
|
import { useCls as c } from "../utils/antdUtils.js";
|
|
6
|
-
import { clsx as m } from "../utils/cn.js";
|
|
7
6
|
import { WithRenderProp as u } from "../utils/WithRenderProp.js";
|
|
8
|
-
|
|
7
|
+
import { clsx as m } from "../utils/cn.js";
|
|
8
|
+
const v = t.forwardRef(({ className: e, children: s, ...r }, o) => {
|
|
9
9
|
const a = c();
|
|
10
|
-
return /* @__PURE__ */
|
|
11
|
-
}), b =
|
|
10
|
+
return /* @__PURE__ */ n("div", { className: m(a("base-menu-root"), e), ref: o, ...r, children: s });
|
|
11
|
+
}), b = t.forwardRef(({ className: e, children: s, ...r }, o) => {
|
|
12
12
|
const a = c();
|
|
13
|
-
return /* @__PURE__ */
|
|
13
|
+
return /* @__PURE__ */ n(
|
|
14
14
|
"div",
|
|
15
15
|
{
|
|
16
16
|
className: m(a("base-menu-popup"), e),
|
|
@@ -19,10 +19,9 @@ const v = n.forwardRef(({ className: e, children: s, ...r }, o) => {
|
|
|
19
19
|
children: s
|
|
20
20
|
}
|
|
21
21
|
);
|
|
22
|
-
})
|
|
23
|
-
n.forwardRef(({ className: e, children: s, ...r }, o) => {
|
|
22
|
+
}), w = t.forwardRef(({ className: e, children: s, ...r }, o) => {
|
|
24
23
|
const a = c();
|
|
25
|
-
return /* @__PURE__ */
|
|
24
|
+
return /* @__PURE__ */ n(
|
|
26
25
|
"div",
|
|
27
26
|
{
|
|
28
27
|
className: m(a("base-menu-container"), e),
|
|
@@ -31,14 +30,12 @@ n.forwardRef(({ className: e, children: s, ...r }, o) => {
|
|
|
31
30
|
children: s
|
|
32
31
|
}
|
|
33
32
|
);
|
|
34
|
-
})
|
|
35
|
-
const w = n.forwardRef(({ className: e, children: s, ...r }, o) => {
|
|
33
|
+
}), B = t.forwardRef(({ className: e, children: s, ...r }, o) => {
|
|
36
34
|
const a = c();
|
|
37
|
-
return /* @__PURE__ */
|
|
38
|
-
})
|
|
39
|
-
n.forwardRef(({ className: e, children: s, ...r }, o) => {
|
|
35
|
+
return /* @__PURE__ */ n("div", { className: m(a("base-menu-list"), e), ref: o, ...r, children: s });
|
|
36
|
+
}), M = t.forwardRef(({ className: e, children: s, ...r }, o) => {
|
|
40
37
|
const a = c();
|
|
41
|
-
return /* @__PURE__ */
|
|
38
|
+
return /* @__PURE__ */ n(
|
|
42
39
|
"div",
|
|
43
40
|
{
|
|
44
41
|
className: m(a("base-menu-search"), e),
|
|
@@ -47,10 +44,9 @@ n.forwardRef(({ className: e, children: s, ...r }, o) => {
|
|
|
47
44
|
children: s
|
|
48
45
|
}
|
|
49
46
|
);
|
|
50
|
-
})
|
|
51
|
-
const N = n.forwardRef(({ className: e, children: s, ...r }, o) => {
|
|
47
|
+
}), N = t.forwardRef(({ className: e, children: s, ...r }, o) => {
|
|
52
48
|
const a = c();
|
|
53
|
-
return /* @__PURE__ */
|
|
49
|
+
return /* @__PURE__ */ n(
|
|
54
50
|
u,
|
|
55
51
|
{
|
|
56
52
|
className: m(a("base-menu-divider"), e),
|
|
@@ -61,9 +57,11 @@ const N = n.forwardRef(({ className: e, children: s, ...r }, o) => {
|
|
|
61
57
|
);
|
|
62
58
|
});
|
|
63
59
|
export {
|
|
60
|
+
w as BaseMenuContainer,
|
|
64
61
|
N as BaseMenuDivider,
|
|
65
|
-
|
|
62
|
+
B as BaseMenuList,
|
|
66
63
|
b as BaseMenuPopup,
|
|
67
|
-
v as BaseMenuRoot
|
|
64
|
+
v as BaseMenuRoot,
|
|
65
|
+
M as BaseMenuSearch
|
|
68
66
|
};
|
|
69
67
|
//# sourceMappingURL=component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.js","sources":["../../../src/components/base-menu/component.tsx"],"sourcesContent":["\"use client\";\nimport { clsx, useCls, WithRenderProp, WithRenderPropProps } from \"../utils\";\nimport React from \"react\";\n\nimport \"./style.css\";\n\nexport const BaseMenuRoot = React.forwardRef<\n HTMLDivElement,\n React.ComponentPropsWithRef<\"div\">\n>(({ className, children, ...rest }, ref) => {\n const cls = useCls();\n\n return (\n <div className={clsx(cls(\"base-menu-root\"), className)} ref={ref} {...rest}>\n {children}\n </div>\n );\n});\n\nexport const BaseMenuPopup = React.forwardRef<\n HTMLDivElement,\n React.ComponentPropsWithRef<\"div\">\n>(({ className, children, ...rest }, ref) => {\n const cls = useCls();\n\n return (\n <div\n className={clsx(cls(\"base-menu-popup\"), className)}\n ref={ref}\n {...rest}\n >\n {children}\n </div>\n );\n});\n\nexport const BaseMenuContainer = React.forwardRef<\n HTMLDivElement,\n React.ComponentPropsWithRef<\"div\">\n>(({ className, children, ...rest }, ref) => {\n const cls = useCls();\n\n return (\n <div\n className={clsx(cls(\"base-menu-container\"), className)}\n ref={ref}\n {...rest}\n >\n {children}\n </div>\n );\n});\n\nexport const BaseMenuList = React.forwardRef<\n HTMLDivElement,\n React.ComponentPropsWithRef<\"div\">\n>(({ className, children, ...rest }, ref) => {\n const cls = useCls();\n\n return (\n <div className={clsx(cls(\"base-menu-list\"), className)} ref={ref} {...rest}>\n {children}\n </div>\n );\n});\n\nexport const BaseMenuSearch = React.forwardRef<\n HTMLDivElement,\n React.ComponentPropsWithRef<\"div\">\n>(({ className, children, ...rest }, ref) => {\n const cls = useCls();\n\n return (\n <div\n className={clsx(cls(\"base-menu-search\"), className)}\n ref={ref}\n {...rest}\n >\n {children}\n </div>\n );\n});\n\nexport const BaseMenuDivider = React.forwardRef<\n HTMLDivElement,\n WithRenderPropProps\n>(({ className, children, ...rest }, ref) => {\n const cls = useCls();\n\n return (\n <WithRenderProp\n className={clsx(cls(\"base-menu-divider\"), className)}\n ref={ref}\n {...rest}\n >\n {children}\n </WithRenderProp>\n );\n});\n"],"names":["BaseMenuRoot","React","className","children","rest","ref","cls","useCls","jsx","clsx","BaseMenuPopup","BaseMenuList","BaseMenuDivider","WithRenderProp"],"mappings":";;;;;;;AAMO,MAAMA,IAAeC,EAAM,WAGhC,CAAC,EAAE,WAAAC,GAAW,UAAAC,GAAU,GAAGC,EAAA,GAAQC,MAAQ;AAC3C,QAAMC,IAAMC,EAAA;AAEZ,SACE,gBAAAC,EAAC,OAAA,EAAI,WAAWC,EAAKH,EAAI,gBAAgB,GAAGJ,CAAS,GAAG,KAAAG,GAAW,GAAGD,GACnE,UAAAD,EAAA,CACH;AAEJ,CAAC,GAEYO,IAAgBT,EAAM,WAGjC,CAAC,EAAE,WAAAC,GAAW,UAAAC,GAAU,GAAGC,EAAA,GAAQC,MAAQ;AAC3C,QAAMC,IAAMC,EAAA;AAEZ,SACE,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWC,EAAKH,EAAI,iBAAiB,GAAGJ,CAAS;AAAA,MACjD,KAAAG;AAAA,MACC,GAAGD;AAAA,MAEH,UAAAD;AAAA,IAAA;AAAA,EAAA;AAGP,CAAC
|
|
1
|
+
{"version":3,"file":"component.js","sources":["../../../src/components/base-menu/component.tsx"],"sourcesContent":["\"use client\";\nimport { clsx, useCls, WithRenderProp, WithRenderPropProps } from \"../utils\";\nimport React from \"react\";\n\nimport \"./style.css\";\n\nexport const BaseMenuRoot = React.forwardRef<\n HTMLDivElement,\n React.ComponentPropsWithRef<\"div\">\n>(({ className, children, ...rest }, ref) => {\n const cls = useCls();\n\n return (\n <div className={clsx(cls(\"base-menu-root\"), className)} ref={ref} {...rest}>\n {children}\n </div>\n );\n});\n\nexport const BaseMenuPopup = React.forwardRef<\n HTMLDivElement,\n React.ComponentPropsWithRef<\"div\">\n>(({ className, children, ...rest }, ref) => {\n const cls = useCls();\n\n return (\n <div\n className={clsx(cls(\"base-menu-popup\"), className)}\n ref={ref}\n {...rest}\n >\n {children}\n </div>\n );\n});\n\nexport const BaseMenuContainer = React.forwardRef<\n HTMLDivElement,\n React.ComponentPropsWithRef<\"div\">\n>(({ className, children, ...rest }, ref) => {\n const cls = useCls();\n\n return (\n <div\n className={clsx(cls(\"base-menu-container\"), className)}\n ref={ref}\n {...rest}\n >\n {children}\n </div>\n );\n});\n\nexport const BaseMenuList = React.forwardRef<\n HTMLDivElement,\n React.ComponentPropsWithRef<\"div\">\n>(({ className, children, ...rest }, ref) => {\n const cls = useCls();\n\n return (\n <div className={clsx(cls(\"base-menu-list\"), className)} ref={ref} {...rest}>\n {children}\n </div>\n );\n});\n\nexport const BaseMenuSearch = React.forwardRef<\n HTMLDivElement,\n React.ComponentPropsWithRef<\"div\">\n>(({ className, children, ...rest }, ref) => {\n const cls = useCls();\n\n return (\n <div\n className={clsx(cls(\"base-menu-search\"), className)}\n ref={ref}\n {...rest}\n >\n {children}\n </div>\n );\n});\n\nexport const BaseMenuDivider = React.forwardRef<\n HTMLDivElement,\n WithRenderPropProps\n>(({ className, children, ...rest }, ref) => {\n const cls = useCls();\n\n return (\n <WithRenderProp\n className={clsx(cls(\"base-menu-divider\"), className)}\n ref={ref}\n {...rest}\n >\n {children}\n </WithRenderProp>\n );\n});\n"],"names":["BaseMenuRoot","React","className","children","rest","ref","cls","useCls","jsx","clsx","BaseMenuPopup","BaseMenuContainer","BaseMenuList","BaseMenuSearch","BaseMenuDivider","WithRenderProp"],"mappings":";;;;;;;AAMO,MAAMA,IAAeC,EAAM,WAGhC,CAAC,EAAE,WAAAC,GAAW,UAAAC,GAAU,GAAGC,EAAA,GAAQC,MAAQ;AAC3C,QAAMC,IAAMC,EAAA;AAEZ,SACE,gBAAAC,EAAC,OAAA,EAAI,WAAWC,EAAKH,EAAI,gBAAgB,GAAGJ,CAAS,GAAG,KAAAG,GAAW,GAAGD,GACnE,UAAAD,EAAA,CACH;AAEJ,CAAC,GAEYO,IAAgBT,EAAM,WAGjC,CAAC,EAAE,WAAAC,GAAW,UAAAC,GAAU,GAAGC,EAAA,GAAQC,MAAQ;AAC3C,QAAMC,IAAMC,EAAA;AAEZ,SACE,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWC,EAAKH,EAAI,iBAAiB,GAAGJ,CAAS;AAAA,MACjD,KAAAG;AAAA,MACC,GAAGD;AAAA,MAEH,UAAAD;AAAA,IAAA;AAAA,EAAA;AAGP,CAAC,GAEYQ,IAAoBV,EAAM,WAGrC,CAAC,EAAE,WAAAC,GAAW,UAAAC,GAAU,GAAGC,EAAA,GAAQC,MAAQ;AAC3C,QAAMC,IAAMC,EAAA;AAEZ,SACE,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWC,EAAKH,EAAI,qBAAqB,GAAGJ,CAAS;AAAA,MACrD,KAAAG;AAAA,MACC,GAAGD;AAAA,MAEH,UAAAD;AAAA,IAAA;AAAA,EAAA;AAGP,CAAC,GAEYS,IAAeX,EAAM,WAGhC,CAAC,EAAE,WAAAC,GAAW,UAAAC,GAAU,GAAGC,EAAA,GAAQC,MAAQ;AAC3C,QAAMC,IAAMC,EAAA;AAEZ,SACE,gBAAAC,EAAC,OAAA,EAAI,WAAWC,EAAKH,EAAI,gBAAgB,GAAGJ,CAAS,GAAG,KAAAG,GAAW,GAAGD,GACnE,UAAAD,EAAA,CACH;AAEJ,CAAC,GAEYU,IAAiBZ,EAAM,WAGlC,CAAC,EAAE,WAAAC,GAAW,UAAAC,GAAU,GAAGC,EAAA,GAAQC,MAAQ;AAC3C,QAAMC,IAAMC,EAAA;AAEZ,SACE,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWC,EAAKH,EAAI,kBAAkB,GAAGJ,CAAS;AAAA,MAClD,KAAAG;AAAA,MACC,GAAGD;AAAA,MAEH,UAAAD;AAAA,IAAA;AAAA,EAAA;AAGP,CAAC,GAEYW,IAAkBb,EAAM,WAGnC,CAAC,EAAE,WAAAC,GAAW,UAAAC,GAAU,GAAGC,EAAA,GAAQC,MAAQ;AAC3C,QAAMC,IAAMC,EAAA;AAEZ,SACE,gBAAAC;AAAA,IAACO;AAAA,IAAA;AAAA,MACC,WAAWN,EAAKH,EAAI,mBAAmB,GAAGJ,CAAS;AAAA,MACnD,KAAAG;AAAA,MACC,GAAGD;AAAA,MAEH,UAAAD;AAAA,IAAA;AAAA,EAAA;AAGP,CAAC;"}
|
|
@@ -1,11 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { BaseMenuDivider as e, BaseMenuList as o, BaseMenuSearch as n, BaseMenuContainer as a, BaseMenuPopup as t, BaseMenuRoot as r } from "./component.js";
|
|
2
|
+
import { BaseMenuItem as s } from "./item.js";
|
|
3
|
+
const B = {
|
|
4
|
+
Root: r,
|
|
5
|
+
Popup: t,
|
|
6
|
+
Container: a,
|
|
7
|
+
Search: n,
|
|
8
|
+
List: o,
|
|
9
|
+
Divider: e,
|
|
10
|
+
Item: s
|
|
7
11
|
};
|
|
8
12
|
export {
|
|
9
|
-
|
|
13
|
+
B as BaseMenu,
|
|
14
|
+
s as BaseMenuItem
|
|
10
15
|
};
|
|
11
16
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/components/base-menu/index.ts"],"sourcesContent":["import {\n BaseMenuRoot,\n BaseMenuPopup,\n BaseMenuContainer,\n BaseMenuSearch,\n BaseMenuList,\n BaseMenuDivider,\n} from \"./component\";\nimport { BaseMenuItem, type BaseMenuItemProps } from \"./item\";\n\nexport { BaseMenuItem, type BaseMenuItemProps };\nexport const BaseMenu = {\n Root: BaseMenuRoot,\n Popup: BaseMenuPopup,\n Container: BaseMenuContainer,\n Search: BaseMenuSearch,\n List: BaseMenuList,\n Divider: BaseMenuDivider,\n Item: BaseMenuItem,\n};\n"],"names":["BaseMenu","BaseMenuRoot","BaseMenuPopup","BaseMenuList","BaseMenuDivider"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/base-menu/index.ts"],"sourcesContent":["import {\n BaseMenuRoot,\n BaseMenuPopup,\n BaseMenuContainer,\n BaseMenuSearch,\n BaseMenuList,\n BaseMenuDivider,\n} from \"./component\";\nimport { BaseMenuItem, type BaseMenuItemProps } from \"./item\";\n\nexport { BaseMenuItem, type BaseMenuItemProps };\nexport const BaseMenu = {\n Root: BaseMenuRoot,\n Popup: BaseMenuPopup,\n Container: BaseMenuContainer,\n Search: BaseMenuSearch,\n List: BaseMenuList,\n Divider: BaseMenuDivider,\n Item: BaseMenuItem,\n};\n"],"names":["BaseMenu","BaseMenuRoot","BaseMenuPopup","BaseMenuContainer","BaseMenuSearch","BaseMenuList","BaseMenuDivider","BaseMenuItem"],"mappings":";;AAWO,MAAMA,IAAW;AAAA,EACtB,MAAMC;AAAA,EACN,OAAOC;AAAA,EACP,WAAWC;AAAA,EACX,QAAQC;AAAA,EACR,MAAMC;AAAA,EACN,SAASC;AAAA,EACT,MAAMC;AACR;"}
|
|
@@ -3,7 +3,7 @@ export interface CheckboxProps extends AntCheckboxProps {
|
|
|
3
3
|
/**
|
|
4
4
|
* Checkbox appearance variant
|
|
5
5
|
* @default 'default'
|
|
6
|
-
|
|
6
|
+
*/
|
|
7
7
|
variant?: "default" | "outlined";
|
|
8
8
|
}
|
|
9
9
|
declare const MainCheckboxInner: ({ variant, className, ...props }: CheckboxProps, ref: React.Ref<React.ComponentRef<typeof AntCheckbox>>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -12,5 +12,5 @@ export declare const Checkbox: ((props: CheckboxProps & {
|
|
|
12
12
|
}) => ReturnType<typeof MainCheckboxInner>) & {
|
|
13
13
|
Group: <T = any>(props: import('antd/es/checkbox').CheckboxGroupProps<T> & React.RefAttributes<HTMLDivElement>) => React.ReactElement;
|
|
14
14
|
};
|
|
15
|
-
export {};
|
|
15
|
+
export type { CheckboxChangeEvent, CheckboxRef, CheckboxGroupProps, CheckboxOptionType, } from 'antd/es/checkbox';
|
|
16
16
|
//# sourceMappingURL=component.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../src/components/checkbox/component.tsx"],"names":[],"mappings":"AACA,OAAO,EACL,QAAQ,IAAI,WAAW,EACvB,KAAK,aAAa,IAAI,gBAAgB,EACvC,MAAM,MAAM,CAAC;AAKd,OAAO,aAAa,CAAC;AAGrB,MAAM,WAAW,aAAc,SAAQ,gBAAgB;IACrD;;;
|
|
1
|
+
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../src/components/checkbox/component.tsx"],"names":[],"mappings":"AACA,OAAO,EACL,QAAQ,IAAI,WAAW,EACvB,KAAK,aAAa,IAAI,gBAAgB,EACvC,MAAM,MAAM,CAAC;AAKd,OAAO,aAAa,CAAC;AAGrB,MAAM,WAAW,aAAc,SAAQ,gBAAgB;IACrD;;;MAGE;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,UAAU,CAAC;CACjC;AAGD,QAAA,MAAM,iBAAiB,GACrB,kCAA8C,aAAa,EAC3D,KAAK,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,YAAY,CAAC,OAAO,WAAW,CAAC,CAAC,4CASvD,CAAC;AAUF,eAAO,MAAM,QAAQ,WANZ,aAAa,GAAG;IACrB,GAAG,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC,KAAK,CAAC,YAAY,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC;CAClE,KACE,UAAU,CAAC,OAAO,iBAAiB,CAAC;;CAKvC,CAAC;AAEH,YAAY,EACV,mBAAmB,EACnB,WAAW,EACX,kBAAkB,EAClB,kBAAkB,GACnB,MAAM,kBAAkB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.js","sources":["../../../src/components/checkbox/component.tsx"],"sourcesContent":["\"use client\";\nimport {\n Checkbox as AntCheckbox,\n type CheckboxProps as AntCheckboxProps,\n} from \"antd\";\nimport { forwardRef } from \"react\";\nimport { clsx, useCls } from \"../utils\";\n\n// Import component-specific styles\nimport \"./style.css\";\n\n// Define props interface extending Ant Design's CheckboxProps\nexport interface CheckboxProps extends AntCheckboxProps {\n /**\n * Checkbox appearance variant\n * @default 'default'\n
|
|
1
|
+
{"version":3,"file":"component.js","sources":["../../../src/components/checkbox/component.tsx"],"sourcesContent":["\"use client\";\nimport {\n Checkbox as AntCheckbox,\n type CheckboxProps as AntCheckboxProps,\n} from \"antd\";\nimport { forwardRef } from \"react\";\nimport { clsx, useCls } from \"../utils\";\n\n// Import component-specific styles\nimport \"./style.css\";\n\n// Define props interface extending Ant Design's CheckboxProps\nexport interface CheckboxProps extends AntCheckboxProps {\n /**\n * Checkbox appearance variant\n * @default 'default'\n */\n variant?: \"default\" | \"outlined\";\n}\n\n// Create inner function\nconst MainCheckboxInner = (\n { variant = \"default\", className, ...props }: CheckboxProps,\n ref: React.Ref<React.ComponentRef<typeof AntCheckbox>>\n) => {\n const cls = useCls();\n const combinedClassName = clsx(\n className,\n variant === \"outlined\" && cls(\"checkbox-outlined\")\n );\n \n return <AntCheckbox ref={ref} className={combinedClassName} {...props} />;\n};\n\n// Use forwardRef with type assertion\nconst MainCheckbox = forwardRef(MainCheckboxInner) as (\n props: CheckboxProps & {\n ref?: React.ForwardedRef<React.ComponentRef<typeof AntCheckbox>>;\n }\n) => ReturnType<typeof MainCheckboxInner>;\n\n// Create the final component with Group property\nexport const Checkbox = Object.assign(MainCheckbox, {\n Group: AntCheckbox.Group,\n});\n\nexport type {\n CheckboxChangeEvent,\n CheckboxRef,\n CheckboxGroupProps,\n CheckboxOptionType,\n} from \"antd/es/checkbox\";\n"],"names":["MainCheckboxInner","variant","className","props","ref","cls","useCls","combinedClassName","clsx","AntCheckbox","MainCheckbox","forwardRef","Checkbox"],"mappings":";;;;;;;AAqBA,MAAMA,IAAoB,CACxB,EAAE,SAAAC,IAAU,WAAW,WAAAC,GAAW,GAAGC,EAAA,GACrCC,MACG;AACH,QAAMC,IAAMC,EAAA,GACNC,IAAoBC;AAAA,IACxBN;AAAA,IACAD,MAAY,cAAcI,EAAI,mBAAmB;AAAA,EAAA;AAGnD,2BAAQI,GAAA,EAAY,KAAAL,GAAU,WAAWG,GAAoB,GAAGJ,GAAO;AACzE,GAGMO,IAAeC,EAAWX,CAAiB,GAOpCY,IAAW,OAAO,OAAOF,GAAc;AAAA,EAClD,OAAOD,EAAY;AACrB,CAAC;"}
|
|
@@ -5,13 +5,13 @@ import { useMemo as F, useContext as p, useCallback as f } from "react";
|
|
|
5
5
|
import L from "antd/es/config-provider/DisabledContext";
|
|
6
6
|
import { FormItemInputContext as x } from "antd/es/form/context";
|
|
7
7
|
import './style.css';/* empty css */
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import { Input as _ } from "../input/component.js";
|
|
8
|
+
import { useControlledState as P } from "../hooks/useControlledState.js";
|
|
9
|
+
import { useCls as R } from "../utils/antdUtils.js";
|
|
10
|
+
import { clsx as M } from "../utils/cn.js";
|
|
11
|
+
import { Input as T } from "../input/component.js";
|
|
13
12
|
import { Checkbox as b } from "../checkbox/component.js";
|
|
14
|
-
import { ScrollArea as
|
|
13
|
+
import { ScrollArea as _ } from "../scroll-area/component.js";
|
|
14
|
+
import { Radio as q } from "../radio/component.js";
|
|
15
15
|
const le = ({
|
|
16
16
|
options: i,
|
|
17
17
|
multiple: r,
|
|
@@ -27,9 +27,9 @@ const le = ({
|
|
|
27
27
|
disabled: w = !1,
|
|
28
28
|
status: z
|
|
29
29
|
}) => {
|
|
30
|
-
const [t, s] =
|
|
30
|
+
const [t, s] = P(C, I, g), n = F(() => r ? Array.isArray(t) ? t : t ? [t] : [] : Array.isArray(t) ? t.length > 0 ? [t[0]] : [] : t ? [t] : [], [t, r]);
|
|
31
31
|
p(x);
|
|
32
|
-
const D = p(L), c = w || D, o =
|
|
32
|
+
const D = p(L), c = w || D, o = R(), j = f(() => {
|
|
33
33
|
if (r) {
|
|
34
34
|
const e = i.map((a) => a.value).filter(Boolean);
|
|
35
35
|
s(e);
|
|
@@ -55,12 +55,12 @@ const le = ({
|
|
|
55
55
|
open: !0,
|
|
56
56
|
inline: !0,
|
|
57
57
|
modal: !1,
|
|
58
|
-
children: /* @__PURE__ */ v("div", { className:
|
|
58
|
+
children: /* @__PURE__ */ v("div", { className: M(o("choice-list"), y), children: [
|
|
59
59
|
/* @__PURE__ */ l(x.Provider, { value: {}, children: /* @__PURE__ */ l(
|
|
60
60
|
d.Input,
|
|
61
61
|
{
|
|
62
62
|
render: ({ ref: e, ...a }) => /* @__PURE__ */ l(
|
|
63
|
-
|
|
63
|
+
T.Search,
|
|
64
64
|
{
|
|
65
65
|
...a,
|
|
66
66
|
...S,
|
|
@@ -94,7 +94,7 @@ const le = ({
|
|
|
94
94
|
}
|
|
95
95
|
);
|
|
96
96
|
})(),
|
|
97
|
-
/* @__PURE__ */ v(
|
|
97
|
+
/* @__PURE__ */ v(_, { className: o("choice-list-items"), fadeEdges: !0, children: [
|
|
98
98
|
/* @__PURE__ */ l(d.List, { children: (e) => /* @__PURE__ */ l(
|
|
99
99
|
d.Item,
|
|
100
100
|
{
|
|
@@ -111,7 +111,7 @@ const le = ({
|
|
|
111
111
|
children: e.label
|
|
112
112
|
}
|
|
113
113
|
) : /* @__PURE__ */ l(
|
|
114
|
-
|
|
114
|
+
q,
|
|
115
115
|
{
|
|
116
116
|
tabIndex: -1,
|
|
117
117
|
checked: e.value ? n.includes(e.value) : !1,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../src/components/combobox/component.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,EACZ,YAAY,EAOb,MAAM,OAAO,CAAC;AAUf,OAAO,KAAK,EAAkB,aAAa,EAAE,MAAM,SAAS,CAAC;AAG7D,OAAO,aAAa,CAAC;AAErB,YAAY,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAQ7D,QAAA,MAAM,aAAa,GACjB,CAAC,SAAS,KAAK,CAAC,GAAG,EACnB,CAAC,SAAS,OAAO,EACjB,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,EAAE,EAEtC,mcAmCG,aAAa,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EACzB,KAAK,KAAK,CAAC,YAAY,CAAC,cAAc,CAAC,
|
|
1
|
+
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../src/components/combobox/component.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,EACZ,YAAY,EAOb,MAAM,OAAO,CAAC;AAUf,OAAO,KAAK,EAAkB,aAAa,EAAE,MAAM,SAAS,CAAC;AAG7D,OAAO,aAAa,CAAC;AAErB,YAAY,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAQ7D,QAAA,MAAM,aAAa,GACjB,CAAC,SAAS,KAAK,CAAC,GAAG,EACnB,CAAC,SAAS,OAAO,EACjB,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,EAAE,EAEtC,mcAmCG,aAAa,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EACzB,KAAK,KAAK,CAAC,YAAY,CAAC,cAAc,CAAC,4CAkbxC,CAAC;AAUF,eAAO,MAAM,QAAQ,GAPnB,CAAC,SAAS,KAAK,CAAC,GAAG,EACnB,CAAC,SAAS,OAAO,EACjB,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,cAE1B,aAAa,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,GAAG;IAAE,GAAG,CAAC,EAAE,YAAY,CAAC,cAAc,CAAC,CAAA;CAAE,KACnE,UAAU,CAAC,OAAO,aAAa,CAIlC,CAAC;AAEH,eAAe,QAAQ,CAAC"}
|
|
@@ -1,77 +1,77 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as t, jsxs as g, Fragment as ne } from "react/jsx-runtime";
|
|
3
3
|
import { Combobox as r } from "@base-ui/react/combobox";
|
|
4
|
-
import
|
|
5
|
-
import { FormItemInputContext as
|
|
4
|
+
import Ae from "antd/es/config-provider/DisabledContext";
|
|
5
|
+
import { FormItemInputContext as Re } from "antd/es/form/context";
|
|
6
6
|
import { forwardRef as Se, useRef as ke, useContext as re, useCallback as v, useMemo as y, useState as De } from "react";
|
|
7
|
-
import { BaseMenu as
|
|
7
|
+
import { BaseMenu as V } from "../base-menu/index.js";
|
|
8
8
|
import { XIcon as Me } from "@bioturing/assets";
|
|
9
|
-
import {
|
|
10
|
-
import { useComboboxTokenInput as
|
|
9
|
+
import { hasTokenSeparator as Ve, splitBySeparators as Fe } from "./utils.js";
|
|
10
|
+
import { useComboboxTokenInput as Oe } from "./use-combobox-token-input.js";
|
|
11
11
|
import './style.css';/* empty css */
|
|
12
12
|
import { SelectTrigger as p } from "../select-trigger/component.js";
|
|
13
13
|
import { BaseMenuItem as se } from "../base-menu/item.js";
|
|
14
|
-
import { Empty as
|
|
14
|
+
import { Empty as $e } from "../empty/component.js";
|
|
15
15
|
import { useControlledState as ce } from "../hooks/useControlledState.js";
|
|
16
|
-
import { useCls as
|
|
16
|
+
import { useCls as Be } from "../utils/antdUtils.js";
|
|
17
17
|
import { clsx as l } from "../utils/cn.js";
|
|
18
18
|
import { reactNodeToString as le } from "../utils/reactToString.js";
|
|
19
|
-
import { ScrollArea as
|
|
20
|
-
const
|
|
19
|
+
import { ScrollArea as Le } from "../scroll-area/component.js";
|
|
20
|
+
const Pe = (s) => /* @__PURE__ */ t(V.Root, { ...s }), je = (s) => /* @__PURE__ */ t(V.Popup, { ...s }), Ee = (s) => /* @__PURE__ */ t(V.Divider, { ...s }), Ke = (s) => /* @__PURE__ */ t(V.List, { ...s }), We = ({
|
|
21
21
|
options: s = [],
|
|
22
22
|
value: ae,
|
|
23
23
|
defaultValue: K,
|
|
24
|
-
onChange:
|
|
24
|
+
onChange: F,
|
|
25
25
|
placeholder: w = "Select...",
|
|
26
26
|
disabled: ie = !1,
|
|
27
27
|
status: de,
|
|
28
28
|
allowClear: W = !1,
|
|
29
29
|
multiple: n = !1,
|
|
30
|
-
showSearch:
|
|
31
|
-
open:
|
|
32
|
-
onOpenChange:
|
|
30
|
+
showSearch: Qe = !0,
|
|
31
|
+
open: he,
|
|
32
|
+
onOpenChange: me,
|
|
33
33
|
className: ue,
|
|
34
34
|
classNames: b,
|
|
35
|
-
size:
|
|
35
|
+
size: O = "middle",
|
|
36
36
|
optionRender: H,
|
|
37
|
-
onSearch:
|
|
37
|
+
onSearch: $,
|
|
38
38
|
clearIcon: Q,
|
|
39
39
|
suffixIcon: U,
|
|
40
|
-
placement:
|
|
40
|
+
placement: T = "bottomLeft",
|
|
41
41
|
// showSelectionSummary: _showSelectionSummary = false,
|
|
42
42
|
// selectionSummaryRender,
|
|
43
43
|
showSelectAll: X = !1,
|
|
44
|
-
optionLabelRender:
|
|
44
|
+
optionLabelRender: A,
|
|
45
45
|
getOptionKeywords: G = (u) => [
|
|
46
46
|
String(u.value),
|
|
47
47
|
le(u.label)
|
|
48
48
|
],
|
|
49
49
|
popupMatchSelectWidth: be = !0,
|
|
50
|
-
addOnEnter:
|
|
50
|
+
addOnEnter: B = !1,
|
|
51
51
|
tokenSeparators: C,
|
|
52
|
-
autoHighlight:
|
|
53
|
-
filterOption:
|
|
52
|
+
autoHighlight: L = !0,
|
|
53
|
+
filterOption: R,
|
|
54
54
|
...fe
|
|
55
55
|
}, ge) => {
|
|
56
56
|
const [u, J] = ce(
|
|
57
57
|
ae,
|
|
58
|
-
|
|
58
|
+
F,
|
|
59
59
|
K !== void 0 ? K : n ? [] : void 0
|
|
60
|
-
), [
|
|
60
|
+
), [P, S] = ce(he, me, !1), c = Be(), j = ke(null), { status: pe } = re(Re), Ce = re(Ae), k = de || pe, I = ie || Ce, h = v(
|
|
61
61
|
(e) => {
|
|
62
|
-
J(e),
|
|
62
|
+
J(e), F?.(e);
|
|
63
63
|
},
|
|
64
|
-
[J,
|
|
64
|
+
[J, F]
|
|
65
65
|
), Y = v(() => {
|
|
66
66
|
if (n) {
|
|
67
67
|
const e = s.map((o) => o.value);
|
|
68
|
-
|
|
68
|
+
h(e);
|
|
69
69
|
}
|
|
70
|
-
}, [n, s,
|
|
71
|
-
n &&
|
|
72
|
-
}, [n,
|
|
73
|
-
|
|
74
|
-
}, [n,
|
|
70
|
+
}, [n, s, h]), Z = v(() => {
|
|
71
|
+
n && h([]);
|
|
72
|
+
}, [n, h]), _ = v(() => {
|
|
73
|
+
h(n ? [] : void 0);
|
|
74
|
+
}, [n, h]), m = y(() => Array.isArray(u) ? u : u ? [u] : [], [u]), i = y(() => {
|
|
75
75
|
const e = /* @__PURE__ */ new Map();
|
|
76
76
|
for (const o of s)
|
|
77
77
|
e.set(o.value, o);
|
|
@@ -79,7 +79,7 @@ const Le = (s) => /* @__PURE__ */ t(M.Root, { ...s }), Pe = (s) => /* @__PURE__
|
|
|
79
79
|
}, [s]), D = y(() => {
|
|
80
80
|
if (!X || !n || s.length === 0)
|
|
81
81
|
return null;
|
|
82
|
-
const e =
|
|
82
|
+
const e = m.filter((d) => i.has(d)), o = e.length === s.length && s.length > 0, a = e.length > 0 && e.length < s.length;
|
|
83
83
|
return {
|
|
84
84
|
checked: o,
|
|
85
85
|
indeterminate: a,
|
|
@@ -87,9 +87,9 @@ const Le = (s) => /* @__PURE__ */ t(M.Root, { ...s }), Pe = (s) => /* @__PURE__
|
|
|
87
87
|
a || o ? Z() : Y();
|
|
88
88
|
}
|
|
89
89
|
};
|
|
90
|
-
}, [X, n, s, i,
|
|
90
|
+
}, [X, n, s, i, m, Z, Y]), xe = y(() => s.map((e) => e.value), [s]), z = y(() => n ? m.length > 0 ? `${m.length} item${m.length === 1 ? "" : "s"} selected` : null : i.get(m[0])?.label || null, [n, m, i]), q = l(
|
|
91
91
|
c("combobox-input"),
|
|
92
|
-
c(`combobox-input-${
|
|
92
|
+
c(`combobox-input-${O}`),
|
|
93
93
|
k && c(`combobox-input-${k}`),
|
|
94
94
|
b?.input
|
|
95
95
|
), ve = v(
|
|
@@ -98,34 +98,34 @@ const Le = (s) => /* @__PURE__ */ t(M.Root, { ...s }), Pe = (s) => /* @__PURE__
|
|
|
98
98
|
return le(o?.label || String(e));
|
|
99
99
|
},
|
|
100
100
|
[i]
|
|
101
|
-
), [
|
|
102
|
-
addOnEnter:
|
|
101
|
+
), [M, ee] = De(""), { handleAddOnEnter: oe, handleInputValueChange: ye } = Oe({
|
|
102
|
+
addOnEnter: B,
|
|
103
103
|
multiple: n,
|
|
104
104
|
tokenSeparators: C,
|
|
105
105
|
optionMap: i,
|
|
106
106
|
value: u,
|
|
107
|
-
handleValueChange:
|
|
107
|
+
handleValueChange: h,
|
|
108
108
|
setOpen: S,
|
|
109
109
|
setSearchValue: ee,
|
|
110
|
-
onSearch:
|
|
111
|
-
}), Ie = !!C?.length, Ne = n && Ie ? !1 :
|
|
110
|
+
onSearch: $
|
|
111
|
+
}), Ie = !!C?.length, Ne = n && Ie && Ve(M, C) ? !1 : L, te = v(
|
|
112
112
|
(e) => (o) => {
|
|
113
|
-
if (o.key === "Enter" &&
|
|
114
|
-
if (!n &&
|
|
115
|
-
oe(e) && (o.preventDefault(), ee(""),
|
|
113
|
+
if (o.key === "Enter" && B && e) {
|
|
114
|
+
if (!n && L) return;
|
|
115
|
+
oe(e) && (o.preventDefault(), ee(""), $?.(""));
|
|
116
116
|
}
|
|
117
117
|
},
|
|
118
|
-
[
|
|
119
|
-
), we = y(() =>
|
|
118
|
+
[B, L, n, oe, $]
|
|
119
|
+
), we = y(() => R === !1 ? null : typeof R == "function" ? (e, o) => {
|
|
120
120
|
const a = i.get(e);
|
|
121
|
-
return
|
|
121
|
+
return R(o, a);
|
|
122
122
|
} : (e, o) => {
|
|
123
123
|
if (!o) return !0;
|
|
124
124
|
const a = i.get(e);
|
|
125
125
|
if (!a) return !1;
|
|
126
|
-
const d = C && C.length > 0 ?
|
|
126
|
+
const d = C && C.length > 0 ? Fe(o, C) : [o], x = G(a).map((N) => N.toLowerCase()), f = d.filter((N) => {
|
|
127
127
|
const E = N.toLowerCase();
|
|
128
|
-
return x.some((
|
|
128
|
+
return x.some((Te) => Te.includes(E));
|
|
129
129
|
}).length;
|
|
130
130
|
if (f === 0) return !1;
|
|
131
131
|
if (d.length > 1 && f > 1) {
|
|
@@ -133,19 +133,19 @@ const Le = (s) => /* @__PURE__ */ t(M.Root, { ...s }), Pe = (s) => /* @__PURE__
|
|
|
133
133
|
return x.some((E) => E.includes(N));
|
|
134
134
|
}
|
|
135
135
|
return !0;
|
|
136
|
-
}, [
|
|
136
|
+
}, [R, i, C, G]);
|
|
137
137
|
return /* @__PURE__ */ t("div", { ref: ge, className: l(c("combobox"), ue), ...fe, children: /* @__PURE__ */ g(
|
|
138
138
|
r.Root,
|
|
139
139
|
{
|
|
140
|
-
value: n ?
|
|
140
|
+
value: n ? m : m[0] ?? null,
|
|
141
141
|
onValueChange: (e) => {
|
|
142
|
-
|
|
142
|
+
h(
|
|
143
143
|
n ? Array.isArray(e) ? e : [] : e
|
|
144
144
|
);
|
|
145
145
|
},
|
|
146
|
-
inputValue:
|
|
146
|
+
inputValue: M,
|
|
147
147
|
onInputValueChange: ye,
|
|
148
|
-
open:
|
|
148
|
+
open: P,
|
|
149
149
|
onOpenChange: S,
|
|
150
150
|
multiple: n,
|
|
151
151
|
disabled: I,
|
|
@@ -159,10 +159,10 @@ const Le = (s) => /* @__PURE__ */ t(M.Root, { ...s }), Pe = (s) => /* @__PURE__
|
|
|
159
159
|
/* @__PURE__ */ g(
|
|
160
160
|
p.Root,
|
|
161
161
|
{
|
|
162
|
-
ref:
|
|
163
|
-
size:
|
|
162
|
+
ref: j,
|
|
163
|
+
size: O,
|
|
164
164
|
disabled: I,
|
|
165
|
-
open:
|
|
165
|
+
open: P,
|
|
166
166
|
status: k,
|
|
167
167
|
placeholder: w,
|
|
168
168
|
displayValue: z,
|
|
@@ -182,7 +182,7 @@ const Le = (s) => /* @__PURE__ */ t(M.Root, { ...s }), Pe = (s) => /* @__PURE__
|
|
|
182
182
|
const f = i.get(x);
|
|
183
183
|
return /* @__PURE__ */ g(r.Chip, { className: l(c("combobox-chip")), children: [
|
|
184
184
|
f?.icon && /* @__PURE__ */ t("span", { className: l(c("combobox-chip-icon")), children: f.icon }),
|
|
185
|
-
/* @__PURE__ */ t("span", { className: l(c("combobox-chip-text")), children: f ?
|
|
185
|
+
/* @__PURE__ */ t("span", { className: l(c("combobox-chip-text")), children: f ? A ? A(f) : f.label : x }),
|
|
186
186
|
/* @__PURE__ */ t(
|
|
187
187
|
r.ChipRemove,
|
|
188
188
|
{
|
|
@@ -198,7 +198,7 @@ const Le = (s) => /* @__PURE__ */ t(M.Root, { ...s }), Pe = (s) => /* @__PURE__
|
|
|
198
198
|
placeholder: d.length > 0 ? "" : w,
|
|
199
199
|
className: q,
|
|
200
200
|
disabled: I,
|
|
201
|
-
onKeyDown: te(
|
|
201
|
+
onKeyDown: te(M)
|
|
202
202
|
}
|
|
203
203
|
)
|
|
204
204
|
] }) }) })
|
|
@@ -222,11 +222,11 @@ const Le = (s) => /* @__PURE__ */ t(M.Root, { ...s }), Pe = (s) => /* @__PURE__
|
|
|
222
222
|
) : /* @__PURE__ */ g(
|
|
223
223
|
p.Root,
|
|
224
224
|
{
|
|
225
|
-
ref:
|
|
225
|
+
ref: j,
|
|
226
226
|
as: "div",
|
|
227
|
-
size:
|
|
227
|
+
size: O,
|
|
228
228
|
disabled: I,
|
|
229
|
-
open:
|
|
229
|
+
open: P,
|
|
230
230
|
status: k,
|
|
231
231
|
placeholder: w,
|
|
232
232
|
displayValue: z,
|
|
@@ -246,7 +246,7 @@ const Le = (s) => /* @__PURE__ */ t(M.Root, { ...s }), Pe = (s) => /* @__PURE__
|
|
|
246
246
|
placeholder: w,
|
|
247
247
|
className: l(e, q),
|
|
248
248
|
disabled: I,
|
|
249
|
-
onKeyDown: te(
|
|
249
|
+
onKeyDown: te(M),
|
|
250
250
|
...a
|
|
251
251
|
}
|
|
252
252
|
)
|
|
@@ -270,11 +270,11 @@ const Le = (s) => /* @__PURE__ */ t(M.Root, { ...s }), Pe = (s) => /* @__PURE__
|
|
|
270
270
|
/* @__PURE__ */ t(r.Portal, { children: /* @__PURE__ */ t(
|
|
271
271
|
r.Positioner,
|
|
272
272
|
{
|
|
273
|
-
anchor:
|
|
273
|
+
anchor: j.current,
|
|
274
274
|
sideOffset: 4,
|
|
275
|
-
side:
|
|
276
|
-
align:
|
|
277
|
-
render:
|
|
275
|
+
side: T.startsWith("top") ? "top" : "bottom",
|
|
276
|
+
align: T.endsWith("Right") ? "end" : T === "top" || T === "bottom" ? "center" : "start",
|
|
277
|
+
render: Pe,
|
|
278
278
|
children: /* @__PURE__ */ t(
|
|
279
279
|
r.Popup,
|
|
280
280
|
{
|
|
@@ -283,7 +283,7 @@ const Le = (s) => /* @__PURE__ */ t(M.Root, { ...s }), Pe = (s) => /* @__PURE__
|
|
|
283
283
|
!be && c("combobox-popup--auto-width"),
|
|
284
284
|
b?.portal
|
|
285
285
|
),
|
|
286
|
-
render:
|
|
286
|
+
render: je,
|
|
287
287
|
children: /* @__PURE__ */ g("div", { className: l(c("combobox-container")), children: [
|
|
288
288
|
D && /* @__PURE__ */ g(ne, { children: [
|
|
289
289
|
/* @__PURE__ */ t(
|
|
@@ -299,18 +299,18 @@ const Le = (s) => /* @__PURE__ */ t(M.Root, { ...s }), Pe = (s) => /* @__PURE__
|
|
|
299
299
|
children: "Select All"
|
|
300
300
|
}
|
|
301
301
|
),
|
|
302
|
-
/* @__PURE__ */ t(r.Separator, { render:
|
|
302
|
+
/* @__PURE__ */ t(r.Separator, { render: Ee })
|
|
303
303
|
] }),
|
|
304
|
-
/* @__PURE__ */ g(
|
|
304
|
+
/* @__PURE__ */ g(Le, { fadeEdges: !0, children: [
|
|
305
305
|
/* @__PURE__ */ t(
|
|
306
306
|
r.List,
|
|
307
307
|
{
|
|
308
308
|
className: l(c("combobox-list"), b?.list),
|
|
309
|
-
render:
|
|
309
|
+
render: Ke,
|
|
310
310
|
children: (e) => {
|
|
311
311
|
const o = i.get(e);
|
|
312
312
|
if (!o) return null;
|
|
313
|
-
const a =
|
|
313
|
+
const a = m.includes(e);
|
|
314
314
|
return H ? H(o, {}) : /* @__PURE__ */ t(
|
|
315
315
|
se,
|
|
316
316
|
{
|
|
@@ -323,7 +323,7 @@ const Le = (s) => /* @__PURE__ */ t(M.Root, { ...s }), Pe = (s) => /* @__PURE__
|
|
|
323
323
|
icon: b?.optionIcon,
|
|
324
324
|
text: b?.optionText
|
|
325
325
|
},
|
|
326
|
-
labelRender:
|
|
326
|
+
labelRender: A ? (d) => A(o, d) : void 0,
|
|
327
327
|
render: (d) => /* @__PURE__ */ t(
|
|
328
328
|
r.Item,
|
|
329
329
|
{
|
|
@@ -341,7 +341,7 @@ const Le = (s) => /* @__PURE__ */ t(M.Root, { ...s }), Pe = (s) => /* @__PURE__
|
|
|
341
341
|
}
|
|
342
342
|
}
|
|
343
343
|
),
|
|
344
|
-
/* @__PURE__ */ t(r.Empty, { className: l(c("combobox-empty")), children: /* @__PURE__ */ t(
|
|
344
|
+
/* @__PURE__ */ t(r.Empty, { className: l(c("combobox-empty")), children: /* @__PURE__ */ t($e, { description: "No options found" }) })
|
|
345
345
|
] })
|
|
346
346
|
] })
|
|
347
347
|
}
|
|
@@ -351,11 +351,11 @@ const Le = (s) => /* @__PURE__ */ t(M.Root, { ...s }), Pe = (s) => /* @__PURE__
|
|
|
351
351
|
]
|
|
352
352
|
}
|
|
353
353
|
) });
|
|
354
|
-
},
|
|
354
|
+
}, He = Se(We), io = Object.assign(He, {
|
|
355
355
|
// Add any sub components here if needed
|
|
356
356
|
});
|
|
357
357
|
export {
|
|
358
|
-
|
|
359
|
-
|
|
358
|
+
io as Combobox,
|
|
359
|
+
io as default
|
|
360
360
|
};
|
|
361
361
|
//# sourceMappingURL=component.js.map
|