@baishuyun/ui-base 6.21.0 → 6.22.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.
Files changed (57) hide show
  1. package/dist/Amap/index.js +1 -1
  2. package/dist/Calendar/{Calendar-DYI9CWYE.js → Calendar-C9LHoXQc.js} +1 -1
  3. package/dist/Calendar/index.js +3 -3
  4. package/dist/Card/index.js +1 -1
  5. package/dist/CheckBox/CheckBox-BErX3YWP.js +75 -0
  6. package/dist/CheckBox/CheckBox-Dp7hxT2F.js +37 -0
  7. package/dist/CheckBox/index.js +3 -3
  8. package/dist/ColorPicker/index.js +1 -1
  9. package/dist/ConfigProvider/index.js +1 -1
  10. package/dist/DatePicker/{DatePicker-CopVj7KA.js → DatePicker-ByZiiZPq.js} +1 -1
  11. package/dist/DatePicker/{DatePickerPanel-CLCEPUcL.js → DatePickerPanel-DiOVoMv4.js} +1 -1
  12. package/dist/DatePicker/index.js +2 -2
  13. package/dist/DropDown/index.js +1 -1
  14. package/dist/Editor/index.js +1068 -952
  15. package/dist/Gantt/index.js +1 -1
  16. package/dist/Icon/index.js +1 -1
  17. package/dist/InputTag/index.js +1 -1
  18. package/dist/Loading/index.js +1 -1
  19. package/dist/Modal/index.js +1 -1
  20. package/dist/NotFoundContent/index.js +1 -1
  21. package/dist/Overlay/index.js +1 -1
  22. package/dist/Radio/Radio-C0OAW-K-.js +96 -0
  23. package/dist/Radio/index.js +2 -2
  24. package/dist/ScrollBar/index.js +1 -1
  25. package/dist/Segmented/index.js +1 -1
  26. package/dist/Select/{Select-VIy6OKEj.js → Select-DryXF1Tp.js} +2 -2
  27. package/dist/Select/index.js +6 -6
  28. package/dist/Table/index.js +1 -1
  29. package/dist/Tabs/index.js +1 -1
  30. package/dist/Tooltip/index.js +1 -1
  31. package/dist/Tree/index.js +4 -4
  32. package/dist/components/CheckBox/CheckBox.d.ts +2 -45
  33. package/dist/components/CheckBox/Group.d.ts +3 -33
  34. package/dist/components/CheckBox/index.d.ts +1 -1
  35. package/dist/components/CheckBox/interface.d.ts +142 -0
  36. package/dist/components/CheckBox/style/resolveCheckBoxThemeVars.d.ts +2 -0
  37. package/dist/components/Editor/context/EditorContainerContext.d.ts +2 -1
  38. package/dist/components/Editor/index.d.ts +1 -1
  39. package/dist/components/Editor/interface.d.ts +15 -0
  40. package/dist/components/Editor/plugins/DefaultTextStylePlugin.d.ts +1 -0
  41. package/dist/components/Editor/plugins/ImePendingFormatPlugin.d.ts +1 -0
  42. package/dist/components/Editor/utils/applyDefaultTextStyle.d.ts +2 -0
  43. package/dist/components/Editor/utils/imePendingFormat.d.ts +8 -0
  44. package/dist/components/Editor/utils/readTextFormats.d.ts +3 -1
  45. package/dist/components/Editor/utils/stripInlineStyleProperty.d.ts +1 -0
  46. package/dist/components/Radio/index.d.ts +1 -0
  47. package/dist/components/Radio/interface.d.ts +67 -0
  48. package/dist/components/Radio/style/resolveRadioThemeVars.d.ts +2 -0
  49. package/dist/components/index.d.ts +2 -0
  50. package/dist/index.js +8 -8
  51. package/dist/style.css +1 -1
  52. package/dist/vendors/{Tree-D0Q1IZ2D.js → Tree-DWK-JPnJ.js} +2 -2
  53. package/dist/vendors/{version-BVdbN53a.js → version-DH5GPcND.js} +1 -1
  54. package/package.json +1 -1
  55. package/dist/CheckBox/CheckBox-CM24-quL.js +0 -33
  56. package/dist/CheckBox/CheckBox-CcHskTz_.js +0 -67
  57. package/dist/Radio/Radio-D9jhW7K6.js +0 -85
@@ -1,67 +0,0 @@
1
- import { t as e } from "../Icon/Icon-DrdQOEJE.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
- //#region src/components/CheckBox/context/context.ts
7
- var c = i(null), l = "_checkbox_vheru_1", u = "_checkbox__inner_vheru_32", d = {
8
- checkbox: l,
9
- "checkbox--checked": "_checkbox--checked_vheru_12",
10
- "checkbox--unchecked": "_checkbox--unchecked_vheru_16",
11
- "checkbox--indeterminate": "_checkbox--indeterminate_vheru_23",
12
- "checkbox--disabled": "_checkbox--disabled_vheru_27",
13
- checkbox__inner: u,
14
- "checkbox__inner--disabled": "_checkbox__inner--disabled_vheru_38"
15
- }, f = ({ isChecked: t = !1, indeterminate: i = !1, disabled: a = !1 }) => {
16
- let o = i ? "indeterminate" : t ? "checked" : "unchecked", c = s(d.checkbox, {
17
- [d["checkbox--checked"]]: !a && o === "checked",
18
- [d["checkbox--unchecked"]]: !a && o === "unchecked",
19
- [d["checkbox--indeterminate"]]: !a && o === "indeterminate",
20
- [d["checkbox--disabled"]]: a
21
- }), l = s(d.checkbox__inner, { [d["checkbox__inner--disabled"]]: a });
22
- return /* @__PURE__ */ r("div", {
23
- className: c,
24
- children: [o === "checked" && /* @__PURE__ */ n(e, {
25
- name: "checkthebox",
26
- color: a ? "#b8b8b8" : "#fff"
27
- }), o === "indeterminate" && /* @__PURE__ */ n("div", { className: l })]
28
- });
29
- }, p = /* @__PURE__ */ function(e) {
30
- return e.NONE = "none", e.HORIZONTAL = "horizontal", e.VERTICAL = "vertical", e;
31
- }({}), m = {
32
- "bsy-checkbox": "_bsy-checkbox_1372g_1",
33
- "bsy-checkbox--full-width": "_bsy-checkbox--full-width_1372g_8",
34
- "bsy-checkbox__button": "_bsy-checkbox__button_1372g_11",
35
- "bsy-checkbox__button--disabled": "_bsy-checkbox__button--disabled_1372g_22",
36
- "bsy-checkbox__button--enabled": "_bsy-checkbox__button--enabled_1372g_27",
37
- "bsy-checkbox__button--indeterminate": "_bsy-checkbox__button--indeterminate_1372g_30",
38
- "bsy-checkbox__button--checked": "_bsy-checkbox__button--checked_1372g_34",
39
- "bsy-checkbox__button--unchecked": "_bsy-checkbox__button--unchecked_1372g_38",
40
- "bsy-checkbox__button--left-label": "_bsy-checkbox__button--left-label_1372g_45"
41
- }, h = a((e, i) => {
42
- let { checked: a, indeterminate: l = !1, onChange: u, value: d = t("checkbox"), disabled: h = !1, children: g, style: _, labelPosition: v = "right" } = e, y = o(c), b = y ? y.value?.includes(d) : a, x = (e) => {
43
- if (!(h || y?.disabled)) if (y) {
44
- let t = e ? [...y.value || [], d] : (y.value || []).filter((e) => e !== d);
45
- t && y.onChange?.(t);
46
- } else u?.(e);
47
- }, S = h || y?.disabled;
48
- return /* @__PURE__ */ r("div", {
49
- className: s(m["bsy-checkbox"], { [m["bsy-checkbox--full-width"]]: y?.layout === p.NONE || !y?.layout }),
50
- onClick: () => x(!b),
51
- style: _,
52
- children: [/* @__PURE__ */ n("div", {
53
- ref: i,
54
- role: "checkbox",
55
- "aria-checked": l ? "mixed" : b,
56
- tabIndex: S ? -1 : 0,
57
- className: s({ [m["bsy-checkbox__button--left-label"]]: v === "left" }),
58
- children: /* @__PURE__ */ n(f, {
59
- indeterminate: l,
60
- isChecked: b,
61
- disabled: S
62
- })
63
- }), g]
64
- });
65
- });
66
- //#endregion
67
- export { p as n, c as r, h as t };
@@ -1,85 +0,0 @@
1
- import { uniqueId as e } from "lodash-es";
2
- import { jsx as t, jsxs as n } from "react/jsx-runtime";
3
- import { createContext as r, forwardRef as i, useContext as a } from "react";
4
- import o from "clsx";
5
- import { useControllableValue as s } from "ahooks";
6
- //#region src/components/Radio/context/context.ts
7
- var c = r(null), l = /* @__PURE__ */ function(e) {
8
- return e.NONE = "none", e.HORIZONTAL = "horizontal", e.VERTICAL = "vertical", e;
9
- }({}), u = {
10
- "bsy-radio": "_bsy-radio_tyzdi_1",
11
- "bsy-radio--disabled": "_bsy-radio--disabled_tyzdi_8",
12
- "bsy-radio--full-width": "_bsy-radio--full-width_tyzdi_11",
13
- "bsy-radio__input": "_bsy-radio__input_tyzdi_15",
14
- "bsy-radio__input--checked": "_bsy-radio__input--checked_tyzdi_39",
15
- "bsy-radio__input--disabled": "_bsy-radio__input--disabled_tyzdi_46",
16
- "bsy-radio__label": "_bsy-radio__label_tyzdi_61",
17
- "bsy-radio__label--left": "_bsy-radio__label--left_tyzdi_68",
18
- "bsy-radio-group": "_bsy-radio-group_tyzdi_78",
19
- "bsy-radio-group--none": "_bsy-radio-group--none_tyzdi_82",
20
- "bsy-radio-group--vertical": "_bsy-radio-group--vertical_tyzdi_86",
21
- "bsy-radio-group--horizontal": "_bsy-radio-group--horizontal_tyzdi_91"
22
- }, d = i((r, i) => {
23
- let { checked: s, onChange: d, value: f = e("radio"), disabled: p = !1, children: m, style: h, labelPosition: g = "right", className: _ } = r, v = a(c), y = v ? v.value === f : s, b = () => {
24
- p || v?.disabled || (v ? y ? v.onDeselect?.(f) : v.onChange?.(f) : d?.(!y));
25
- }, x = p || v?.disabled, S = v?.layout === l.NONE || !v?.layout, C = o(u["bsy-radio"], {
26
- [u["bsy-radio--disabled"]]: x,
27
- [u["bsy-radio--full-width"]]: S
28
- }, _), w = o(u["bsy-radio__input"], {
29
- [u["bsy-radio__input--checked"]]: y,
30
- [u["bsy-radio__input--disabled"]]: x
31
- }), T = o(u["bsy-radio__label"], { [u["bsy-radio__label--left"]]: g === "left" });
32
- return /* @__PURE__ */ n("div", {
33
- role: "radio",
34
- className: C,
35
- onClick: b,
36
- style: h,
37
- children: [/* @__PURE__ */ t("div", {
38
- ref: i,
39
- role: "radio",
40
- "aria-checked": y,
41
- tabIndex: x ? -1 : 0,
42
- className: w,
43
- "data-layout": v?.layout
44
- }), m && /* @__PURE__ */ t("span", {
45
- className: T,
46
- children: m
47
- })]
48
- });
49
- });
50
- d.displayName = "BsyRadio";
51
- //#endregion
52
- //#region src/components/Radio/Group.tsx
53
- var f = ({ disabled: e, layout: n = l.NONE, children: r, className: i, style: a, onDeselect: d, ...f }) => {
54
- let [p, m] = s(f, {
55
- defaultValue: "",
56
- valuePropName: "value",
57
- defaultValuePropName: "defaultValue",
58
- trigger: "onChange"
59
- }), h = o(u["bsy-radio-group"], {
60
- [u["bsy-radio-group--none"]]: n === l.NONE,
61
- [u["bsy-radio-group--vertical"]]: n === l.VERTICAL,
62
- [u["bsy-radio-group--horizontal"]]: n === l.HORIZONTAL
63
- }, i);
64
- return /* @__PURE__ */ t(c.Provider, {
65
- value: {
66
- value: p,
67
- onChange: m,
68
- disabled: e,
69
- layout: n,
70
- onDeselect: d
71
- },
72
- children: /* @__PURE__ */ t("div", {
73
- className: h,
74
- style: a,
75
- children: r
76
- })
77
- });
78
- };
79
- f.displayName = "BsyRadioGroup";
80
- //#endregion
81
- //#region src/components/Radio/index.ts
82
- var p = d;
83
- p.Group = f;
84
- //#endregion
85
- export { p as t };