@baishuyun/ui-base 6.21.0 → 6.21.1
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/Amap/index.js +1 -1
- package/dist/Calendar/{Calendar-DYI9CWYE.js → Calendar-BaIHL7cB.js} +1 -1
- package/dist/Calendar/index.js +3 -3
- package/dist/Card/index.js +1 -1
- package/dist/CheckBox/CheckBox-BErX3YWP.js +75 -0
- package/dist/CheckBox/CheckBox-Dp7hxT2F.js +37 -0
- package/dist/CheckBox/index.js +3 -3
- package/dist/ColorPicker/index.js +1 -1
- package/dist/ConfigProvider/index.js +1 -1
- package/dist/DatePicker/{DatePicker-CopVj7KA.js → DatePicker-CbfmdBaK.js} +1 -1
- package/dist/DatePicker/{DatePickerPanel-CLCEPUcL.js → DatePickerPanel-BDJYZs1q.js} +1 -1
- package/dist/DatePicker/index.js +2 -2
- package/dist/DropDown/index.js +1 -1
- package/dist/Editor/index.js +15 -12
- package/dist/Gantt/index.js +1 -1
- package/dist/Icon/index.js +1 -1
- package/dist/InputTag/index.js +1 -1
- package/dist/Loading/index.js +1 -1
- package/dist/Modal/index.js +1 -1
- package/dist/NotFoundContent/index.js +1 -1
- package/dist/Overlay/index.js +1 -1
- package/dist/Radio/Radio-C0OAW-K-.js +96 -0
- package/dist/Radio/index.js +2 -2
- package/dist/ScrollBar/index.js +1 -1
- package/dist/Segmented/index.js +1 -1
- package/dist/Select/{Select-VIy6OKEj.js → Select-DryXF1Tp.js} +2 -2
- package/dist/Select/index.js +6 -6
- package/dist/Table/index.js +1 -1
- package/dist/Tabs/index.js +1 -1
- package/dist/Tooltip/index.js +1 -1
- package/dist/Tree/index.js +4 -4
- package/dist/components/CheckBox/CheckBox.d.ts +2 -45
- package/dist/components/CheckBox/Group.d.ts +3 -33
- package/dist/components/CheckBox/index.d.ts +1 -1
- package/dist/components/CheckBox/interface.d.ts +142 -0
- package/dist/components/CheckBox/style/resolveCheckBoxThemeVars.d.ts +2 -0
- package/dist/components/Radio/index.d.ts +1 -0
- package/dist/components/Radio/interface.d.ts +67 -0
- package/dist/components/Radio/style/resolveRadioThemeVars.d.ts +2 -0
- package/dist/components/index.d.ts +2 -0
- package/dist/index.js +8 -8
- package/dist/style.css +1 -1
- package/dist/vendors/{Tree-D0Q1IZ2D.js → Tree-DWK-JPnJ.js} +2 -2
- package/dist/vendors/{version-BVdbN53a.js → version-CyVENVWD.js} +1 -1
- package/package.json +1 -1
- package/dist/CheckBox/CheckBox-CM24-quL.js +0 -33
- package/dist/CheckBox/CheckBox-CcHskTz_.js +0 -67
- package/dist/Radio/Radio-D9jhW7K6.js +0 -85
package/dist/Amap/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import { t } from "../vendors/useLocale-Be4e7Xfn.js";
|
|
|
3
3
|
import { t as n } from "../vendors/cssVars-UpriQzph.js";
|
|
4
4
|
import { t as r } from "../Segmented/Segmented-BkTy5v9V.js";
|
|
5
5
|
import { t as i } from "../Tooltip/Tooltip-DBrt3t2r.js";
|
|
6
|
-
import { t as a } from "../DatePicker/DatePicker-
|
|
6
|
+
import { t as a } from "../DatePicker/DatePicker-CbfmdBaK.js";
|
|
7
7
|
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
8
8
|
import { memo as c, useCallback as l, useEffect as u, useLayoutEffect as d, useMemo as f, useRef as p, useState as m } from "react";
|
|
9
9
|
import h from "clsx";
|
package/dist/Calendar/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../vendors/version-
|
|
1
|
+
import "../vendors/version-CyVENVWD.js";
|
|
2
2
|
import "../Icon/Icon-DrdQOEJE.js";
|
|
3
3
|
import "../vendors/LocaleContext-DXQoOKM2.js";
|
|
4
4
|
import "../Overlay/OverlayContext-CVSFoyqN.js";
|
|
@@ -7,7 +7,7 @@ import "../vendors/useLocale-Be4e7Xfn.js";
|
|
|
7
7
|
import "../vendors/useLatchedPopupPortalRoot-CC6af8t-.js";
|
|
8
8
|
import "../Segmented/Segmented-BkTy5v9V.js";
|
|
9
9
|
import "../Tooltip/Tooltip-DBrt3t2r.js";
|
|
10
|
-
import { n as e, r as t, t as n } from "./Calendar-
|
|
11
|
-
import "../DatePicker/DatePicker-
|
|
10
|
+
import { n as e, r as t, t as n } from "./Calendar-BaIHL7cB.js";
|
|
11
|
+
import "../DatePicker/DatePicker-CbfmdBaK.js";
|
|
12
12
|
import "../DatePicker/pickerLocale-Brf7_Tnd.js";
|
|
13
13
|
export { n as Calendar, n as default, t as resolveCalendarThemeVars, e as resolvePlatformCalendarTheme };
|
package/dist/Card/index.js
CHANGED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { t as e } from "../Icon/Icon-DrdQOEJE.js";
|
|
2
|
+
import { t } from "../vendors/cssVars-UpriQzph.js";
|
|
3
|
+
import { uniqueId as n } from "lodash-es";
|
|
4
|
+
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
5
|
+
import { createContext as a, forwardRef as o, useContext as s } from "react";
|
|
6
|
+
import c from "clsx";
|
|
7
|
+
//#region src/components/CheckBox/context/context.ts
|
|
8
|
+
var l = a(null), u = "_checkbox_1dlm8_1", d = "_checkbox__inner_1dlm8_34", f = {
|
|
9
|
+
checkbox: u,
|
|
10
|
+
"checkbox--checked": "_checkbox--checked_1dlm8_12",
|
|
11
|
+
"checkbox--unchecked": "_checkbox--unchecked_1dlm8_17",
|
|
12
|
+
"checkbox--indeterminate": "_checkbox--indeterminate_1dlm8_24",
|
|
13
|
+
"checkbox--disabled": "_checkbox--disabled_1dlm8_28",
|
|
14
|
+
checkbox__inner: d,
|
|
15
|
+
"checkbox__inner--disabled": "_checkbox__inner--disabled_1dlm8_40"
|
|
16
|
+
}, p = ({ isChecked: t = !1, indeterminate: n = !1, disabled: a = !1 }) => {
|
|
17
|
+
let o = n ? "indeterminate" : t ? "checked" : "unchecked", s = c(f.checkbox, {
|
|
18
|
+
[f["checkbox--checked"]]: !a && o === "checked",
|
|
19
|
+
[f["checkbox--unchecked"]]: !a && o === "unchecked",
|
|
20
|
+
[f["checkbox--indeterminate"]]: !a && o === "indeterminate",
|
|
21
|
+
[f["checkbox--disabled"]]: a
|
|
22
|
+
}), l = c(f.checkbox__inner, { [f["checkbox__inner--disabled"]]: a });
|
|
23
|
+
return /* @__PURE__ */ i("div", {
|
|
24
|
+
className: s,
|
|
25
|
+
children: [o === "checked" && /* @__PURE__ */ r(e, {
|
|
26
|
+
name: "checkthebox",
|
|
27
|
+
color: "currentColor"
|
|
28
|
+
}), o === "indeterminate" && /* @__PURE__ */ r("div", { className: l })]
|
|
29
|
+
});
|
|
30
|
+
}, m = /* @__PURE__ */ function(e) {
|
|
31
|
+
return e.NONE = "none", e.HORIZONTAL = "horizontal", e.VERTICAL = "vertical", e;
|
|
32
|
+
}({}), h = {
|
|
33
|
+
"bsy-checkbox": "_bsy-checkbox_5uw5b_1",
|
|
34
|
+
"bsy-checkbox--full-width": "_bsy-checkbox--full-width_5uw5b_8",
|
|
35
|
+
"bsy-checkbox__button": "_bsy-checkbox__button_5uw5b_11",
|
|
36
|
+
"bsy-checkbox__button--disabled": "_bsy-checkbox__button--disabled_5uw5b_22",
|
|
37
|
+
"bsy-checkbox__button--enabled": "_bsy-checkbox__button--enabled_5uw5b_27",
|
|
38
|
+
"bsy-checkbox__button--indeterminate": "_bsy-checkbox__button--indeterminate_5uw5b_30",
|
|
39
|
+
"bsy-checkbox__button--checked": "_bsy-checkbox__button--checked_5uw5b_34",
|
|
40
|
+
"bsy-checkbox__button--unchecked": "_bsy-checkbox__button--unchecked_5uw5b_38",
|
|
41
|
+
"bsy-checkbox__button--left-label": "_bsy-checkbox__button--left-label_5uw5b_45"
|
|
42
|
+
}, g = (e) => {
|
|
43
|
+
if (!e) return {};
|
|
44
|
+
let n = {};
|
|
45
|
+
return t(n, "--bsy-checkbox-checked-bg", e.checkedBg), t(n, "--bsy-checkbox-checked-border", e.checkedBorder), t(n, "--bsy-checkbox-check-icon-color", e.checkIconColor), t(n, "--bsy-checkbox-unchecked-bg", e.uncheckedBg), t(n, "--bsy-checkbox-color-border", e.colorBorder), t(n, "--bsy-checkbox-color-border-hover", e.colorBorderHover), t(n, "--bsy-checkbox-indeterminate-bg", e.indeterminateBg), t(n, "--bsy-checkbox-indeterminate-border", e.indeterminateBorder), t(n, "--bsy-checkbox-indeterminate-indicator", e.indeterminateIndicator), t(n, "--bsy-checkbox-color-bg-disabled", e.colorBgDisabled), t(n, "--bsy-checkbox-color-border-disabled", e.colorBorderDisabled), t(n, "--bsy-checkbox-check-icon-color-disabled", e.checkIconColorDisabled), t(n, "--bsy-checkbox-indeterminate-indicator-disabled", e.indeterminateIndicatorDisabled), n;
|
|
46
|
+
}, _ = o((e, t) => {
|
|
47
|
+
let { checked: a, indeterminate: o = !1, onChange: u, value: d = n("checkbox"), disabled: f = !1, children: _, style: v, labelPosition: y = "right", theme: b } = e, x = s(l), S = x ? x.value?.includes(d) : a, C = (e) => {
|
|
48
|
+
if (!(f || x?.disabled)) if (x) {
|
|
49
|
+
let t = e ? [...x.value || [], d] : (x.value || []).filter((e) => e !== d);
|
|
50
|
+
t && x.onChange?.(t);
|
|
51
|
+
} else u?.(e);
|
|
52
|
+
}, w = f || x?.disabled, T = g(b);
|
|
53
|
+
return /* @__PURE__ */ i("div", {
|
|
54
|
+
className: c(h["bsy-checkbox"], { [h["bsy-checkbox--full-width"]]: x?.layout === m.NONE || !x?.layout }),
|
|
55
|
+
onClick: () => C(!S),
|
|
56
|
+
style: {
|
|
57
|
+
...T,
|
|
58
|
+
...v
|
|
59
|
+
},
|
|
60
|
+
children: [/* @__PURE__ */ r("div", {
|
|
61
|
+
ref: t,
|
|
62
|
+
role: "checkbox",
|
|
63
|
+
"aria-checked": o ? "mixed" : S,
|
|
64
|
+
tabIndex: w ? -1 : 0,
|
|
65
|
+
className: c({ [h["bsy-checkbox__button--left-label"]]: y === "left" }),
|
|
66
|
+
children: /* @__PURE__ */ r(p, {
|
|
67
|
+
indeterminate: o,
|
|
68
|
+
isChecked: S,
|
|
69
|
+
disabled: w
|
|
70
|
+
})
|
|
71
|
+
}), _]
|
|
72
|
+
});
|
|
73
|
+
});
|
|
74
|
+
//#endregion
|
|
75
|
+
export { l as i, g as n, m as r, _ as t };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { i as e, n as t, r as n, t as r } from "./CheckBox-BErX3YWP.js";
|
|
2
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
3
|
+
import a from "clsx";
|
|
4
|
+
import { useControllableValue as o } from "ahooks";
|
|
5
|
+
//#region src/components/CheckBox/Group.tsx
|
|
6
|
+
var s = ({ disabled: r, layout: s = n.NONE, children: c, className: l, style: u, theme: d, ...f }) => {
|
|
7
|
+
let [p, m] = o(f, {
|
|
8
|
+
defaultValue: [],
|
|
9
|
+
valuePropName: "value",
|
|
10
|
+
defaultValuePropName: "defaultValue",
|
|
11
|
+
trigger: "onChange"
|
|
12
|
+
}), h = a("flex", {
|
|
13
|
+
"flex-col": s === n.NONE,
|
|
14
|
+
"flex-col gap-[10px]": s === n.VERTICAL,
|
|
15
|
+
"flex-row gap-y-[10px] gap-x-[20px] flex-wrap": s === n.HORIZONTAL,
|
|
16
|
+
[l || ""]: !!l
|
|
17
|
+
});
|
|
18
|
+
return /* @__PURE__ */ i(e.Provider, {
|
|
19
|
+
value: {
|
|
20
|
+
value: p,
|
|
21
|
+
onChange: m,
|
|
22
|
+
disabled: r,
|
|
23
|
+
layout: s
|
|
24
|
+
},
|
|
25
|
+
children: /* @__PURE__ */ i("div", {
|
|
26
|
+
className: h,
|
|
27
|
+
style: {
|
|
28
|
+
...t(d),
|
|
29
|
+
...u
|
|
30
|
+
},
|
|
31
|
+
children: c
|
|
32
|
+
})
|
|
33
|
+
});
|
|
34
|
+
}, c = r;
|
|
35
|
+
c.Group = s;
|
|
36
|
+
//#endregion
|
|
37
|
+
export { c as t };
|
package/dist/CheckBox/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "../vendors/version-
|
|
1
|
+
import "../vendors/version-CyVENVWD.js";
|
|
2
2
|
import "../Icon/Icon-DrdQOEJE.js";
|
|
3
|
-
import "./CheckBox-
|
|
4
|
-
import { t as e } from "./CheckBox-
|
|
3
|
+
import "./CheckBox-BErX3YWP.js";
|
|
4
|
+
import { t as e } from "./CheckBox-Dp7hxT2F.js";
|
|
5
5
|
export { e as default };
|
|
@@ -48,7 +48,7 @@ var w = {
|
|
|
48
48
|
"bsy-date-picker__content": "_bsy-date-picker__content_1i2le_33",
|
|
49
49
|
"bsy-date-picker__divider": "_bsy-date-picker__divider_1i2le_43",
|
|
50
50
|
"bsy-date-picker__panel-loading": "_bsy-date-picker__panel-loading_1i2le_49"
|
|
51
|
-
}, j = m(() => import("./DatePickerPanel-
|
|
51
|
+
}, j = m(() => import("./DatePickerPanel-BDJYZs1q.js")), M = (o) => {
|
|
52
52
|
let { children: m, picker: S = "date", theme: w, getPopupContainer: D, triggerActiveClassName: O, zIndex: M } = o, { locale: N } = r(), P = e(M), [F, I] = v(o, {
|
|
53
53
|
defaultValuePropName: "defaultValue",
|
|
54
54
|
valuePropName: "value",
|
package/dist/DatePicker/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import "../vendors/version-
|
|
1
|
+
import "../vendors/version-CyVENVWD.js";
|
|
2
2
|
import "../vendors/LocaleContext-DXQoOKM2.js";
|
|
3
3
|
import "../Overlay/OverlayContext-CVSFoyqN.js";
|
|
4
4
|
import "../vendors/useFloatingOverlay-B66lOL8v.js";
|
|
5
5
|
import "../vendors/useLocale-Be4e7Xfn.js";
|
|
6
6
|
import "../vendors/useLatchedPopupPortalRoot-CC6af8t-.js";
|
|
7
|
-
import { t as e } from "./DatePicker-
|
|
7
|
+
import { t as e } from "./DatePicker-CbfmdBaK.js";
|
|
8
8
|
import "./pickerLocale-Brf7_Tnd.js";
|
|
9
9
|
export { e as default };
|
package/dist/DropDown/index.js
CHANGED
package/dist/Editor/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../vendors/version-
|
|
1
|
+
import "../vendors/version-CyVENVWD.js";
|
|
2
2
|
import "../ScrollBar/style-D26azwz6.js";
|
|
3
3
|
import { t as e } from "../Icon/Icon-DrdQOEJE.js";
|
|
4
4
|
import "../vendors/LocaleContext-DXQoOKM2.js";
|
|
@@ -13,8 +13,8 @@ import "../vendors/useLatchedPopupPortalRoot-CC6af8t-.js";
|
|
|
13
13
|
import { t as s } from "../vendors/cssVars-UpriQzph.js";
|
|
14
14
|
import { t as c } from "../Tooltip/Tooltip-DBrt3t2r.js";
|
|
15
15
|
import "../Select/SelectInputSearch-MApQHnU9.js";
|
|
16
|
-
import "../CheckBox/CheckBox-
|
|
17
|
-
import { t as l } from "../CheckBox/CheckBox-
|
|
16
|
+
import "../CheckBox/CheckBox-BErX3YWP.js";
|
|
17
|
+
import { t as l } from "../CheckBox/CheckBox-Dp7hxT2F.js";
|
|
18
18
|
import "../NotFoundContent/NotFoundContent-DJUQ0_2D.js";
|
|
19
19
|
import { t as u } from "../ScrollBar/ScrollBar-IMTuAOF5.js";
|
|
20
20
|
import { t as d } from "../vendors/useFloatingPortal-DJ1iKmW-.js";
|
|
@@ -2709,15 +2709,15 @@ var wa = (e, t, n) => {
|
|
|
2709
2709
|
}) }) })
|
|
2710
2710
|
});
|
|
2711
2711
|
}, $ = {
|
|
2712
|
-
"bsy-lexical-editor": "_bsy-lexical-
|
|
2713
|
-
"bsy-lexical-editor--floating": "_bsy-lexical-editor--
|
|
2714
|
-
"bsy-lexical-editor--sticky-toolbar": "_bsy-lexical-editor--sticky-
|
|
2715
|
-
"bsy-lexical-editor__body": "_bsy-lexical-
|
|
2716
|
-
"bsy-lexical-editor__body--fixed": "_bsy-lexical-editor__body--
|
|
2717
|
-
"bsy-lexical-editor__editable-wrap": "_bsy-lexical-editor__editable-
|
|
2718
|
-
"bsy-lexical-editor__content-editable": "_bsy-lexical-editor__content-
|
|
2719
|
-
"bsy-lexical-editor__length-badge": "_bsy-lexical-editor__length-
|
|
2720
|
-
"bsy-lexical-editor__length-badge--exceeded": "_bsy-lexical-editor__length-badge--
|
|
2712
|
+
"bsy-lexical-editor": "_bsy-lexical-editor_ektd1_2",
|
|
2713
|
+
"bsy-lexical-editor--floating": "_bsy-lexical-editor--floating_ektd1_9",
|
|
2714
|
+
"bsy-lexical-editor--sticky-toolbar": "_bsy-lexical-editor--sticky-toolbar_ektd1_9",
|
|
2715
|
+
"bsy-lexical-editor__body": "_bsy-lexical-editor__body_ektd1_12",
|
|
2716
|
+
"bsy-lexical-editor__body--fixed": "_bsy-lexical-editor__body--fixed_ektd1_17",
|
|
2717
|
+
"bsy-lexical-editor__editable-wrap": "_bsy-lexical-editor__editable-wrap_ektd1_20",
|
|
2718
|
+
"bsy-lexical-editor__content-editable": "_bsy-lexical-editor__content-editable_ektd1_30",
|
|
2719
|
+
"bsy-lexical-editor__length-badge": "_bsy-lexical-editor__length-badge_ektd1_50",
|
|
2720
|
+
"bsy-lexical-editor__length-badge--exceeded": "_bsy-lexical-editor__length-badge--exceeded_ektd1_62"
|
|
2721
2721
|
}, Ma = (e) => {
|
|
2722
2722
|
if (!(e === void 0 || e === "")) return typeof e == "number" ? `${e}px` : e;
|
|
2723
2723
|
}, Na = (e) => {
|
|
@@ -3695,9 +3695,12 @@ var $o = (e, t) => {
|
|
|
3695
3695
|
:host {
|
|
3696
3696
|
all: initial;
|
|
3697
3697
|
display: block;
|
|
3698
|
+
box-sizing: border-box;
|
|
3698
3699
|
width: 100%;
|
|
3699
3700
|
max-width: 100%;
|
|
3700
3701
|
min-width: 0;
|
|
3702
|
+
overflow-x: auto;
|
|
3703
|
+
-webkit-overflow-scrolling: touch;
|
|
3701
3704
|
}
|
|
3702
3705
|
.bsy-editor-html-preview__body {
|
|
3703
3706
|
color: #030303;
|
package/dist/Gantt/index.js
CHANGED
package/dist/Icon/index.js
CHANGED
package/dist/InputTag/index.js
CHANGED
package/dist/Loading/index.js
CHANGED
package/dist/Modal/index.js
CHANGED
package/dist/Overlay/index.js
CHANGED
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { t as e } from "../vendors/cssVars-UpriQzph.js";
|
|
2
|
+
import { uniqueId as t } from "lodash-es";
|
|
3
|
+
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
4
|
+
import { createContext as i, forwardRef as a, useContext as o } from "react";
|
|
5
|
+
import s from "clsx";
|
|
6
|
+
import { useControllableValue as c } from "ahooks";
|
|
7
|
+
//#region src/components/Radio/context/context.ts
|
|
8
|
+
var l = i(null), u = /* @__PURE__ */ function(e) {
|
|
9
|
+
return e.NONE = "none", e.HORIZONTAL = "horizontal", e.VERTICAL = "vertical", e;
|
|
10
|
+
}({}), d = {
|
|
11
|
+
"bsy-radio": "_bsy-radio_mkmuc_1",
|
|
12
|
+
"bsy-radio--disabled": "_bsy-radio--disabled_mkmuc_8",
|
|
13
|
+
"bsy-radio--full-width": "_bsy-radio--full-width_mkmuc_11",
|
|
14
|
+
"bsy-radio__input": "_bsy-radio__input_mkmuc_15",
|
|
15
|
+
"bsy-radio__input--checked": "_bsy-radio__input--checked_mkmuc_39",
|
|
16
|
+
"bsy-radio__input--disabled": "_bsy-radio__input--disabled_mkmuc_46",
|
|
17
|
+
"bsy-radio__label": "_bsy-radio__label_mkmuc_61",
|
|
18
|
+
"bsy-radio__label--left": "_bsy-radio__label--left_mkmuc_68",
|
|
19
|
+
"bsy-radio-group": "_bsy-radio-group_mkmuc_78",
|
|
20
|
+
"bsy-radio-group--none": "_bsy-radio-group--none_mkmuc_82",
|
|
21
|
+
"bsy-radio-group--vertical": "_bsy-radio-group--vertical_mkmuc_86",
|
|
22
|
+
"bsy-radio-group--horizontal": "_bsy-radio-group--horizontal_mkmuc_91"
|
|
23
|
+
}, f = (t) => {
|
|
24
|
+
if (!t) return {};
|
|
25
|
+
let n = {};
|
|
26
|
+
return e(n, "--bsy-radio-checked-bg", t.checkedBg), e(n, "--bsy-radio-checked-border", t.checkedBorder), e(n, "--bsy-radio-dot-color", t.dotColor), e(n, "--bsy-radio-unchecked-bg", t.uncheckedBg), e(n, "--bsy-radio-color-border", t.colorBorder), e(n, "--bsy-radio-color-border-hover", t.colorBorderHover), e(n, "--bsy-radio-color-bg-disabled", t.colorBgDisabled), e(n, "--bsy-radio-color-border-disabled", t.colorBorderDisabled), e(n, "--bsy-radio-checked-disabled-bg", t.checkedDisabledBg), e(n, "--bsy-radio-checked-disabled-border", t.checkedDisabledBorder), e(n, "--bsy-radio-checked-disabled-dot", t.checkedDisabledDot), n;
|
|
27
|
+
}, p = a((e, i) => {
|
|
28
|
+
let { checked: a, onChange: c, value: p = t("radio"), disabled: m = !1, children: h, style: g, labelPosition: _ = "right", className: v, theme: y } = e, b = o(l), x = b ? b.value === p : a, S = () => {
|
|
29
|
+
m || b?.disabled || (b ? x ? b.onDeselect?.(p) : b.onChange?.(p) : c?.(!x));
|
|
30
|
+
}, C = m || b?.disabled, w = b?.layout === u.NONE || !b?.layout, T = s(d["bsy-radio"], {
|
|
31
|
+
[d["bsy-radio--disabled"]]: C,
|
|
32
|
+
[d["bsy-radio--full-width"]]: w
|
|
33
|
+
}, v), E = s(d["bsy-radio__input"], {
|
|
34
|
+
[d["bsy-radio__input--checked"]]: x,
|
|
35
|
+
[d["bsy-radio__input--disabled"]]: C
|
|
36
|
+
}), D = s(d["bsy-radio__label"], { [d["bsy-radio__label--left"]]: _ === "left" });
|
|
37
|
+
return /* @__PURE__ */ r("div", {
|
|
38
|
+
role: "radio",
|
|
39
|
+
className: T,
|
|
40
|
+
onClick: S,
|
|
41
|
+
style: {
|
|
42
|
+
...f(y),
|
|
43
|
+
...g
|
|
44
|
+
},
|
|
45
|
+
children: [/* @__PURE__ */ n("div", {
|
|
46
|
+
ref: i,
|
|
47
|
+
role: "radio",
|
|
48
|
+
"aria-checked": x,
|
|
49
|
+
tabIndex: C ? -1 : 0,
|
|
50
|
+
className: E,
|
|
51
|
+
"data-layout": b?.layout
|
|
52
|
+
}), h && /* @__PURE__ */ n("span", {
|
|
53
|
+
className: D,
|
|
54
|
+
children: h
|
|
55
|
+
})]
|
|
56
|
+
});
|
|
57
|
+
});
|
|
58
|
+
p.displayName = "BsyRadio";
|
|
59
|
+
//#endregion
|
|
60
|
+
//#region src/components/Radio/Group.tsx
|
|
61
|
+
var m = ({ disabled: e, layout: t = u.NONE, children: r, className: i, style: a, theme: o, onDeselect: p, ...m }) => {
|
|
62
|
+
let [h, g] = c(m, {
|
|
63
|
+
defaultValue: "",
|
|
64
|
+
valuePropName: "value",
|
|
65
|
+
defaultValuePropName: "defaultValue",
|
|
66
|
+
trigger: "onChange"
|
|
67
|
+
}), _ = s(d["bsy-radio-group"], {
|
|
68
|
+
[d["bsy-radio-group--none"]]: t === u.NONE,
|
|
69
|
+
[d["bsy-radio-group--vertical"]]: t === u.VERTICAL,
|
|
70
|
+
[d["bsy-radio-group--horizontal"]]: t === u.HORIZONTAL
|
|
71
|
+
}, i);
|
|
72
|
+
return /* @__PURE__ */ n(l.Provider, {
|
|
73
|
+
value: {
|
|
74
|
+
value: h,
|
|
75
|
+
onChange: g,
|
|
76
|
+
disabled: e,
|
|
77
|
+
layout: t,
|
|
78
|
+
onDeselect: p
|
|
79
|
+
},
|
|
80
|
+
children: /* @__PURE__ */ n("div", {
|
|
81
|
+
className: _,
|
|
82
|
+
style: {
|
|
83
|
+
...f(o),
|
|
84
|
+
...a
|
|
85
|
+
},
|
|
86
|
+
children: r
|
|
87
|
+
})
|
|
88
|
+
});
|
|
89
|
+
};
|
|
90
|
+
m.displayName = "BsyRadioGroup";
|
|
91
|
+
//#endregion
|
|
92
|
+
//#region src/components/Radio/index.ts
|
|
93
|
+
var h = p;
|
|
94
|
+
h.Group = m;
|
|
95
|
+
//#endregion
|
|
96
|
+
export { h as t };
|
package/dist/Radio/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import "../vendors/version-
|
|
2
|
-
import { t as e } from "./Radio-
|
|
1
|
+
import "../vendors/version-CyVENVWD.js";
|
|
2
|
+
import { t as e } from "./Radio-C0OAW-K-.js";
|
|
3
3
|
export { e as default };
|
package/dist/ScrollBar/index.js
CHANGED
package/dist/Segmented/index.js
CHANGED
|
@@ -5,8 +5,8 @@ import { n as i, r as a } from "../vendors/animations-ISccYUE3.js";
|
|
|
5
5
|
import { t as o } from "../vendors/useLatchedPopupPortalRoot-CC6af8t-.js";
|
|
6
6
|
import { t as s } from "../vendors/cssVars-UpriQzph.js";
|
|
7
7
|
import { t as c } from "./SelectInputSearch-MApQHnU9.js";
|
|
8
|
-
import { n as l, t as u } from "../vendors/Tree-
|
|
9
|
-
import { t as d } from "../CheckBox/CheckBox-
|
|
8
|
+
import { n as l, t as u } from "../vendors/Tree-DWK-JPnJ.js";
|
|
9
|
+
import { t as d } from "../CheckBox/CheckBox-Dp7hxT2F.js";
|
|
10
10
|
import { t as f } from "../NotFoundContent/NotFoundContent-DJUQ0_2D.js";
|
|
11
11
|
import { t as p } from "../ScrollBar/ScrollBar-IMTuAOF5.js";
|
|
12
12
|
import { t as m } from "../vendors/useFloatingPortal-DJ1iKmW-.js";
|
package/dist/Select/index.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import "../vendors/version-
|
|
1
|
+
import "../vendors/version-CyVENVWD.js";
|
|
2
2
|
import "../ScrollBar/style-D26azwz6.js";
|
|
3
3
|
import "../Icon/Icon-DrdQOEJE.js";
|
|
4
4
|
import "../vendors/LocaleContext-DXQoOKM2.js";
|
|
5
5
|
import "../Overlay/OverlayContext-CVSFoyqN.js";
|
|
6
6
|
import "../vendors/useLocale-Be4e7Xfn.js";
|
|
7
7
|
import "../vendors/useLatchedPopupPortalRoot-CC6af8t-.js";
|
|
8
|
-
import { n as e, r as t, t as n } from "./Select-
|
|
8
|
+
import { n as e, r as t, t as n } from "./Select-DryXF1Tp.js";
|
|
9
9
|
import "./SelectInputSearch-MApQHnU9.js";
|
|
10
|
-
import "../vendors/Tree-
|
|
11
|
-
import "../CheckBox/CheckBox-
|
|
12
|
-
import "../CheckBox/CheckBox-
|
|
13
|
-
import "../Radio/Radio-
|
|
10
|
+
import "../vendors/Tree-DWK-JPnJ.js";
|
|
11
|
+
import "../CheckBox/CheckBox-BErX3YWP.js";
|
|
12
|
+
import "../CheckBox/CheckBox-Dp7hxT2F.js";
|
|
13
|
+
import "../Radio/Radio-C0OAW-K-.js";
|
|
14
14
|
import "../NotFoundContent/NotFoundContent-DJUQ0_2D.js";
|
|
15
15
|
import "../ScrollBar/ScrollBar-IMTuAOF5.js";
|
|
16
16
|
import "../vendors/useFloatingPortal-DJ1iKmW-.js";
|
package/dist/Table/index.js
CHANGED
package/dist/Tabs/index.js
CHANGED
package/dist/Tooltip/index.js
CHANGED
package/dist/Tree/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "../vendors/version-
|
|
1
|
+
import "../vendors/version-CyVENVWD.js";
|
|
2
2
|
import "../Icon/Icon-DrdQOEJE.js";
|
|
3
|
-
import { t as e } from "../vendors/Tree-
|
|
4
|
-
import "../CheckBox/CheckBox-
|
|
5
|
-
import "../Radio/Radio-
|
|
3
|
+
import { t as e } from "../vendors/Tree-DWK-JPnJ.js";
|
|
4
|
+
import "../CheckBox/CheckBox-BErX3YWP.js";
|
|
5
|
+
import "../Radio/Radio-C0OAW-K-.js";
|
|
6
6
|
export { e as Tree };
|
|
@@ -1,46 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @description 是否选中
|
|
5
|
-
*/
|
|
6
|
-
checked?: boolean;
|
|
7
|
-
/**
|
|
8
|
-
* @description 默认是否选中
|
|
9
|
-
*/
|
|
10
|
-
defaultChecked?: boolean;
|
|
11
|
-
/**
|
|
12
|
-
* @description 是否禁用
|
|
13
|
-
*/
|
|
14
|
-
disabled?: boolean;
|
|
15
|
-
/**
|
|
16
|
-
* @description 半选状态
|
|
17
|
-
*/
|
|
18
|
-
indeterminate?: boolean;
|
|
19
|
-
/**
|
|
20
|
-
* @description 值改变时的回调
|
|
21
|
-
*/
|
|
22
|
-
onChange?: (checked: boolean) => void;
|
|
23
|
-
/**
|
|
24
|
-
* @description 自定义类名
|
|
25
|
-
*/
|
|
26
|
-
className?: string;
|
|
27
|
-
/**
|
|
28
|
-
* @description 自定义样式
|
|
29
|
-
*/
|
|
30
|
-
style?: React.CSSProperties;
|
|
31
|
-
/**
|
|
32
|
-
* @description 子元素
|
|
33
|
-
*/
|
|
34
|
-
children?: React.ReactNode;
|
|
35
|
-
/**
|
|
36
|
-
* @description label 的位置,默认在右侧
|
|
37
|
-
* @default 'right'
|
|
38
|
-
*/
|
|
39
|
-
labelPosition?: 'left' | 'right';
|
|
40
|
-
/**
|
|
41
|
-
* @description checkbox 的值,用于 checkbox group
|
|
42
|
-
*/
|
|
43
|
-
value?: string | number;
|
|
44
|
-
}
|
|
45
|
-
declare const BsyCheckbox: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<HTMLDivElement>>;
|
|
1
|
+
import { CheckboxProps } from './interface';
|
|
2
|
+
declare const BsyCheckbox: import('react').ForwardRefExoticComponent<CheckboxProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
46
3
|
export default BsyCheckbox;
|
|
@@ -1,34 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
* @description 选中的值
|
|
5
|
-
*/
|
|
6
|
-
value?: Array<string | number>;
|
|
7
|
-
/**
|
|
8
|
-
* @description 默认选中的值
|
|
9
|
-
*/
|
|
10
|
-
defaultValue?: Array<string | number>;
|
|
11
|
-
/**
|
|
12
|
-
* @description 值改变时的回调
|
|
13
|
-
*/
|
|
14
|
-
onChange?: (checkedValues: Array<string | number>) => void;
|
|
15
|
-
/**
|
|
16
|
-
* @description 是否禁用
|
|
17
|
-
*/
|
|
18
|
-
disabled?: boolean;
|
|
19
|
-
/**
|
|
20
|
-
* @description 布局方式
|
|
21
|
-
* @default 'none'
|
|
22
|
-
*/
|
|
23
|
-
layout?: Layout;
|
|
24
|
-
/**
|
|
25
|
-
* @description Checkbox 子元素
|
|
26
|
-
*/
|
|
27
|
-
children?: React.ReactNode;
|
|
28
|
-
/**
|
|
29
|
-
* @description 自定义类名
|
|
30
|
-
*/
|
|
31
|
-
className?: string;
|
|
32
|
-
}
|
|
33
|
-
declare const CheckboxGroup: React.FC<CheckboxGroupProps>;
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { CheckboxGroupProps } from './interface';
|
|
3
|
+
declare const CheckboxGroup: FC<CheckboxGroupProps>;
|
|
34
4
|
export default CheckboxGroup;
|
|
@@ -5,5 +5,5 @@ type CompoundedComponent = typeof InternalCheckbox & {
|
|
|
5
5
|
};
|
|
6
6
|
declare const Checkbox: CompoundedComponent;
|
|
7
7
|
export default Checkbox;
|
|
8
|
-
export type { CheckboxProps } from './
|
|
8
|
+
export type { CheckboxProps, CheckboxGroupProps, CheckBoxTheme } from './interface';
|
|
9
9
|
export type { Layout } from './constants';
|