@bioturing/components 0.24.1 → 0.26.2
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/checkbox/component.js +12 -4
- package/dist/components/checkbox/component.js.map +1 -1
- package/dist/components/checkbox/style.css +1 -1
- package/dist/components/form/item.js +39 -26
- package/dist/components/form/item.js.map +1 -1
- package/dist/components/form/label.js +31 -21
- package/dist/components/form/label.js.map +1 -1
- package/dist/components/form/style.css +1 -1
- package/dist/components/spin/style.css +1 -1
- package/dist/components/splitter/component.js +7 -36
- package/dist/components/splitter/component.js.map +1 -1
- package/dist/components/splitter/context.js +6 -0
- package/dist/components/splitter/context.js.map +1 -0
- package/dist/components/splitter/splitter-panel.js +52 -0
- package/dist/components/splitter/splitter-panel.js.map +1 -0
- package/dist/components/splitter/splitter.js +157 -0
- package/dist/components/splitter/splitter.js.map +1 -0
- package/dist/components/splitter/style.css +1 -1
- package/dist/components/status-icon/component.js +34 -0
- package/dist/components/status-icon/component.js.map +1 -0
- package/dist/components/status-icon/style.css +1 -0
- package/dist/components/theme-provider/style.css +1 -1
- package/dist/index.d.ts +71 -14
- package/dist/index.js +60 -58
- package/dist/index.js.map +1 -1
- package/dist/metadata.js +16 -2
- package/dist/metadata.js.map +1 -1
- package/package.json +4 -2
|
@@ -1,12 +1,20 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
2
|
+
import { jsx as m } from "react/jsx-runtime";
|
|
3
3
|
import { Checkbox as o } from "antd";
|
|
4
|
-
import { forwardRef as
|
|
4
|
+
import { forwardRef as i } from "react";
|
|
5
5
|
import './style.css';/* empty css */
|
|
6
|
-
|
|
6
|
+
import { useCls as a } from "../utils/antdUtils.js";
|
|
7
|
+
import { clsx as l } from "../utils/cn.js";
|
|
8
|
+
const p = ({ variant: e = "default", className: r, ...c }, s) => {
|
|
9
|
+
const t = a(), n = l(
|
|
10
|
+
r,
|
|
11
|
+
e === "outlined" && t("checkbox-outlined")
|
|
12
|
+
);
|
|
13
|
+
return /* @__PURE__ */ m(o, { ref: s, className: n, ...c });
|
|
14
|
+
}, x = i(p), d = Object.assign(x, {
|
|
7
15
|
Group: o.Group
|
|
8
16
|
});
|
|
9
17
|
export {
|
|
10
|
-
|
|
18
|
+
d as Checkbox
|
|
11
19
|
};
|
|
12
20
|
//# sourceMappingURL=component.js.map
|
|
@@ -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\";\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// Create inner function\nconst MainCheckboxInner = (\n props: CheckboxProps,\n ref: React.Ref<React.ComponentRef<typeof AntCheckbox>>\n) => {\n return <AntCheckbox ref={ref} {...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"],"names":["MainCheckboxInner","props","ref","
|
|
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"],"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,EAAM,GAC3CC,MACG;AACH,QAAMC,IAAMC,EAAO,GACbC,IAAoBC;AAAA,IACxBN;AAAA,IACAD,MAAY,cAAcI,EAAI,mBAAmB;AAAA,EACnD;AAEA,2BAAQI,GAAY,EAAA,KAAAL,GAAU,WAAWG,GAAoB,GAAGJ,GAAO;AACzE,GAGMO,IAAeC,EAAWX,CAAiB,GAOpCY,IAAW,OAAO,OAAOF,GAAc;AAAA,EAClD,OAAOD,EAAY;AACrB,CAAC;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer components{:is(.ds-checkbox-wrapper .ds-checkbox.ds-checkbox-indeterminate) .ds-checkbox-inner{background-color:var(--ds-color-primary)
|
|
1
|
+
@layer components{:is(.ds-checkbox-wrapper .ds-checkbox.ds-checkbox-indeterminate) .ds-checkbox-inner{background-color:var(--ds-color-primary);border-color:var(--ds-color-primary)}:is(:is(.ds-checkbox-wrapper .ds-checkbox.ds-checkbox-indeterminate) .ds-checkbox-inner):after{background-color:var(--ds-color-white);height:.125rem;border-radius:.125rem}:is(.ds-checkbox-outlined.ds-checkbox-wrapper .ds-checkbox) .ds-checkbox-inner{background-color:transparent}.ds-checkbox-checked:is(.ds-checkbox-outlined.ds-checkbox-wrapper .ds-checkbox) .ds-checkbox-inner{background-color:transparent;--ds-color-border: var(--ds-color-primary);border-color:var(--ds-color-border)}:is(.ds-checkbox-checked:is(.ds-checkbox-outlined.ds-checkbox-wrapper .ds-checkbox) .ds-checkbox-inner):hover{--ds-color-border: var(--ds-color-primary-hover);border-color:var(--ds-color-border)}:is(.ds-checkbox-checked:is(.ds-checkbox-outlined.ds-checkbox-wrapper .ds-checkbox) .ds-checkbox-inner):after{border-color:var(--ds-color-primary)}.ds-checkbox-indeterminate:is(.ds-checkbox-outlined.ds-checkbox-wrapper .ds-checkbox) .ds-checkbox-inner{background-color:transparent;--ds-color-border: var(--ds-color-primary)}:is(.ds-checkbox-indeterminate:is(.ds-checkbox-outlined.ds-checkbox-wrapper .ds-checkbox) .ds-checkbox-inner):after{background-color:var(--ds-color-primary)}:is(.ds-checkbox-checked:is(.ds-checkbox-outlined.ds-checkbox-wrapper .ds-checkbox):hover,.ds-checkbox-indeterminate:is(.ds-checkbox-outlined.ds-checkbox-wrapper .ds-checkbox):hover) .ds-checkbox-inner{background-color:transparent;border-color:var( --ds-color-primary-hover, var(--ds-color-primary) )}}
|
|
@@ -1,30 +1,43 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import
|
|
4
|
-
import { FormLabel as
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
2
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
3
|
+
import q from "antd/es/form/FormItem";
|
|
4
|
+
import { FormLabel as F } from "./label.js";
|
|
5
|
+
import { isPlainObject as b } from "es-toolkit";
|
|
6
|
+
const L = ({
|
|
7
|
+
tooltip: p,
|
|
8
|
+
label: t,
|
|
9
|
+
optionalMark: d = !1,
|
|
10
|
+
requiredMark: s = !0,
|
|
11
|
+
labelRender: i,
|
|
12
|
+
required: m,
|
|
13
|
+
rules: o,
|
|
14
|
+
children: c,
|
|
15
|
+
...f
|
|
16
|
+
}) => {
|
|
17
|
+
const e = m || (o == null ? void 0 : o.some(
|
|
18
|
+
(r) => b(r) && "required" in r && r.required
|
|
19
|
+
)), n = t ? /* @__PURE__ */ a(
|
|
20
|
+
F,
|
|
21
|
+
{
|
|
22
|
+
label: t,
|
|
23
|
+
tooltip: p,
|
|
24
|
+
optionalMark: !e && d,
|
|
25
|
+
requiredMark: e && s,
|
|
26
|
+
as: "span"
|
|
27
|
+
}
|
|
28
|
+
) : void 0;
|
|
29
|
+
return /* @__PURE__ */ a(
|
|
30
|
+
q,
|
|
31
|
+
{
|
|
32
|
+
required: m,
|
|
33
|
+
label: i ? i(n) : n,
|
|
34
|
+
rules: o,
|
|
35
|
+
...f,
|
|
36
|
+
children: c
|
|
37
|
+
}
|
|
38
|
+
);
|
|
39
|
+
};
|
|
27
40
|
export {
|
|
28
|
-
|
|
41
|
+
L as FormItem
|
|
29
42
|
};
|
|
30
43
|
//# sourceMappingURL=item.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"item.js","sources":["../../../src/components/form/item.tsx"],"sourcesContent":["\"use client\";\nimport {\n default as AntdFormItem,\n type FormItemProps as AntdFormItemProps,\n} from \"antd/es/form/FormItem\";\nimport { FormLabel } from \"./label\";\n\nexport interface FormItemProps<Values = unknown>\n extends AntdFormItemProps<Values> {\n // tooltip?: React.ReactNode | TooltipProps;\n /**\n * Whether the
|
|
1
|
+
{"version":3,"file":"item.js","sources":["../../../src/components/form/item.tsx"],"sourcesContent":["\"use client\";\nimport {\n default as AntdFormItem,\n type FormItemProps as AntdFormItemProps,\n} from \"antd/es/form/FormItem\";\nimport { FormLabel } from \"./label\";\nimport { isPlainObject } from \"es-toolkit\";\nimport type React from \"react\";\n\nexport interface FormItemProps<Values = unknown>\n extends Omit<AntdFormItemProps<Values>, \"children\"> {\n // tooltip?: React.ReactNode | TooltipProps;\n /**\n * Whether show the optional mark. By default, optional item will not show the optional mark.\n * @default false\n */\n optionalMark?: boolean | React.ReactNode;\n /**\n * Whether show the asterisk when the field is required\n * @default true\n */\n requiredMark?: boolean | React.ReactNode;\n /**\n * Custom render function for the label\n */\n labelRender?: (label: React.ReactElement) => React.ReactElement;\n /**\n * Form item children - can be React nodes or render functions\n */\n children?: AntdFormItemProps<Values>[\"children\"];\n}\n\nexport const FormItem = <Values = unknown,>({\n tooltip,\n label,\n optionalMark = false,\n requiredMark = true,\n labelRender,\n required,\n rules,\n children,\n ...rest\n}: FormItemProps<Values>) => {\n const isRequired =\n required ||\n rules?.some(\n (rule) => isPlainObject(rule) && \"required\" in rule && rule.required\n );\n const renderedLabel = label ? (\n <FormLabel\n label={label}\n tooltip={tooltip}\n optionalMark={!isRequired && optionalMark}\n requiredMark={isRequired && requiredMark}\n as=\"span\"\n />\n ) : undefined;\n\n return (\n <AntdFormItem\n required={required}\n label={labelRender ? labelRender(renderedLabel) : renderedLabel}\n rules={rules}\n {...rest}\n >\n {children}\n </AntdFormItem>\n );\n};\n"],"names":["FormItem","tooltip","label","optionalMark","requiredMark","labelRender","required","rules","children","rest","isRequired","rule","isPlainObject","renderedLabel","jsx","FormLabel","AntdFormItem"],"mappings":";;;;;AAgCO,MAAMA,IAAW,CAAoB;AAAA,EAC1C,SAAAC;AAAA,EACA,OAAAC;AAAA,EACA,cAAAC,IAAe;AAAA,EACf,cAAAC,IAAe;AAAA,EACf,aAAAC;AAAA,EACA,UAAAC;AAAA,EACA,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,GAAGC;AACL,MAA6B;AACrB,QAAAC,IACJJ,MACAC,KAAA,gBAAAA,EAAO;AAAA,IACL,CAACI,MAASC,EAAcD,CAAI,KAAK,cAAcA,KAAQA,EAAK;AAAA,MAE1DE,IAAgBX,IACpB,gBAAAY;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,OAAAb;AAAA,MACA,SAAAD;AAAA,MACA,cAAc,CAACS,KAAcP;AAAA,MAC7B,cAAcO,KAAcN;AAAA,MAC5B,IAAG;AAAA,IAAA;AAAA,EAAA,IAEH;AAGF,SAAA,gBAAAU;AAAA,IAACE;AAAA,IAAA;AAAA,MACC,UAAAV;AAAA,MACA,OAAOD,IAAcA,EAAYQ,CAAa,IAAIA;AAAA,MAClD,OAAAN;AAAA,MACC,GAAGE;AAAA,MAEH,UAAAD;AAAA,IAAA;AAAA,EACH;AAEJ;"}
|
|
@@ -1,47 +1,57 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
2
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
3
3
|
import { forwardRef as b, isValidElement as d } from "react";
|
|
4
4
|
import { QuestionIcon as h } from "@bioturing/assets";
|
|
5
5
|
import { useCls as u } from "../utils/antdUtils.js";
|
|
6
|
-
import { IconButton as
|
|
7
|
-
import { cn as
|
|
8
|
-
import { WithRenderProp as
|
|
6
|
+
import { IconButton as y } from "../icon-button/component.js";
|
|
7
|
+
import { cn as N } from "../utils/cn.js";
|
|
8
|
+
import { WithRenderProp as x } from "../utils/WithRenderProp.js";
|
|
9
9
|
const I = ({
|
|
10
|
-
label:
|
|
11
|
-
tooltip:
|
|
12
|
-
optionalMark:
|
|
13
|
-
requiredMark:
|
|
10
|
+
label: n,
|
|
11
|
+
tooltip: m,
|
|
12
|
+
optionalMark: l,
|
|
13
|
+
requiredMark: e,
|
|
14
14
|
className: t,
|
|
15
15
|
as: i,
|
|
16
|
-
render:
|
|
17
|
-
...
|
|
16
|
+
render: a,
|
|
17
|
+
...s
|
|
18
18
|
}, c) => {
|
|
19
19
|
const r = u(), f = [
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
n,
|
|
21
|
+
m && /* @__PURE__ */ o(
|
|
22
|
+
y,
|
|
23
23
|
{
|
|
24
24
|
className: r("form-item-explaination-icon"),
|
|
25
|
-
label: typeof
|
|
26
|
-
children: /* @__PURE__ */
|
|
25
|
+
label: typeof m == "string" || d(m) ? m : void 0,
|
|
26
|
+
children: /* @__PURE__ */ o(h, {})
|
|
27
27
|
},
|
|
28
28
|
"tooltip"
|
|
29
29
|
),
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
l && /* @__PURE__ */ o("span", { className: r("form-item-label-optional-mark"), children: typeof l == "boolean" ? "(optional)" : l }, "optional"),
|
|
31
|
+
e && /* @__PURE__ */ o(
|
|
32
|
+
"span",
|
|
33
|
+
{
|
|
34
|
+
className: r(
|
|
35
|
+
"form-item-label-required-mark",
|
|
36
|
+
typeof e == "boolean" ? "form-item-label-required-mark-asterisk" : ""
|
|
37
|
+
),
|
|
38
|
+
children: typeof e == "boolean" ? "*" : e
|
|
39
|
+
},
|
|
40
|
+
"required"
|
|
41
|
+
)
|
|
32
42
|
], p = {
|
|
33
43
|
ref: c,
|
|
34
|
-
className:
|
|
44
|
+
className: N(
|
|
35
45
|
r(
|
|
36
46
|
"form-item-label-inner",
|
|
37
|
-
|
|
47
|
+
e && "form-item-label-with-required-mark"
|
|
38
48
|
),
|
|
39
49
|
t
|
|
40
50
|
),
|
|
41
51
|
children: f,
|
|
42
|
-
...
|
|
52
|
+
...s
|
|
43
53
|
};
|
|
44
|
-
return /* @__PURE__ */
|
|
54
|
+
return /* @__PURE__ */ o(x, { as: i || "span", render: a, ...p });
|
|
45
55
|
}, j = b(I);
|
|
46
56
|
export {
|
|
47
57
|
j as FormLabel
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"label.js","sources":["../../../src/components/form/label.tsx"],"sourcesContent":["\"use client\";\nimport React, {\n forwardRef,\n type ElementType,\n type Ref,\n ComponentPropsWithRef,\n isValidElement,\n} from \"react\";\nimport {\n useCls,\n WithRenderPropProps,\n WithRenderProp,\n ElementTypeToDOMType,\n cn,\n} from \"../utils\";\nimport { IconButton } from \"../icon-button\";\nimport { QuestionIcon } from \"@bioturing/assets\";\nimport { WrapperTooltipProps } from \"antd/es/form/FormItemLabel\";\n\nexport type FormLabelProps<E extends ElementType = \"label\"> =\n WithRenderPropProps<E> & {\n /**\n * Label content to display\n */\n label: React.ReactNode;\n /**\n * Optional tooltip to display next to the label\n */\n tooltip?: React.ReactNode | WrapperTooltipProps;\n /**\n * Whether to show optional mark or custom optional mark content\n * @default false\n */\n optionalMark?: boolean | React.ReactNode;\n /**\n * Whether to show required mark or custom required mark content\n * @default true\n */\n requiredMark?: boolean | React.ReactNode;\n };\n\n/**\n * Implementation of the FormLabel component\n */\nconst FormLabelImpl = <E extends ElementType = \"label\">(\n {\n label,\n tooltip,\n optionalMark,\n requiredMark
|
|
1
|
+
{"version":3,"file":"label.js","sources":["../../../src/components/form/label.tsx"],"sourcesContent":["\"use client\";\nimport React, {\n forwardRef,\n type ElementType,\n type Ref,\n ComponentPropsWithRef,\n isValidElement,\n} from \"react\";\nimport {\n useCls,\n WithRenderPropProps,\n WithRenderProp,\n ElementTypeToDOMType,\n cn,\n} from \"../utils\";\nimport { IconButton } from \"../icon-button\";\nimport { QuestionIcon } from \"@bioturing/assets\";\nimport { WrapperTooltipProps } from \"antd/es/form/FormItemLabel\";\n\nexport type FormLabelProps<E extends ElementType = \"label\"> =\n WithRenderPropProps<E> & {\n /**\n * Label content to display\n */\n label: React.ReactNode;\n /**\n * Optional tooltip to display next to the label\n */\n tooltip?: React.ReactNode | WrapperTooltipProps;\n /**\n * Whether to show optional mark or custom optional mark content\n * @default false\n */\n optionalMark?: boolean | React.ReactNode;\n /**\n * Whether to show required mark or custom required mark content\n * @default true\n */\n requiredMark?: boolean | React.ReactNode;\n };\n\n/**\n * Implementation of the FormLabel component\n */\nconst FormLabelImpl = <E extends ElementType = \"label\">(\n {\n label,\n tooltip,\n optionalMark,\n requiredMark,\n className,\n as,\n render,\n ...rest\n }: FormLabelProps<E>,\n ref: Ref<ElementTypeToDOMType<E>>\n) => {\n const cls = useCls();\n\n const labelContent = [\n label,\n tooltip && (\n <IconButton\n key=\"tooltip\"\n className={cls(\"form-item-explaination-icon\")}\n label={\n typeof tooltip === \"string\" || isValidElement(tooltip)\n ? tooltip\n : undefined\n }\n >\n <QuestionIcon />\n </IconButton>\n ),\n optionalMark && (\n <span key=\"optional\" className={cls(\"form-item-label-optional-mark\")}>\n {typeof optionalMark === \"boolean\" ? \"(optional)\" : optionalMark}\n </span>\n ),\n requiredMark && (\n <span\n key=\"required\"\n className={cls(\n \"form-item-label-required-mark\",\n typeof requiredMark === \"boolean\"\n ? \"form-item-label-required-mark-asterisk\"\n : \"\"\n )}\n >\n {typeof requiredMark === \"boolean\" ? \"*\" : requiredMark}\n </span>\n ),\n ];\n\n const elementProps = {\n ref,\n className: cn(\n cls(\n \"form-item-label-inner\",\n requiredMark && \"form-item-label-with-required-mark\"\n ),\n className\n ),\n children: labelContent,\n ...rest,\n };\n\n return <WithRenderProp as={as || \"span\"} render={render} {...elementProps} />;\n};\n\n// Export with correct typing\nexport const FormLabel = forwardRef(FormLabelImpl) as <\n E extends ElementType = \"label\"\n>(\n props: FormLabelProps<E> & { ref?: ComponentPropsWithRef<E>[\"ref\"] }\n) => ReturnType<typeof FormLabelImpl>;\n"],"names":["FormLabelImpl","label","tooltip","optionalMark","requiredMark","className","as","render","rest","ref","cls","useCls","labelContent","jsx","IconButton","isValidElement","QuestionIcon","elementProps","cn","WithRenderProp","FormLabel","forwardRef"],"mappings":";;;;;;;;AA4CA,MAAMA,IAAgB,CACpB;AAAA,EACE,OAAAC;AAAA,EACA,SAAAC;AAAA,EACA,cAAAC;AAAA,EACA,cAAAC;AAAA,EACA,WAAAC;AAAA,EACA,IAAAC;AAAA,EACA,QAAAC;AAAA,EACA,GAAGC;AACL,GACAC,MACG;AACH,QAAMC,IAAMC,EAAO,GAEbC,IAAe;AAAA,IACnBX;AAAA,IACAC,KACE,gBAAAW;AAAA,MAACC;AAAA,MAAA;AAAA,QAEC,WAAWJ,EAAI,6BAA6B;AAAA,QAC5C,OACE,OAAOR,KAAY,YAAYa,EAAeb,CAAO,IACjDA,IACA;AAAA,QAGN,4BAACc,GAAa,CAAA,CAAA;AAAA,MAAA;AAAA,MARV;AAAA,IASN;AAAA,IAEFb,KACE,gBAAAU,EAAC,QAAoB,EAAA,WAAWH,EAAI,+BAA+B,GAChE,UAAA,OAAOP,KAAiB,YAAY,eAAeA,EAAA,GAD5C,UAEV;AAAA,IAEFC,KACE,gBAAAS;AAAA,MAAC;AAAA,MAAA;AAAA,QAEC,WAAWH;AAAA,UACT;AAAA,UACA,OAAON,KAAiB,YACpB,2CACA;AAAA,QACN;AAAA,QAEC,UAAA,OAAOA,KAAiB,YAAY,MAAMA;AAAA,MAAA;AAAA,MARvC;AAAA,IAAA;AAAA,EAWV,GAEMa,IAAe;AAAA,IACnB,KAAAR;AAAA,IACA,WAAWS;AAAA,MACTR;AAAA,QACE;AAAA,QACAN,KAAgB;AAAA,MAClB;AAAA,MACAC;AAAA,IACF;AAAA,IACA,UAAUO;AAAA,IACV,GAAGJ;AAAA,EACL;AAEA,2BAAQW,GAAe,EAAA,IAAIb,KAAM,QAAQ,QAAAC,GAAiB,GAAGU,GAAc;AAC7E,GAGaG,IAAYC,EAAWrB,CAAa;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer components{.ds-form-item-label-inner{display:inline-flex;align-items:center;gap:.25rem}.ds-form-item-label-optional-mark{color:var(--ds-color-text-tertiary)}
|
|
1
|
+
@layer components{.ds-form-item-label-inner{display:inline-flex;align-items:center;gap:.25rem}.ds-form-item-label-optional-mark{color:var(--ds-color-text-tertiary)}:is(.ds-form-item-label>label.ds-form-item-required):after{display:none}:is(.ds-form-item-label>label.ds-form-item-required):before{display:none}.ds-form-item-label-required-mark{display:inline-block;font-size:var(--ds-font-size);font-family:Inter,sans-serif;line-height:1;content:"*"}.ds-form-item-label-required-mark.ds-form-item-label-required-mark-asterisk{color:var(--ds-form-label-required-mark-color)}.ds-form-item .ds-form-item-label>label:after{display:none}.ds-form-horizontal .ds-form-item .ds-form-item-label .ds-form-item-label-inner:after{content:":";position:relative;margin-block:0;margin-inline-start:var(--ds-form-label-colon-margin-inline-start);margin-inline-end:var(--ds-form-label-colon-margin-inline-end)}.ds-form-item-explain{margin-top:.25rem}.ds-form-item-margin-offset{margin:0!important}.ds-form-item-label{overflow:visible}.ds-form-item-row .ds-form-item-label label{width:100%}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer components{
|
|
1
|
+
@layer components{.ds-spin .ds-spin-icon{animation:var(--ds-animate-spin);color:var(--ds-color-icon)}.ds-spin .ds-spin-text{color:var(--ds-color-icon)}.ds-spin-loader{width:var(--spin-size, 1em);height:var(--spin-size, 1em);border:max(2px,.12em) solid var(--ds-color-border);border-bottom-color:var(--ds-color-icon);border-radius:50%;display:inline-block;box-sizing:border-box;animation:spin 1s linear infinite}}
|
|
@@ -1,41 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import p from "antd/es/splitter/Panel";
|
|
2
|
+
import { MainSplitter as t } from "./splitter.js";
|
|
3
|
+
import { SplitterPanel as i } from "./splitter-panel.js";
|
|
5
4
|
import './style.css';/* empty css */
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
children: t,
|
|
10
|
-
className: r,
|
|
11
|
-
style: e,
|
|
12
|
-
...i
|
|
13
|
-
}) => /* @__PURE__ */ l(p, { className: r, style: e, ...i, children: t }), S = ({
|
|
14
|
-
children: t,
|
|
15
|
-
className: r = "",
|
|
16
|
-
style: e = {},
|
|
17
|
-
showSplitBar: i = !0,
|
|
18
|
-
...o
|
|
19
|
-
}) => {
|
|
20
|
-
const s = m();
|
|
21
|
-
return /* @__PURE__ */ l(
|
|
22
|
-
n,
|
|
23
|
-
{
|
|
24
|
-
className: c(
|
|
25
|
-
s("splitter"),
|
|
26
|
-
!i && s("splitter-hidden-split-bar"),
|
|
27
|
-
r
|
|
28
|
-
),
|
|
29
|
-
style: e,
|
|
30
|
-
...o,
|
|
31
|
-
children: t
|
|
32
|
-
}
|
|
33
|
-
);
|
|
34
|
-
}, f = Object.assign(S, {
|
|
35
|
-
Panel: a
|
|
36
|
-
}), A = f;
|
|
5
|
+
const e = Object.assign(t, {
|
|
6
|
+
Panel: i
|
|
7
|
+
}), l = e;
|
|
37
8
|
export {
|
|
38
|
-
|
|
39
|
-
|
|
9
|
+
l as Split,
|
|
10
|
+
e as Splitter
|
|
40
11
|
};
|
|
41
12
|
//# sourceMappingURL=component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.js","sources":["../../../src/components/splitter/component.tsx"],"sourcesContent":["\"use client\";\nimport
|
|
1
|
+
{"version":3,"file":"component.js","sources":["../../../src/components/splitter/component.tsx"],"sourcesContent":["\"use client\";\nimport { MainSplitter, type SplitterProps } from \"./splitter\";\nimport { SplitterPanel, type SplitterPanelProps } from \"./splitter-panel\";\n\n// Import component-specific styles\nimport \"./style.css\";\n\n// Export types\nexport type { SplitterProps, SplitterPanelProps };\n\n// Create the compound component\nexport const Splitter = Object.assign(MainSplitter, {\n Panel: SplitterPanel,\n});\n\n// For backward compatibility\nexport const Split = Splitter;\n"],"names":["Splitter","MainSplitter","SplitterPanel","Split"],"mappings":";;;;AAWa,MAAAA,IAAW,OAAO,OAAOC,GAAc;AAAA,EAClD,OAAOC;AACT,CAAC,GAGYC,IAAQH;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.js","sources":["../../../src/components/splitter/context.ts"],"sourcesContent":["import React from \"react\";\n\n// Context to provide layout direction to panels\nexport const SplitterContext = React.createContext<{ layout?: 'horizontal' | 'vertical' }>({});"],"names":["SplitterContext","React"],"mappings":";AAGO,MAAMA,IAAkBC,EAAM,cAAsD,CAAE,CAAA;"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as v } from "react/jsx-runtime";
|
|
3
|
+
import u, { useRef as z, useState as E, useContext as R, useEffect as w } from "react";
|
|
4
|
+
import { SplitterContext as I } from "./context.js";
|
|
5
|
+
import { InternalPanel as N } from "antd/es/splitter/Panel";
|
|
6
|
+
import { useCls as M } from "../utils/antdUtils.js";
|
|
7
|
+
import { clsx as O } from "../utils/cn.js";
|
|
8
|
+
const V = ({
|
|
9
|
+
children: o,
|
|
10
|
+
className: p,
|
|
11
|
+
style: f,
|
|
12
|
+
defaultSize: t,
|
|
13
|
+
...h
|
|
14
|
+
}) => {
|
|
15
|
+
const y = M(), s = z(null), [d, C] = E(), { layout: i = "horizontal" } = R(I), n = t === "max-content" || t === "min-content" || t === "fit-content";
|
|
16
|
+
w(() => {
|
|
17
|
+
if (!n || !s.current)
|
|
18
|
+
return;
|
|
19
|
+
const r = s.current, l = () => {
|
|
20
|
+
const e = r.cloneNode(!0);
|
|
21
|
+
e.style.position = "absolute", e.style.visibility = "hidden", e.style.pointerEvents = "none", e.style.zIndex = "-1", e.style.top = "0", e.style.left = "0", i === "horizontal" ? (e.style.width = t, e.style.height = "100%") : (e.style.width = "100%", e.style.height = t), document.body.appendChild(e);
|
|
22
|
+
const m = e.getBoundingClientRect(), a = i === "horizontal" ? m.width : m.height;
|
|
23
|
+
document.body.removeChild(e), a > 0 && C(Math.ceil(a));
|
|
24
|
+
}, g = setTimeout(l, 0), c = new ResizeObserver(() => {
|
|
25
|
+
l();
|
|
26
|
+
});
|
|
27
|
+
return c.observe(r), () => {
|
|
28
|
+
clearTimeout(g), c.disconnect();
|
|
29
|
+
};
|
|
30
|
+
}, [n, i, o, t]);
|
|
31
|
+
const b = n ? d : t, x = O(
|
|
32
|
+
p,
|
|
33
|
+
n && y(`splitter-panel-${t}`)
|
|
34
|
+
);
|
|
35
|
+
return /* @__PURE__ */ v(
|
|
36
|
+
N,
|
|
37
|
+
{
|
|
38
|
+
className: x,
|
|
39
|
+
style: f,
|
|
40
|
+
defaultSize: b,
|
|
41
|
+
...h,
|
|
42
|
+
children: n && u.isValidElement(o) ? u.cloneElement(
|
|
43
|
+
o,
|
|
44
|
+
{ ref: s }
|
|
45
|
+
) : o
|
|
46
|
+
}
|
|
47
|
+
);
|
|
48
|
+
};
|
|
49
|
+
export {
|
|
50
|
+
V as SplitterPanel
|
|
51
|
+
};
|
|
52
|
+
//# sourceMappingURL=splitter-panel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"splitter-panel.js","sources":["../../../src/components/splitter/splitter-panel.tsx"],"sourcesContent":["\"use client\";\nimport React, { useEffect, useRef, useState, useContext } from \"react\";\nimport { useCls, clsx } from \"../utils\";\nimport { SplitterContext } from \"./context\";\nimport { InternalPanel } from \"antd/es/splitter/Panel\";\nimport type { InternalPanelProps } from \"antd/es/splitter/interface\";\n\nexport type SplitterPanelProps = InternalPanelProps & {\n children?: React.ReactNode | undefined;\n} & React.RefAttributes<HTMLDivElement> & {\n /**\n * Default size of the panel. Can be a percentage string, number, or CSS intrinsic sizing values\n */\n defaultSize?: string | number | \"max-content\" | \"min-content\" | \"fit-content\";\n };\n\nexport const SplitterPanel: React.FC<SplitterPanelProps> = ({\n children,\n className,\n style,\n defaultSize,\n ...rest\n}) => {\n const cls = useCls();\n const contentRef = useRef<HTMLDivElement>(null);\n const [measuredSize, setMeasuredSize] = useState<number | undefined>();\n const { layout = \"horizontal\" } = useContext(SplitterContext);\n\n // Handle intrinsic sizing\n const isIntrinsicSizing = defaultSize === \"max-content\" || defaultSize === \"min-content\" || defaultSize === \"fit-content\";\n\n useEffect(() => {\n if (!isIntrinsicSizing) {\n return;\n }\n\n if (!contentRef.current) {\n return;\n }\n\n const element = contentRef.current;\n const measureContent = () => {\n // Clone the entire element to preserve all styles including padding, borders, etc.\n const clonedElement = element.cloneNode(true) as HTMLElement;\n \n // Set up the cloned element for measurement\n clonedElement.style.position = \"absolute\";\n clonedElement.style.visibility = \"hidden\";\n clonedElement.style.pointerEvents = \"none\";\n clonedElement.style.zIndex = \"-1\";\n clonedElement.style.top = \"0\";\n clonedElement.style.left = \"0\";\n\n if (layout === \"horizontal\") {\n clonedElement.style.width = defaultSize as string;\n clonedElement.style.height = \"100%\";\n } else {\n clonedElement.style.width = \"100%\";\n clonedElement.style.height = defaultSize as string;\n }\n\n document.body.appendChild(clonedElement);\n\n const rect = clonedElement.getBoundingClientRect();\n const size = layout === \"horizontal\" ? rect.width : rect.height;\n\n document.body.removeChild(clonedElement);\n\n if (size > 0) {\n setMeasuredSize(Math.ceil(size));\n }\n };\n\n // Small delay to ensure content is rendered\n const timeoutId = setTimeout(measureContent, 0);\n\n // Use ResizeObserver to track content size changes\n const resizeObserver = new ResizeObserver(() => {\n measureContent();\n });\n\n resizeObserver.observe(element);\n\n return () => {\n clearTimeout(timeoutId);\n resizeObserver.disconnect();\n };\n }, [isIntrinsicSizing, layout, children, defaultSize]);\n\n const finalDefaultSize = isIntrinsicSizing ? measuredSize : defaultSize;\n const finalClassName = clsx(\n className,\n isIntrinsicSizing && cls(`splitter-panel-${defaultSize}`)\n );\n\n return (\n <InternalPanel\n className={finalClassName}\n style={style}\n defaultSize={finalDefaultSize}\n {...rest}\n >\n {isIntrinsicSizing && React.isValidElement(children)\n ? React.cloneElement(\n children as React.ReactElement<React.RefAttributes<HTMLElement>>,\n { ref: contentRef }\n )\n : children}\n </InternalPanel>\n );\n};\n"],"names":["SplitterPanel","children","className","style","defaultSize","rest","cls","useCls","contentRef","useRef","measuredSize","setMeasuredSize","useState","layout","useContext","SplitterContext","isIntrinsicSizing","useEffect","element","measureContent","clonedElement","rect","size","timeoutId","resizeObserver","finalDefaultSize","finalClassName","clsx","jsx","InternalPanel","React"],"mappings":";;;;;;;AAgBO,MAAMA,IAA8C,CAAC;AAAA,EAC1D,UAAAC;AAAA,EAC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GACtDsB,IAAiBC;AAAA,IACrBzB;AAAA,IACAc,KAAqBV,EAAI,kBAAkBF,CAAW,EAAE;AAAA,EAC1D;AAGE,SAAA,gBAAAwB;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,WAAWH;AAAA,MACX,OAAAvB;AAAA,MACA,aAAasB;AAAA,MACZ,GAAGpB;AAAA,MAEH,UAAqBW,KAAAc,EAAM,eAAe7B,CAAQ,IAC/C6B,EAAM;AAAA,QACJ7B;AAAA,QACA,EAAE,KAAKO,EAAW;AAAA,MAAA,IAEpBP;AAAA,IAAA;AAAA,EACN;AAEJ;"}
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import { jsx as c, jsxs as I } from "react/jsx-runtime";
|
|
2
|
+
import O, { useState as Se } from "react";
|
|
3
|
+
import ue from "rc-resize-observer";
|
|
4
|
+
import { useEvent as u } from "rc-util";
|
|
5
|
+
import { devUseWarning as ze } from "antd/es/_util/warning";
|
|
6
|
+
import { useComponentConfig as Ce } from "antd/es/config-provider/context";
|
|
7
|
+
import he from "antd/es/config-provider/hooks/useCSSVarCls";
|
|
8
|
+
import de from "antd/es/splitter/hooks/useItems";
|
|
9
|
+
import ge from "antd/es/splitter/hooks/useResizable";
|
|
10
|
+
import ve from "antd/es/splitter/hooks/useResize";
|
|
11
|
+
import Ne from "antd/es/splitter/hooks/useSizes";
|
|
12
|
+
import { SplitterPanel as be } from "./splitter-panel.js";
|
|
13
|
+
import Me from "antd/es/splitter/SplitBar";
|
|
14
|
+
import xe from "antd/es/splitter/style";
|
|
15
|
+
import { SplitterContext as ye } from "./context.js";
|
|
16
|
+
import { clsx as P } from "../utils/cn.js";
|
|
17
|
+
const Ie = ($) => {
|
|
18
|
+
const {
|
|
19
|
+
prefixCls: E,
|
|
20
|
+
className: V,
|
|
21
|
+
style: U,
|
|
22
|
+
layout: f = "horizontal",
|
|
23
|
+
children: k,
|
|
24
|
+
rootClassName: w,
|
|
25
|
+
onResizeStart: z,
|
|
26
|
+
onResize: n,
|
|
27
|
+
onResizeEnd: o,
|
|
28
|
+
lazy: B,
|
|
29
|
+
showSplitBar: W = !0
|
|
30
|
+
} = $, {
|
|
31
|
+
getPrefixCls: j,
|
|
32
|
+
direction: D,
|
|
33
|
+
className: R,
|
|
34
|
+
style: _
|
|
35
|
+
} = Ce("splitter"), i = j("splitter", E), v = he(i), [q, F, H] = xe(i, v), m = f === "vertical", p = D === "rtl", L = !m && p, a = de(k);
|
|
36
|
+
if (process.env.NODE_ENV !== "production") {
|
|
37
|
+
const t = ze("Splitter");
|
|
38
|
+
let e = !1, s = !1;
|
|
39
|
+
a.forEach((r) => {
|
|
40
|
+
r.size !== void 0 ? e = !0 : s = !0;
|
|
41
|
+
}), e && s && !n && t(
|
|
42
|
+
!1,
|
|
43
|
+
"usage",
|
|
44
|
+
"When part of `Splitter.Panel` has `size`, `onResize` is required or change `size` to `defaultSize`."
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
const [C, T] = Se(), A = (t) => {
|
|
48
|
+
const { offsetWidth: e, offsetHeight: s } = t, r = m ? s : e;
|
|
49
|
+
r !== 0 && T(r);
|
|
50
|
+
}, [
|
|
51
|
+
G,
|
|
52
|
+
h,
|
|
53
|
+
d,
|
|
54
|
+
N,
|
|
55
|
+
b,
|
|
56
|
+
J
|
|
57
|
+
] = Ne(a, C), M = ge(a, h, p), [K, Q, X, Y, x] = ve(
|
|
58
|
+
a,
|
|
59
|
+
M,
|
|
60
|
+
d,
|
|
61
|
+
C,
|
|
62
|
+
J,
|
|
63
|
+
p
|
|
64
|
+
), Z = u((t) => {
|
|
65
|
+
K(t), z == null || z(h);
|
|
66
|
+
}), ee = u(
|
|
67
|
+
(t, e, s) => {
|
|
68
|
+
const r = Q(t, e);
|
|
69
|
+
s ? o == null || o(r) : n == null || n(r);
|
|
70
|
+
}
|
|
71
|
+
), te = u((t) => {
|
|
72
|
+
X(), t || o == null || o(h);
|
|
73
|
+
}), se = u(
|
|
74
|
+
(t, e) => {
|
|
75
|
+
const s = Y(t, e);
|
|
76
|
+
n == null || n(s), o == null || o(s);
|
|
77
|
+
}
|
|
78
|
+
), re = P(
|
|
79
|
+
i,
|
|
80
|
+
V,
|
|
81
|
+
`${i}-${f}`,
|
|
82
|
+
{
|
|
83
|
+
[`${i}-rtl`]: p,
|
|
84
|
+
[`${i}-hide-bars`]: !W
|
|
85
|
+
},
|
|
86
|
+
w,
|
|
87
|
+
R,
|
|
88
|
+
H,
|
|
89
|
+
v,
|
|
90
|
+
F
|
|
91
|
+
), y = `${i}-mask`, l = O.useMemo(() => {
|
|
92
|
+
const t = [];
|
|
93
|
+
let e = 0;
|
|
94
|
+
for (let s = 0; s < a.length; s += 1)
|
|
95
|
+
e += d[s], t.push(e);
|
|
96
|
+
return t;
|
|
97
|
+
}, [d]), oe = { ..._, ...U };
|
|
98
|
+
return q(
|
|
99
|
+
/* @__PURE__ */ c(ye.Provider, { value: { layout: f }, children: /* @__PURE__ */ c(ue, { onResize: A, children: /* @__PURE__ */ I("div", { style: oe, className: re, children: [
|
|
100
|
+
a.map((t, e) => {
|
|
101
|
+
const s = /* @__PURE__ */ c(
|
|
102
|
+
be,
|
|
103
|
+
{
|
|
104
|
+
...t,
|
|
105
|
+
prefixCls: i,
|
|
106
|
+
size: G[e]
|
|
107
|
+
}
|
|
108
|
+
);
|
|
109
|
+
let r = null;
|
|
110
|
+
const S = M[e];
|
|
111
|
+
if (S) {
|
|
112
|
+
const ie = (l[e - 1] || 0) + N[e], ne = (l[e + 1] || 100) - b[e + 1], ae = (l[e - 1] || 0) + b[e], le = (l[e + 1] || 100) - N[e + 1];
|
|
113
|
+
r = /* @__PURE__ */ c(
|
|
114
|
+
Me,
|
|
115
|
+
{
|
|
116
|
+
lazy: B,
|
|
117
|
+
index: e,
|
|
118
|
+
active: x === e,
|
|
119
|
+
prefixCls: i,
|
|
120
|
+
vertical: m,
|
|
121
|
+
resizable: S.resizable,
|
|
122
|
+
ariaNow: l[e] * 100,
|
|
123
|
+
ariaMin: Math.max(ie, ne) * 100,
|
|
124
|
+
ariaMax: Math.min(ae, le) * 100,
|
|
125
|
+
startCollapsible: S.startCollapsible,
|
|
126
|
+
endCollapsible: S.endCollapsible,
|
|
127
|
+
onOffsetStart: Z,
|
|
128
|
+
onOffsetUpdate: (ce, fe, me, pe) => {
|
|
129
|
+
let g = m ? me : fe;
|
|
130
|
+
L && (g = -g), ee(ce, g, pe);
|
|
131
|
+
},
|
|
132
|
+
onOffsetEnd: te,
|
|
133
|
+
onCollapse: se,
|
|
134
|
+
containerSize: C || 0
|
|
135
|
+
}
|
|
136
|
+
);
|
|
137
|
+
}
|
|
138
|
+
return /* @__PURE__ */ I(O.Fragment, { children: [
|
|
139
|
+
s,
|
|
140
|
+
r
|
|
141
|
+
] }, `split-panel-${e}`);
|
|
142
|
+
}),
|
|
143
|
+
typeof x == "number" && /* @__PURE__ */ c(
|
|
144
|
+
"div",
|
|
145
|
+
{
|
|
146
|
+
"aria-hidden": !0,
|
|
147
|
+
className: P(y, `${y}-${f}`)
|
|
148
|
+
}
|
|
149
|
+
)
|
|
150
|
+
] }) }) })
|
|
151
|
+
);
|
|
152
|
+
};
|
|
153
|
+
process.env.NODE_ENV !== "production" && (Ie.displayName = "Splitter");
|
|
154
|
+
export {
|
|
155
|
+
Ie as MainSplitter
|
|
156
|
+
};
|
|
157
|
+
//# sourceMappingURL=splitter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"splitter.js","sources":["../../../src/components/splitter/splitter.tsx"],"sourcesContent":["import React, { useState } from \"react\";\nimport { clsx } from \"../utils\";\nimport ResizeObserver from \"rc-resize-observer\";\nimport { useEvent } from \"rc-util\";\n\nimport type { GetProp } from \"antd/es/_util/type\";\nimport { devUseWarning } from \"antd/es/_util/warning\";\nimport { useComponentConfig } from \"antd/es/config-provider/context\";\nimport useCSSVarCls from \"antd/es/config-provider/hooks/useCSSVarCls\";\nimport useItems from \"antd/es/splitter/hooks/useItems\";\nimport useResizable from \"antd/es/splitter/hooks/useResizable\";\nimport useResize from \"antd/es/splitter/hooks/useResize\";\nimport useSizes from \"antd/es/splitter/hooks/useSizes\";\nimport type { SplitterProps as AntdSplitterProps } from \"antd/es/splitter/interface\";\nimport { SplitterPanel } from \"./splitter-panel\";\nimport SplitBar from \"antd/es/splitter/SplitBar\";\nimport useStyle from \"antd/es/splitter/style\";\nimport { SplitterContext } from \"./context\";\n\nexport interface SplitterProps extends AntdSplitterProps {\n /**\n * Whether to show the split bars between panels\n * @default true\n */\n showSplitBar?: boolean;\n}\n\nexport const MainSplitter: React.FC<React.PropsWithChildren<SplitterProps>> = (\n props\n) => {\n const {\n prefixCls: customizePrefixCls,\n className,\n style,\n layout = \"horizontal\",\n children,\n rootClassName,\n onResizeStart,\n onResize,\n onResizeEnd,\n lazy,\n showSplitBar = true,\n } = props;\n\n const {\n getPrefixCls,\n direction,\n className: contextClassName,\n style: contextStyle,\n } = useComponentConfig(\"splitter\");\n const prefixCls = getPrefixCls(\"splitter\", customizePrefixCls);\n const rootCls = useCSSVarCls(prefixCls);\n const [wrapCSSVar, hashId, cssVarCls] = useStyle(prefixCls, rootCls);\n\n // ======================== Direct ========================\n const isVertical = layout === \"vertical\";\n const isRTL = direction === \"rtl\";\n const reverse = !isVertical && isRTL;\n\n // ====================== Items Data ======================\n const items = useItems(children);\n\n // >>> Warning for uncontrolled\n if (process.env.NODE_ENV !== \"production\") {\n const warning = devUseWarning(\"Splitter\");\n\n let existSize = false;\n let existUndefinedSize = false;\n\n items.forEach((item) => {\n if (item.size !== undefined) {\n existSize = true;\n } else {\n existUndefinedSize = true;\n }\n });\n\n if (existSize && existUndefinedSize && !onResize) {\n warning(\n false,\n \"usage\",\n \"When part of `Splitter.Panel` has `size`, `onResize` is required or change `size` to `defaultSize`.\"\n );\n }\n }\n\n // ====================== Container =======================\n const [containerSize, setContainerSize] = useState<number | undefined>();\n\n const onContainerResize: GetProp<typeof ResizeObserver, \"onResize\"> = (\n size\n ) => {\n const { offsetWidth, offsetHeight } = size;\n const containerSize = isVertical ? offsetHeight : offsetWidth;\n // Skip when container has no size, Such as nested in a hidden tab panel\n // to fix: https://github.com/ant-design/ant-design/issues/51106\n if (containerSize === 0) {\n return;\n }\n setContainerSize(containerSize);\n };\n\n // ========================= Size =========================\n const [\n panelSizes,\n itemPxSizes,\n itemPtgSizes,\n itemPtgMinSizes,\n itemPtgMaxSizes,\n updateSizes,\n ] = useSizes(items, containerSize);\n\n // ====================== Resizable =======================\n const resizableInfos = useResizable(items, itemPxSizes, isRTL);\n\n const [onOffsetStart, onOffsetUpdate, onOffsetEnd, onCollapse, movingIndex] =\n useResize(\n items,\n resizableInfos,\n itemPtgSizes,\n containerSize,\n updateSizes,\n isRTL\n );\n\n // ======================== Events ========================\n const onInternalResizeStart = useEvent((index: number) => {\n onOffsetStart(index);\n onResizeStart?.(itemPxSizes);\n });\n\n const onInternalResizeUpdate = useEvent(\n (index: number, offset: number, lazyEnd?: boolean) => {\n const nextSizes = onOffsetUpdate(index, offset);\n\n if (lazyEnd) {\n onResizeEnd?.(nextSizes);\n } else {\n onResize?.(nextSizes);\n }\n }\n );\n\n const onInternalResizeEnd = useEvent((lazyEnd?: boolean) => {\n onOffsetEnd();\n\n if (!lazyEnd) {\n onResizeEnd?.(itemPxSizes);\n }\n });\n\n const onInternalCollapse = useEvent(\n (index: number, type: \"start\" | \"end\") => {\n const nextSizes = onCollapse(index, type);\n onResize?.(nextSizes);\n onResizeEnd?.(nextSizes);\n }\n );\n\n // ======================== Styles ========================\n const containerClassName = clsx(\n prefixCls,\n className,\n `${prefixCls}-${layout}`,\n {\n [`${prefixCls}-rtl`]: isRTL,\n [`${prefixCls}-hide-bars`]: !showSplitBar,\n },\n rootClassName,\n contextClassName,\n cssVarCls,\n rootCls,\n hashId\n );\n\n // ======================== Render ========================\n const maskCls = `${prefixCls}-mask`;\n\n const stackSizes = React.useMemo(() => {\n const mergedSizes: number[] = [];\n\n let stack = 0;\n for (let i = 0; i < items.length; i += 1) {\n stack += itemPtgSizes[i];\n mergedSizes.push(stack);\n }\n\n return mergedSizes;\n }, [itemPtgSizes]);\n\n const mergedStyle: React.CSSProperties = { ...contextStyle, ...style };\n\n return wrapCSSVar(\n <SplitterContext.Provider value={{ layout }}>\n <ResizeObserver onResize={onContainerResize}>\n <div style={mergedStyle} className={containerClassName}>\n {items.map((item, idx) => {\n // Panel\n const panel = (\n <SplitterPanel\n {...item}\n prefixCls={prefixCls}\n size={panelSizes[idx]}\n />\n );\n\n // Split Bar\n let splitBar: React.ReactElement | null = null;\n\n const resizableInfo = resizableInfos[idx];\n if (resizableInfo) {\n const ariaMinStart =\n (stackSizes[idx - 1] || 0) + itemPtgMinSizes[idx];\n const ariaMinEnd =\n (stackSizes[idx + 1] || 100) - itemPtgMaxSizes[idx + 1];\n\n const ariaMaxStart =\n (stackSizes[idx - 1] || 0) + itemPtgMaxSizes[idx];\n const ariaMaxEnd =\n (stackSizes[idx + 1] || 100) - itemPtgMinSizes[idx + 1];\n\n splitBar = (\n <SplitBar\n lazy={lazy}\n index={idx}\n active={movingIndex === idx}\n prefixCls={prefixCls}\n vertical={isVertical}\n resizable={resizableInfo.resizable}\n ariaNow={stackSizes[idx] * 100}\n ariaMin={Math.max(ariaMinStart, ariaMinEnd) * 100}\n ariaMax={Math.min(ariaMaxStart, ariaMaxEnd) * 100}\n startCollapsible={resizableInfo.startCollapsible}\n endCollapsible={resizableInfo.endCollapsible}\n onOffsetStart={onInternalResizeStart}\n onOffsetUpdate={(index, offsetX, offsetY, lazyEnd) => {\n let offset = isVertical ? offsetY : offsetX;\n if (reverse) {\n offset = -offset;\n }\n onInternalResizeUpdate(index, offset, lazyEnd);\n }}\n onOffsetEnd={onInternalResizeEnd}\n onCollapse={onInternalCollapse}\n containerSize={containerSize || 0}\n />\n );\n }\n\n return (\n <React.Fragment key={`split-panel-${idx}`}>\n {panel}\n {splitBar}\n </React.Fragment>\n );\n })}\n\n {/* Fake mask for cursor */}\n {typeof movingIndex === \"number\" && (\n <div\n aria-hidden\n className={clsx(maskCls, `${maskCls}-${layout}`)}\n />\n )}\n </div>\n </ResizeObserver>\n </SplitterContext.Provider>\n );\n};\n\nif (process.env.NODE_ENV !== \"production\") {\n MainSplitter.displayName = \"Splitter\";\n}\n"],"names":["MainSplitter","props","customizePrefixCls","className","style","layout","children","rootClassName","onResizeStart","onResize","onResizeEnd","lazy","showSplitBar","getPrefixCls","direction","contextClassName","contextStyle","useComponentConfig","prefixCls","rootCls","useCSSVarCls","wrapCSSVar","hashId","cssVarCls","useStyle","isVertical","isRTL","reverse","items","useItems","warning","devUseWarning","existSize","existUndefinedSize","item","containerSize","setContainerSize","useState","onContainerResize","size","offsetWidth","offsetHeight","panelSizes","itemPxSizes","itemPtgSizes","itemPtgMinSizes","itemPtgMaxSizes","updateSizes","useSizes","resizableInfos","useResizable","onOffsetStart","onOffsetUpdate","onOffsetEnd","onCollapse","movingIndex","useResize","onInternalResizeStart","useEvent","index","onInternalResizeUpdate","offset","lazyEnd","nextSizes","onInternalResizeEnd","onInternalCollapse","type","containerClassName","clsx","maskCls","stackSizes","React","mergedSizes","stack","i","mergedStyle","SplitterContext","jsx","ResizeObserver","jsxs","idx","panel","SplitterPanel","splitBar","resizableInfo","ariaMinStart","ariaMinEnd","ariaMaxStart","ariaMaxEnd","SplitBar","offsetX","offsetY"],"mappings":";;;;;;;;;;;;;;;;AA2Ba,MAAAA,KAAiE,CAC5EC,MACG;AACG,QAAA;AAAA,IACJ,WAAWC;AAAA,IACX,WAAAC;AAAA,IACA,OAAAC;AAAA,IACA,QAAAC,IAAS;AAAA,IACT,UAAAC;AAAA,IACA,eAAAC;AAAA,IACA,eAAAC;AAAA,IACA,UAAAC;AAAA,IACA,aAAAC;AAAA,IACA,MAAAC;AAAA,IACA,cAAAC,IAAe;AAAA,EAAA,IACbX,GAEE;AAAA,IACJ,cAAAY;AAAA,IACA,WAAAC;AAAA,IACA,WAAWC;AAAA,IACX,OAAOC;AAAA,EAAA,IACLC,GAAmB,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C,EAACR,EAAM,UAAN,EACE,UAAA;AAAA,UAAAU;AAAA,UACAE;AAAA,QAFkB,EAAA,GAAA,eAAeH,CAAG,EAGvC;AAAA,MAAA,CAEH;AAAA,MAGA,OAAOzB,KAAgB,YACtB,gBAAAsB;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,eAAW;AAAA,UACX,WAAWT,EAAKC,GAAS,GAAGA,CAAO,IAAIhE,CAAM,EAAE;AAAA,QAAA;AAAA,MAAA;AAAA,IACjD,EAEJ,CAAA,EACF,CAAA,EACF,CAAA;AAAA,EACF;AACF;AAEI,QAAQ,IAAI,aAAa,iBAC3BL,GAAa,cAAc;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer components{.ds-splitter>.ds-splitter-bar .ds-splitter-bar-collapse-bar.ds-splitter-bar-collapse-bar-start{opacity:1}}
|
|
1
|
+
@layer components{.ds-splitter>.ds-splitter-bar .ds-splitter-bar-collapse-bar.ds-splitter-bar-collapse-bar-start{opacity:1}.ds-splitter-hide-bars .ds-splitter-bar{opacity:0;pointer-events:none;transition:opacity .2s ease}.ds-splitter-hide-bars .ds-splitter-bar:hover{opacity:1;pointer-events:auto}.ds-splitter-panel-max-content,.ds-splitter-panel-min-content,.ds-splitter-panel-fit-content{flex-shrink:0}}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as m } from "react";
|
|
3
|
+
import { CircleNotchIcon as a, InfoIcon as I, WarningIcon as f, XCircleIcon as u, CheckCircleIcon as l } from "@bioturing/assets";
|
|
4
|
+
import './style.css';/* empty css */
|
|
5
|
+
import { useCls as p } from "../utils/antdUtils.js";
|
|
6
|
+
const C = {
|
|
7
|
+
success: l,
|
|
8
|
+
error: u,
|
|
9
|
+
warning: f,
|
|
10
|
+
info: I,
|
|
11
|
+
processing: a
|
|
12
|
+
}, g = m(
|
|
13
|
+
({ status: o = "info", size: c = "medium", weight: r = "regular", ...n }, s) => {
|
|
14
|
+
const t = p(), i = C[o];
|
|
15
|
+
return /* @__PURE__ */ e(
|
|
16
|
+
i,
|
|
17
|
+
{
|
|
18
|
+
ref: s,
|
|
19
|
+
className: t(
|
|
20
|
+
"status-icon",
|
|
21
|
+
`status-icon-${o}`,
|
|
22
|
+
`status-icon-${c}`
|
|
23
|
+
),
|
|
24
|
+
weight: r,
|
|
25
|
+
...n
|
|
26
|
+
}
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
);
|
|
30
|
+
g.displayName = "StatusIcon";
|
|
31
|
+
export {
|
|
32
|
+
g as StatusIcon
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component.js","sources":["../../../src/components/status-icon/component.tsx"],"sourcesContent":["import { forwardRef } from \"react\";\nimport {\n CheckCircleIcon,\n XCircleIcon,\n WarningIcon,\n InfoIcon,\n CircleNotchIcon,\n} from \"@bioturing/assets\";\nimport { useCls } from \"../utils\";\n\nimport \"./style.css\";\n\nexport interface StatusIconProps extends React.ComponentPropsWithoutRef<\"svg\"> {\n /**\n * Status of the icon\n * @default info\n */\n status?: \"success\" | \"error\" | \"warning\" | \"info\" | \"processing\";\n /**\n * Size of the icon\n * - small: 12px\n * - medium: 16px\n * - large: 20px\n * - xlarge: 24px\n * - xxlarge: 28px\n * @default medium\n */\n size?: \"small\" | \"medium\" | \"large\" | \"xlarge\";\n /**\n * Weight of the icon\n */\n weight?: \"regular\" | \"bold\" | \"fill\" | \"duotone\";\n}\n\nconst STATUS_ICON_MAP = {\n success: CheckCircleIcon,\n error: XCircleIcon,\n warning: WarningIcon,\n info: InfoIcon,\n processing: CircleNotchIcon,\n};\n\nexport const StatusIcon = forwardRef<SVGSVGElement, StatusIconProps>(\n ({ status = \"info\", size = \"medium\", weight = \"regular\", ...props }, ref) => {\n const cls = useCls();\n const Icon = STATUS_ICON_MAP[status];\n return (\n <Icon\n ref={ref}\n className={cls(\n \"status-icon\",\n `status-icon-${status}`,\n `status-icon-${size}`\n )}\n weight={weight}\n {...props}\n />\n );\n }\n);\n\nStatusIcon.displayName = \"StatusIcon\";\n"],"names":["STATUS_ICON_MAP","CheckCircleIcon","XCircleIcon","WarningIcon","InfoIcon","CircleNotchIcon","StatusIcon","forwardRef","status","size","weight","props","ref","cls","useCls","Icon","jsx"],"mappings":";;;;;AAkCA,MAAMA,IAAkB;AAAA,EACtB,SAASC;AAAA,EACT,OAAOC;AAAA,EACP,SAASC;AAAA,EACT,MAAMC;AAAA,EACN,YAAYC;AACd,GAEaC,IAAaC;AAAA,EACxB,CAAC,EAAE,QAAAC,IAAS,QAAQ,MAAAC,IAAO,UAAU,QAAAC,IAAS,WAAW,GAAGC,EAAM,GAAGC,MAAQ;AAC3E,UAAMC,IAAMC,EAAO,GACbC,IAAOf,EAAgBQ,CAAM;AAEjC,WAAA,gBAAAQ;AAAA,MAACD;AAAA,MAAA;AAAA,QACC,KAAAH;AAAA,QACA,WAAWC;AAAA,UACT;AAAA,UACA,eAAeL,CAAM;AAAA,UACrB,eAAeC,CAAI;AAAA,QACrB;AAAA,QACA,QAAAC;AAAA,QACC,GAAGC;AAAA,MAAA;AAAA,IACN;AAAA,EAAA;AAGN;AAEAL,EAAW,cAAc;"}
|