@bioturing/components 0.17.0 → 0.18.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.
@@ -1,66 +1,74 @@
1
1
  "use client";
2
- import { jsx as c } from "react/jsx-runtime";
3
- import { forwardRef as l } from "react";
4
- import { XIcon as C } from "@bioturing/assets";
5
- import g from "antd/es/tag";
2
+ import { jsx as l } from "react/jsx-runtime";
3
+ import { forwardRef as g, isValidElement as T, cloneElement as b } from "react";
4
+ import { XIcon as y } from "@bioturing/assets";
5
+ import C from "antd/es/tag";
6
+ import j from "antd/es/tag/CheckableTag";
6
7
  import './style.css';/* empty css */
7
- import { useCls as i } from "../utils/antdUtils.js";
8
- import { clsx as p } from "../utils/cn.js";
9
- const I = l(
8
+ import { useCls as f } from "../utils/antdUtils.js";
9
+ import { clsx as c } from "../utils/cn.js";
10
+ const x = g(
10
11
  ({
11
- className: a,
12
- active: e = !1,
13
- color: o,
14
- style: s,
15
- closeIcon: r,
16
- closable: t,
17
- size: f = "small",
12
+ className: o,
13
+ active: r = !1,
14
+ color: e,
15
+ style: m,
16
+ closeIcon: p,
17
+ closable: s,
18
+ size: i = "small",
18
19
  children: n,
19
- ...u
20
- }, T) => {
21
- const d = /* @__PURE__ */ c(C, { weight: "bold" }), m = i();
22
- return /* @__PURE__ */ c(
23
- g,
20
+ icon: t,
21
+ ...d
22
+ }, N) => {
23
+ const u = /* @__PURE__ */ l(y, { weight: "bold" }), a = f(), I = T(t) ? b(t, {
24
+ className: c(
25
+ a("tag-icon"),
26
+ t.props && typeof t.props == "object" && "className" in t.props && typeof t.props.className == "string" ? t.props.className : ""
27
+ )
28
+ }) : t;
29
+ return /* @__PURE__ */ l(
30
+ C,
24
31
  {
25
- ref: T,
26
- className: p(
27
- m("tag"),
28
- m(`tag-${f}`),
29
- !n && m("tag-empty"),
30
- a
32
+ ref: N,
33
+ className: c(
34
+ a("tag"),
35
+ a(`tag-${i}`),
36
+ !n && a("tag-empty"),
37
+ o
31
38
  ),
32
- color: o,
33
- style: s,
34
- closable: t,
35
- closeIcon: t ? r || d : void 0,
36
- ...e ? { "data-active": "true" } : {},
37
- ...u,
39
+ color: e,
40
+ style: m,
41
+ closable: s,
42
+ closeIcon: s ? p || u : void 0,
43
+ icon: I,
44
+ ...r ? { "data-active": "true" } : {},
45
+ ...d,
38
46
  children: n
39
47
  }
40
48
  );
41
49
  }
42
- ), b = l(
43
- ({ className: a, size: e = "small", children: o, ...s }, r) => {
44
- const t = i();
45
- return /* @__PURE__ */ c(
46
- g.CheckableTag,
50
+ ), k = g(
51
+ ({ className: o, size: r = "small", children: e, ...m }, p) => {
52
+ const s = f();
53
+ return /* @__PURE__ */ l(
54
+ j,
47
55
  {
48
- ref: r,
49
- className: p(
50
- t("tag"),
51
- t(`tag-${e}`),
52
- !o && t("tag-empty"),
53
- a
56
+ ref: p,
57
+ className: c(
58
+ s("tag"),
59
+ s(`tag-${r}`),
60
+ !e && s("tag-empty"),
61
+ o
54
62
  ),
55
- ...s,
56
- children: o
63
+ ...m,
64
+ children: e
57
65
  }
58
66
  );
59
67
  }
60
- ), $ = Object.assign(I, {
61
- CheckableTag: b
68
+ ), V = Object.assign(x, {
69
+ CheckableTag: k
62
70
  });
63
71
  export {
64
- $ as Tag
72
+ V as Tag
65
73
  };
66
74
  //# sourceMappingURL=component.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"component.js","sources":["../../../src/components/Tag/component.tsx"],"sourcesContent":["\"use client\";\nimport { forwardRef } from \"react\";\nimport { XIcon } from \"@bioturing/assets\";\nimport {\n default as AntTag,\n type CheckableTagProps as AntCheckableTagProps,\n type TagProps as AntTagProps,\n type TagType,\n} from \"antd/es/tag\";\nimport { clsx, useCls } from \"../utils\";\n\n// Import component-specific styles\nimport \"./style.css\";\n\nexport { TagType };\n\n// Define props interface extending Ant Design's TagProps\nexport interface TagProps extends AntTagProps {\n /**\n * Indicates if the tag is active\n * @default false\n */\n active?: boolean;\n /**\n * Size of the tag\n * @default \"small\"\n */\n size?: \"small\" | \"medium\" | \"large\";\n}\n\nexport interface CheckableTagProps extends AntCheckableTagProps {\n size?: \"small\" | \"medium\" | \"large\";\n}\n\n// Create Tag component\nconst InternalTag = forwardRef<HTMLSpanElement, TagProps>(\n (\n {\n className,\n active = false,\n color,\n style,\n closeIcon,\n closable,\n size = \"small\",\n children,\n ...rest\n },\n ref\n ) => {\n const renderedCloseIcon = <XIcon weight=\"bold\" />;\n const cls = useCls();\n return (\n <AntTag\n ref={ref}\n className={clsx(\n cls(\"tag\"),\n cls(`tag-${size}`),\n !children && cls(\"tag-empty\"),\n className\n )}\n color={color}\n style={style}\n closable={closable}\n closeIcon={closable ? closeIcon || renderedCloseIcon : undefined}\n {...(active ? { \"data-active\": \"true\" } : {})}\n {...rest}\n >\n {children}\n </AntTag>\n );\n }\n);\n\nconst CheckableTag = forwardRef<HTMLSpanElement, CheckableTagProps>(\n ({ className, size = \"small\", children, ...rest }, ref) => {\n const cls = useCls();\n return (\n <AntTag.CheckableTag\n ref={ref}\n className={clsx(\n cls(\"tag\"),\n cls(`tag-${size}`),\n !children && cls(\"tag-empty\"),\n className\n )}\n {...rest}\n >\n {children}\n </AntTag.CheckableTag>\n );\n }\n);\n\nexport const Tag = Object.assign(InternalTag, {\n CheckableTag,\n});\n"],"names":["InternalTag","forwardRef","className","active","color","style","closeIcon","closable","size","children","rest","ref","renderedCloseIcon","jsx","XIcon","cls","useCls","AntTag","clsx","CheckableTag","Tag"],"mappings":";;;;;;;;AAmCA,MAAMA,IAAcC;AAAA,EAClB,CACE;AAAA,IACE,WAAAC;AAAA,IACA,QAAAC,IAAS;AAAA,IACT,OAAAC;AAAA,IACA,OAAAC;AAAA,IACA,WAAAC;AAAA,IACA,UAAAC;AAAA,IACA,MAAAC,IAAO;AAAA,IACP,UAAAC;AAAA,IACA,GAAGC;AAAA,KAELC,MACG;AACH,UAAMC,IAAoB,gBAAAC,EAACC,GAAM,EAAA,QAAO,OAAO,CAAA,GACzCC,IAAMC,EAAO;AAEjB,WAAA,gBAAAH;AAAA,MAACI;AAAA,MAAA;AAAA,QACC,KAAAN;AAAA,QACA,WAAWO;AAAA,UACTH,EAAI,KAAK;AAAA,UACTA,EAAI,OAAOP,CAAI,EAAE;AAAA,UACjB,CAACC,KAAYM,EAAI,WAAW;AAAA,UAC5Bb;AAAA,QACF;AAAA,QACA,OAAAE;AAAA,QACA,OAAAC;AAAA,QACA,UAAAE;AAAA,QACA,WAAWA,IAAWD,KAAaM,IAAoB;AAAA,QACtD,GAAIT,IAAS,EAAE,eAAe,WAAW,CAAC;AAAA,QAC1C,GAAGO;AAAA,QAEH,UAAAD;AAAA,MAAA;AAAA,IACH;AAAA,EAAA;AAGN,GAEMU,IAAelB;AAAA,EACnB,CAAC,EAAE,WAAAC,GAAW,MAAAM,IAAO,SAAS,UAAAC,GAAU,GAAGC,EAAK,GAAGC,MAAQ;AACzD,UAAMI,IAAMC,EAAO;AAEjB,WAAA,gBAAAH;AAAA,MAACI,EAAO;AAAA,MAAP;AAAA,QACC,KAAAN;AAAA,QACA,WAAWO;AAAA,UACTH,EAAI,KAAK;AAAA,UACTA,EAAI,OAAOP,CAAI,EAAE;AAAA,UACjB,CAACC,KAAYM,EAAI,WAAW;AAAA,UAC5Bb;AAAA,QACF;AAAA,QACC,GAAGQ;AAAA,QAEH,UAAAD;AAAA,MAAA;AAAA,IACH;AAAA,EAAA;AAGN,GAEaW,IAAM,OAAO,OAAOpB,GAAa;AAAA,EAC5C,cAAAmB;AACF,CAAC;"}
1
+ {"version":3,"file":"component.js","sources":["../../../src/components/Tag/component.tsx"],"sourcesContent":["\"use client\";\nimport {\n forwardRef,\n cloneElement,\n isValidElement,\n ReactElement,\n HTMLAttributes,\n} from \"react\";\nimport { XIcon } from \"@bioturing/assets\";\nimport AntTag, {\n type TagProps as AntTagProps,\n type TagType,\n} from \"antd/es/tag\";\nimport AntCheckableTag, {\n type CheckableTagProps as AntCheckableTagProps,\n} from \"antd/es/tag/CheckableTag\";\nimport { clsx, useCls } from \"../utils\";\n\n// Import component-specific styles\nimport \"./style.css\";\n\nexport { TagType };\n\n// Define props interface extending Ant Design's TagProps\nexport interface TagProps extends AntTagProps {\n /**\n * Indicates if the tag is active\n * @default false\n */\n active?: boolean;\n /**\n * Size of the tag\n * @default \"small\"\n */\n size?: \"small\" | \"medium\" | \"large\";\n}\n\nexport interface CheckableTagProps extends AntCheckableTagProps {\n size?: \"small\" | \"medium\" | \"large\";\n}\n\n// Create Tag component\nconst InternalTag = forwardRef<HTMLSpanElement, TagProps>(\n (\n {\n className,\n active = false,\n color,\n style,\n closeIcon,\n closable,\n size = \"small\",\n children,\n icon,\n ...rest\n },\n ref\n ) => {\n const renderedCloseIcon = <XIcon weight=\"bold\" />;\n const cls = useCls();\n const renderedIcon = isValidElement(icon)\n ? cloneElement<HTMLAttributes<SVGElement>>(icon, {\n className: clsx(\n cls(\"tag-icon\"),\n icon.props &&\n typeof icon.props === \"object\" &&\n \"className\" in icon.props &&\n typeof icon.props.className === \"string\"\n ? icon.props.className\n : \"\"\n ),\n })\n : icon;\n return (\n <AntTag\n ref={ref}\n className={clsx(\n cls(\"tag\"),\n cls(`tag-${size}`),\n !children && cls(\"tag-empty\"),\n className\n )}\n color={color}\n style={style}\n closable={closable}\n closeIcon={closable ? closeIcon || renderedCloseIcon : undefined}\n icon={renderedIcon}\n {...(active ? { \"data-active\": \"true\" } : {})}\n {...rest}\n >\n {children}\n </AntTag>\n );\n }\n);\n\nconst CheckableTag = forwardRef<HTMLSpanElement, CheckableTagProps>(\n ({ className, size = \"small\", children, ...rest }, ref) => {\n const cls = useCls();\n return (\n <AntCheckableTag\n ref={ref}\n className={clsx(\n cls(\"tag\"),\n cls(`tag-${size}`),\n !children && cls(\"tag-empty\"),\n className\n )}\n {...rest}\n >\n {children}\n </AntCheckableTag>\n );\n }\n);\n\nexport const Tag = Object.assign(InternalTag, {\n CheckableTag,\n});\n"],"names":["InternalTag","forwardRef","className","active","color","style","closeIcon","closable","size","children","icon","rest","ref","renderedCloseIcon","jsx","XIcon","cls","useCls","renderedIcon","isValidElement","cloneElement","clsx","AntTag","CheckableTag","AntCheckableTag","Tag"],"mappings":";;;;;;;;;AA0CA,MAAMA,IAAcC;AAAA,EAClB,CACE;AAAA,IACE,WAAAC;AAAA,IACA,QAAAC,IAAS;AAAA,IACT,OAAAC;AAAA,IACA,OAAAC;AAAA,IACA,WAAAC;AAAA,IACA,UAAAC;AAAA,IACA,MAAAC,IAAO;AAAA,IACP,UAAAC;AAAA,IACA,MAAAC;AAAA,IACA,GAAGC;AAAA,KAELC,MACG;AACH,UAAMC,IAAoB,gBAAAC,EAACC,GAAM,EAAA,QAAO,OAAO,CAAA,GACzCC,IAAMC,EAAO,GACbC,IAAeC,EAAeT,CAAI,IACpCU,EAAyCV,GAAM;AAAA,MAC7C,WAAWW;AAAA,QACTL,EAAI,UAAU;AAAA,QACdN,EAAK,SACH,OAAOA,EAAK,SAAU,YACtB,eAAeA,EAAK,SACpB,OAAOA,EAAK,MAAM,aAAc,WAC9BA,EAAK,MAAM,YACX;AAAA,MAAA;AAAA,IAEP,CAAA,IACDA;AAEF,WAAA,gBAAAI;AAAA,MAACQ;AAAA,MAAA;AAAA,QACC,KAAAV;AAAA,QACA,WAAWS;AAAA,UACTL,EAAI,KAAK;AAAA,UACTA,EAAI,OAAOR,CAAI,EAAE;AAAA,UACjB,CAACC,KAAYO,EAAI,WAAW;AAAA,UAC5Bd;AAAA,QACF;AAAA,QACA,OAAAE;AAAA,QACA,OAAAC;AAAA,QACA,UAAAE;AAAA,QACA,WAAWA,IAAWD,KAAaO,IAAoB;AAAA,QACvD,MAAMK;AAAA,QACL,GAAIf,IAAS,EAAE,eAAe,WAAW,CAAC;AAAA,QAC1C,GAAGQ;AAAA,QAEH,UAAAF;AAAA,MAAA;AAAA,IACH;AAAA,EAAA;AAGN,GAEMc,IAAetB;AAAA,EACnB,CAAC,EAAE,WAAAC,GAAW,MAAAM,IAAO,SAAS,UAAAC,GAAU,GAAGE,EAAK,GAAGC,MAAQ;AACzD,UAAMI,IAAMC,EAAO;AAEjB,WAAA,gBAAAH;AAAA,MAACU;AAAA,MAAA;AAAA,QACC,KAAAZ;AAAA,QACA,WAAWS;AAAA,UACTL,EAAI,KAAK;AAAA,UACTA,EAAI,OAAOR,CAAI,EAAE;AAAA,UACjB,CAACC,KAAYO,EAAI,WAAW;AAAA,UAC5Bd;AAAA,QACF;AAAA,QACC,GAAGS;AAAA,QAEH,UAAAF;AAAA,MAAA;AAAA,IACH;AAAA,EAAA;AAGN,GAEagB,IAAM,OAAO,OAAOzB,GAAa;AAAA,EAC5C,cAAAuB;AACF,CAAC;"}
@@ -1 +1 @@
1
- @layer components{.ds-tag{display:inline-flex;align-items:center;font-size:var(--ds-font-size-sm);padding:.0625rem .4375rem}.ds-tag[data-active]{background-color:var(--ds-color-primary-bg);border-color:var(--ds-color-primary);color:var(--ds-color-primary)}.ds-tag .ds-tag-close-icon{color:var(--ds-color-icon)}.ds-tag.ds-tag-medium{padding:.1875rem .4375rem}.ds-tag.ds-tag-large{font-size:var(--ds-font-size);padding:.1875rem .4375rem}.ds-tag:is(.ds-tag-magenta,.ds-tag-red,.ds-tag-volcano,.ds-tag-orange,.ds-tag-gold,.ds-tag-lime,.ds-tag-green,.ds-tag-cyan,.ds-tag-blue,.ds-tag-geekblue,.ds-tag-purple) .ds-tag-close-icon{color:currentColor}.ds-tag.ds-tag-empty .ds-tag-close-icon{margin-left:0}}
1
+ @layer components{.ds-tag{display:inline-flex;align-items:center;font-size:var(--ds-font-size-sm);padding:.0625rem .4375rem}.ds-tag[data-active]{background-color:var(--ds-color-primary-bg);border-color:var(--ds-color-primary);color:var(--ds-color-primary)}.ds-tag .ds-tag-close-icon{color:var(--ds-color-icon)}.ds-tag.ds-tag-medium{padding:.1875rem .4375rem}.ds-tag.ds-tag-large{font-size:var(--ds-font-size);padding:.1875rem .4375rem}.ds-tag:is(.ds-tag-magenta,.ds-tag-red,.ds-tag-volcano,.ds-tag-orange,.ds-tag-gold,.ds-tag-lime,.ds-tag-green,.ds-tag-cyan,.ds-tag-blue,.ds-tag-geekblue,.ds-tag-purple) .ds-tag-close-icon{color:currentColor}.ds-tag.ds-tag-empty .ds-tag-close-icon{margin-left:0}.ds-tag .ds-tag-icon{margin-right:.25rem}}
@@ -0,0 +1,9 @@
1
+ "use client";
2
+ function o(t) {
3
+ let e, n;
4
+ document.createRange && (e = document.createRange(), e.selectNodeContents(t), e.collapse(!1), n = window.getSelection(), n && (n.removeAllRanges(), n.addRange(e)));
5
+ }
6
+ export {
7
+ o as moveTypingCursorToEnd
8
+ };
9
+ //# sourceMappingURL=selectionRange.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"selectionRange.js","sources":["../../../src/components/utils/selectionRange.ts"],"sourcesContent":["\"use client\";\n\nexport function moveTypingCursorToEnd(contentEditableElement: HTMLElement) {\n let range: Range;\n let selection: Selection | null;\n if (document.createRange) {\n range = document.createRange();\n range.selectNodeContents(contentEditableElement); //Select the entire contents of the element with the range\n range.collapse(false); //collapse the range to the end point. false means collapse to end rather than the start\n selection = window.getSelection(); //get the selection object (allows you to change selection)\n if (selection) {\n selection.removeAllRanges(); //remove any selections already made\n selection.addRange(range); //make the range you have just created the visible selection\n }\n }\n}\n"],"names":["moveTypingCursorToEnd","contentEditableElement","range","selection"],"mappings":";AAEO,SAASA,EAAsBC,GAAqC;AACrE,MAAAC,GACAC;AACJ,EAAI,SAAS,gBACXD,IAAQ,SAAS,YAAY,GAC7BA,EAAM,mBAAmBD,CAAsB,GAC/CC,EAAM,SAAS,EAAK,GACpBC,IAAY,OAAO,aAAa,GAC5BA,MACFA,EAAU,gBAAgB,GAC1BA,EAAU,SAASD,CAAK;AAG9B;"}
@@ -0,0 +1,22 @@
1
+ "use client";
2
+ import { flushSync as e } from "react-dom";
3
+ const i = (n) => {
4
+ const t = document.createElement("style");
5
+ t.appendChild(
6
+ document.createTextNode(
7
+ `* {
8
+ -webkit-transition: none !important;
9
+ -moz-transition: none !important;
10
+ -o-transition: none !important;
11
+ -ms-transition: none !important;
12
+ transition: none !important;
13
+ }`
14
+ )
15
+ ), document.head.appendChild(t), e(() => {
16
+ n();
17
+ }), window.getComputedStyle(t).opacity, document.head.removeChild(t);
18
+ };
19
+ export {
20
+ i as changeThemeWithoutTransition
21
+ };
22
+ //# sourceMappingURL=theme.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"theme.js","sources":["../../../src/components/utils/theme.ts"],"sourcesContent":["\"use client\";\n\nimport { flushSync } from \"react-dom\";\n\n/**\n * Changes the theme without transition\n * @param fn Callback function to change the theme\n */\nexport const changeThemeWithoutTransition = (fn: () => void) => {\n // https://paco.me/writing/disable-theme-transitions\n const css = document.createElement(\"style\");\n css.appendChild(\n document.createTextNode(\n `* {\n -webkit-transition: none !important;\n -moz-transition: none !important;\n -o-transition: none !important;\n -ms-transition: none !important;\n transition: none !important;\n }`\n )\n );\n document.head.appendChild(css);\n flushSync(() => {\n fn();\n });\n // force reflow\n const _ = window.getComputedStyle(css).opacity;\n document.head.removeChild(css);\n};\n"],"names":["changeThemeWithoutTransition","fn","css","flushSync"],"mappings":";;AAQa,MAAAA,IAA+B,CAACC,MAAmB;AAExD,QAAAC,IAAM,SAAS,cAAc,OAAO;AACtC,EAAAA,EAAA;AAAA,IACF,SAAS;AAAA,MACP;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAAA;AAAA,EAQJ,GACS,SAAA,KAAK,YAAYA,CAAG,GAC7BC,EAAU,MAAM;AACX,IAAAF,EAAA;AAAA,EAAA,CACJ,GAES,OAAO,iBAAiBC,CAAG,EAAE,SAC9B,SAAA,KAAK,YAAYA,CAAG;AAC/B;"}
package/dist/index.d.ts CHANGED
@@ -36,7 +36,7 @@ import { CascaderAutoProps } from 'antd';
36
36
  import { CascaderPanelAutoProps } from 'antd';
37
37
  import { CascaderPanelProps } from 'antd';
38
38
  import { CascaderProps } from 'antd';
39
- import { CheckableTagProps as CheckableTagProps_2 } from 'antd/es/tag';
39
+ import { CheckableTagProps as CheckableTagProps_2 } from 'antd/es/tag/CheckableTag';
40
40
  import { Checkbox as Checkbox_2 } from 'antd';
41
41
  import { CheckboxChangeEvent } from 'antd';
42
42
  import { CheckboxGroupProps } from 'antd/es/checkbox';
@@ -74,6 +74,7 @@ import { DescriptionsProps } from 'antd';
74
74
  import { DirectoryTreeProps as DirectoryTreeProps_2 } from 'antd/es/tree';
75
75
  import { Divider } from 'antd';
76
76
  import { DividerProps } from 'antd';
77
+ import { DragDropValueProps as DragDropValueProps_2 } from './types';
77
78
  import { DraggerProps } from './dragger';
78
79
  import { Drawer } from 'antd';
79
80
  import { DrawerProps } from 'antd';
@@ -384,6 +385,12 @@ export declare const categoricalChartsColors: ColorTokenValue[];
384
385
 
385
386
  export declare type CategoricalPaletteName = (typeof CATEGORICAL_PALETTE_NAMES)[number];
386
387
 
388
+ /**
389
+ * Changes the theme without transition
390
+ * @param fn Callback function to change the theme
391
+ */
392
+ export declare const changeThemeWithoutTransition: (fn: () => void) => void;
393
+
387
394
  export declare const chartColorTokens: Record<"colorChartsRed300" | "colorChartsRed400" | "colorChartsRed500" | "colorChartsRed600" | "colorChartsRed700" | "colorChartsRed800" | "colorChartsRed900" | "colorChartsRed1000" | "colorChartsRed1100" | "colorChartsRed1200" | "colorChartsOrange300" | "colorChartsOrange400" | "colorChartsOrange500" | "colorChartsOrange600" | "colorChartsOrange700" | "colorChartsOrange800" | "colorChartsOrange900" | "colorChartsOrange1000" | "colorChartsOrange1100" | "colorChartsOrange1200" | "colorChartsYellow300" | "colorChartsYellow400" | "colorChartsYellow500" | "colorChartsYellow600" | "colorChartsYellow700" | "colorChartsYellow800" | "colorChartsYellow900" | "colorChartsYellow1000" | "colorChartsYellow1100" | "colorChartsYellow1200" | "colorChartsGreen300" | "colorChartsGreen400" | "colorChartsGreen500" | "colorChartsGreen600" | "colorChartsGreen700" | "colorChartsGreen800" | "colorChartsGreen900" | "colorChartsGreen1000" | "colorChartsGreen1100" | "colorChartsGreen1200" | "colorChartsTeal300" | "colorChartsTeal400" | "colorChartsTeal500" | "colorChartsTeal600" | "colorChartsTeal700" | "colorChartsTeal800" | "colorChartsTeal900" | "colorChartsTeal1000" | "colorChartsTeal1100" | "colorChartsTeal1200" | "colorChartsBlue1300" | "colorChartsBlue1400" | "colorChartsBlue1500" | "colorChartsBlue1600" | "colorChartsBlue1700" | "colorChartsBlue1800" | "colorChartsBlue1900" | "colorChartsBlue11000" | "colorChartsBlue11100" | "colorChartsBlue11200" | "colorChartsBlue2300" | "colorChartsBlue2400" | "colorChartsBlue2500" | "colorChartsBlue2600" | "colorChartsBlue2700" | "colorChartsBlue2800" | "colorChartsBlue2900" | "colorChartsBlue21000" | "colorChartsBlue21100" | "colorChartsBlue21200" | "colorChartsPurple300" | "colorChartsPurple400" | "colorChartsPurple500" | "colorChartsPurple600" | "colorChartsPurple700" | "colorChartsPurple800" | "colorChartsPurple900" | "colorChartsPurple1000" | "colorChartsPurple1100" | "colorChartsPurple1200" | "colorChartsPink300" | "colorChartsPink400" | "colorChartsPink500" | "colorChartsPink600" | "colorChartsPink700" | "colorChartsPink800" | "colorChartsPink900" | "colorChartsPink1000" | "colorChartsPink1100" | "colorChartsPink1200" | "colorChartsStatusCritical" | "colorChartsStatusHigh" | "colorChartsStatusMedium" | "colorChartsStatusLow" | "colorChartsStatusPositive" | "colorChartsStatusInfo" | "colorChartsStatusNeutral" | "colorChartsThresholdNegative" | "colorChartsThresholdPositive" | "colorChartsThresholdInfo" | "colorChartsThresholdNeutral" | "colorChartsLineGrid" | "colorChartsLineTick" | "colorChartsLineAxis" | "colorChartsLabelAxis" | "colorChartsPaletteCategorical1" | "colorChartsPaletteCategorical2" | "colorChartsPaletteCategorical3" | "colorChartsPaletteCategorical4" | "colorChartsPaletteCategorical5" | "colorChartsPaletteCategorical6" | "colorChartsPaletteCategorical7" | "colorChartsPaletteCategorical8" | "colorChartsPaletteCategorical9" | "colorChartsPaletteCategorical10" | "colorChartsPaletteCategorical11" | "colorChartsPaletteCategorical12" | "colorChartsPaletteCategorical13" | "colorChartsPaletteCategorical14" | "colorChartsPaletteCategorical15" | "colorChartsPaletteCategorical16" | "colorChartsPaletteCategorical17" | "colorChartsPaletteCategorical18" | "colorChartsPaletteCategorical19" | "colorChartsPaletteCategorical20" | "colorChartsPaletteCategorical21" | "colorChartsPaletteCategorical22" | "colorChartsPaletteCategorical23" | "colorChartsPaletteCategorical24" | "colorChartsPaletteCategorical25" | "colorChartsPaletteCategorical26" | "colorChartsPaletteCategorical27" | "colorChartsPaletteCategorical28" | "colorChartsPaletteCategorical29" | "colorChartsPaletteCategorical30" | "colorChartsPaletteCategorical31" | "colorChartsPaletteCategorical32" | "colorChartsPaletteCategorical33" | "colorChartsPaletteCategorical34" | "colorChartsPaletteCategorical35" | "colorChartsPaletteCategorical36" | "colorChartsPaletteCategorical37" | "colorChartsPaletteCategorical38" | "colorChartsPaletteCategorical39" | "colorChartsPaletteCategorical40" | "colorChartsPaletteCategorical41" | "colorChartsPaletteCategorical42" | "colorChartsPaletteCategorical43" | "colorChartsPaletteCategorical44" | "colorChartsPaletteCategorical45" | "colorChartsPaletteCategorical46" | "colorChartsPaletteCategorical47" | "colorChartsPaletteCategorical48" | "colorChartsPaletteCategorical49" | "colorChartsPaletteCategorical50", ColorTokenValue>;
388
395
 
389
396
  export declare interface CheckableTagProps extends CheckableTagProps_2 {
@@ -1339,7 +1346,13 @@ export declare const DragDrop: typeof DragDropRoot & {
1339
1346
  /**
1340
1347
  * Zone where items can be dropped
1341
1348
  */
1342
- Droppable: <T extends DragData = unknown>({ id, children, className, disabled, placeholder, icon, render, onDrop, validate, ...rest }: DragDropDroppableProps<T>) => null;
1349
+ Droppable: <T extends DragData = unknown, M extends boolean = false>({ id, children, className, disabled, placeholder, icon, render, onDrop, validate, multiple, value, onChange, renderValueLabel, renderValueIcon, ...rest }: DragDropDroppableProps<T, M>) => null;
1350
+ /**
1351
+ * Value component to display the value of the dragged item
1352
+ */
1353
+ Value: <T extends DragData, M extends boolean>(props: DragDropValueProps_2<T, M> & {
1354
+ ref?: ForwardedRef<HTMLDivElement>;
1355
+ }) => ReturnType<(<T_1 extends DragData, M_1 extends boolean>({ value, onChange, multiple, renderValueLabel, renderValueIcon, className, style, ...rest }: DragDropValueProps_2<T_1, M_1> & ComponentPropsWithoutRef<"div">, ref: ForwardedRef<HTMLDivElement>) => JSX.Element)>;
1343
1356
  };
1344
1357
 
1345
1358
  /**
@@ -1385,10 +1398,17 @@ export declare interface DragDropDraggableProps<T extends DragData = DragData> e
1385
1398
  onlyIndicatorDraggable?: boolean;
1386
1399
  }
1387
1400
 
1401
+ declare type DragDropDropableRenderFnProps<T extends DragData = DragData, M extends boolean = false> = {
1402
+ isOver: boolean;
1403
+ id: UniqueIdentifier;
1404
+ value: M extends true ? T[] : T;
1405
+ onChange: (value: M extends true ? T[] : T) => void;
1406
+ };
1407
+
1388
1408
  /**
1389
1409
  * Props for the DropZone component
1390
1410
  */
1391
- export declare interface DragDropDroppableProps<T extends DragData = DragData> extends Omit<React.ComponentPropsWithoutRef<"div">, "id" | "onDragEnter" | "onDragOver" | "onDragLeave" | "onDrop"> {
1411
+ export declare interface DragDropDroppableProps<T extends DragData = DragData, M extends boolean = false> extends Omit<React.ComponentPropsWithoutRef<"div">, "id" | "onDragEnter" | "onDragOver" | "onDragLeave" | "onDrop" | "onChange">, Omit<DragDropValueProps<T, M>, "id"> {
1392
1412
  /**
1393
1413
  * Unique identifier for the droppable area
1394
1414
  */
@@ -1410,10 +1430,7 @@ export declare interface DragDropDroppableProps<T extends DragData = DragData> e
1410
1430
  /**
1411
1431
  * Custom render function
1412
1432
  */
1413
- render?: useRender.RenderProp<{
1414
- isOver: boolean;
1415
- id: string;
1416
- }>;
1433
+ render?: useRender.RenderProp<DragDropDropableRenderFnProps<T, M>>;
1417
1434
  /**
1418
1435
  * Callback fired when an item is dropped on this zone
1419
1436
  */
@@ -1425,6 +1442,10 @@ export declare interface DragDropDroppableProps<T extends DragData = DragData> e
1425
1442
  * Validate if the item can be dropped
1426
1443
  */
1427
1444
  validate?: (item: DraggableInfo<T>) => boolean;
1445
+ /**
1446
+ * Maximum number of items that can be dropped
1447
+ */
1448
+ maxItems?: number;
1428
1449
  }
1429
1450
 
1430
1451
  /**
@@ -1463,6 +1484,14 @@ export declare interface DragDropProps<T extends DragData = DragData> {
1463
1484
  */
1464
1485
  export declare function DragDropRoot<T extends DragData = DragData>({ children, onDragEnd: _onDragEnd, onDragStart: _onDragStart, onDrop: _onDrop, className, }: DragDropProps<T>): JSX.Element;
1465
1486
 
1487
+ declare interface DragDropValueProps<T extends DragData = DragData, M extends boolean = false> extends Omit<ComponentPropsWithoutRef<"div">, "onDragEnter" | "onDragOver" | "onDragLeave" | "onDrop" | "onChange"> {
1488
+ multiple?: M;
1489
+ value?: M extends true ? T[] : T;
1490
+ onChange?: M extends true ? (value: T[]) => void : (value: T) => void;
1491
+ renderValueLabel?: (singleValue: T) => ReactElement | string;
1492
+ renderValueIcon?: (singleValue: T) => ReactElement;
1493
+ }
1494
+
1466
1495
  export declare interface DragEndEvent<T extends DragData = DragData> {
1467
1496
  active: {
1468
1497
  id: UniqueIdentifier;
@@ -1939,6 +1968,8 @@ export declare interface ModalProviderProps {
1939
1968
 
1940
1969
  declare type ModalType = NonNullable<ModalFuncProps["type"]> | "default";
1941
1970
 
1971
+ export declare function moveTypingCursorToEnd(contentEditableElement: HTMLElement): void;
1972
+
1942
1973
  export declare const Nav: {
1943
1974
  Item: <T extends HTMLElement>(props: NavItemProps & {
1944
1975
  ref?: React.Ref<T>;