bj-web-components 0.2.5 → 0.2.7

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.
@@ -15,16 +15,16 @@ function Kt(n) {
15
15
  if (n !== "auto" || !c) return;
16
16
  const r = c.parentElement;
17
17
  if (!r) return;
18
- const p = r.getBoundingClientRect(), f = c.offsetWidth, g = c.offsetHeight, h = 12, a = {
18
+ const p = r.getBoundingClientRect(), g = c.offsetWidth, f = c.offsetHeight, h = 12, a = {
19
19
  top: p.top,
20
20
  right: window.innerWidth - p.right,
21
21
  bottom: window.innerHeight - p.bottom,
22
22
  left: p.left
23
23
  }, y = {
24
- top: g + h,
25
- right: f + h,
26
- bottom: g + h,
27
- left: f + h
24
+ top: f + h,
25
+ right: g + h,
26
+ bottom: f + h,
27
+ left: g + h
28
28
  };
29
29
  for (const b of ce)
30
30
  if (a[b] >= y[b]) {
@@ -44,9 +44,9 @@ function Te({
44
44
  className: r,
45
45
  style: p
46
46
  }) {
47
- const [f, g] = Kt(n), h = ["tooltip-popup", `tooltip-popup--${f}`, r].filter(Boolean).join(" ");
48
- return /* @__PURE__ */ l("div", { ref: g, className: h, style: p, children: [
49
- /* @__PURE__ */ t("div", { className: `tooltip-arrow tooltip-arrow--${f}` }),
47
+ const [g, f] = Kt(n), h = ["tooltip-popup", `tooltip-popup--${g}`, r].filter(Boolean).join(" ");
48
+ return /* @__PURE__ */ l("div", { ref: f, className: h, style: p, children: [
49
+ /* @__PURE__ */ t("div", { className: `tooltip-arrow tooltip-arrow--${g}` }),
50
50
  /* @__PURE__ */ t("p", { className: "tooltip-confirm__title", children: e }),
51
51
  /* @__PURE__ */ l("div", { className: "tooltip-confirm__actions", children: [
52
52
  /* @__PURE__ */ t("button", { className: "tooltip-confirm__cancel", onClick: s, children: c }),
@@ -61,8 +61,8 @@ function Ue({
61
61
  className: c,
62
62
  style: u
63
63
  }) {
64
- const [s, r] = Kt(n), p = Math.min(100, Math.max(0, Math.round(i))), f = ["tooltip-popup", `tooltip-popup--${s}`, c].filter(Boolean).join(" ");
65
- return /* @__PURE__ */ l("div", { ref: r, className: f, style: u, children: [
64
+ const [s, r] = Kt(n), p = Math.min(100, Math.max(0, Math.round(i))), g = ["tooltip-popup", `tooltip-popup--${s}`, c].filter(Boolean).join(" ");
65
+ return /* @__PURE__ */ l("div", { ref: r, className: g, style: u, children: [
66
66
  /* @__PURE__ */ t("div", { className: `tooltip-arrow tooltip-arrow--${s}` }),
67
67
  /* @__PURE__ */ l("div", { className: "tooltip-progress", children: [
68
68
  /* @__PURE__ */ l("div", { className: "tooltip-progress__header", children: [
@@ -96,13 +96,13 @@ function le({
96
96
  `tooltip-popup--${s}`,
97
97
  i !== "default" ? `tooltip-popup--${i}` : "",
98
98
  c
99
- ].filter(Boolean).join(" "), f = [
99
+ ].filter(Boolean).join(" "), g = [
100
100
  "tooltip-arrow",
101
101
  `tooltip-arrow--${s}`,
102
102
  i === "tinted" ? "tooltip-arrow--tinted-bg" : ""
103
103
  ].filter(Boolean).join(" ");
104
104
  return /* @__PURE__ */ l("div", { ref: r, className: p, style: u, children: [
105
- /* @__PURE__ */ t("div", { className: f }),
105
+ /* @__PURE__ */ t("div", { className: g }),
106
106
  /* @__PURE__ */ t("p", { className: "bu-tooltip-content__text", children: e })
107
107
  ] });
108
108
  }
@@ -158,8 +158,8 @@ function Ye({
158
158
  onLangChange: s,
159
159
  showBody: r = !0,
160
160
  error: p = !1,
161
- onDelete: f,
162
- onPreviewImage: g,
161
+ onDelete: g,
162
+ onPreviewImage: f,
163
163
  onDeleteImage: h,
164
164
  onUpload: a,
165
165
  onAssociate: y,
@@ -288,7 +288,7 @@ function Ye({
288
288
  )
289
289
  ] })
290
290
  ] }),
291
- /* @__PURE__ */ t("button", { className: "sku-input-card__delete", onClick: f, children: /* @__PURE__ */ t(pe, {}) })
291
+ /* @__PURE__ */ t("button", { className: "sku-input-card__delete", onClick: g, children: /* @__PURE__ */ t(pe, {}) })
292
292
  ] }),
293
293
  r && /* @__PURE__ */ l("div", { className: "sku-input-card__body", children: [
294
294
  /* @__PURE__ */ t(
@@ -310,7 +310,7 @@ function Ye({
310
310
  "button",
311
311
  {
312
312
  className: "sku-input-card__image-action-btn",
313
- onClick: () => g == null ? void 0 : g(x[0]),
313
+ onClick: () => f == null ? void 0 : f(x[0]),
314
314
  children: /* @__PURE__ */ t(he, {})
315
315
  }
316
316
  ),
@@ -378,8 +378,8 @@ const qe = It(
378
378
  value: s = "",
379
379
  onChange: r,
380
380
  label: p,
381
- required: f,
382
- placeholder: g,
381
+ required: g,
382
+ placeholder: f,
383
383
  maxLength: h,
384
384
  showCount: a,
385
385
  error: y = !1,
@@ -416,7 +416,7 @@ const qe = It(
416
416
  ].filter(Boolean).join(" "), L = `bu-input__field bu-input__field--${e}`;
417
417
  return /* @__PURE__ */ l("div", { className: ["bu-input", V].filter(Boolean).join(" "), style: _, children: [
418
418
  p && /* @__PURE__ */ l("label", { className: "bu-input__label", htmlFor: U, children: [
419
- f && /* @__PURE__ */ t("span", { className: "bu-input__required", children: "*" }),
419
+ g && /* @__PURE__ */ t("span", { className: "bu-input__required", children: "*" }),
420
420
  p
421
421
  ] }),
422
422
  /* @__PURE__ */ l("div", { className: "bu-input__row", children: [
@@ -431,7 +431,7 @@ const qe = It(
431
431
  value: s,
432
432
  onChange: (M) => r == null ? void 0 : r(M.target.value),
433
433
  onBlur: k,
434
- placeholder: g,
434
+ placeholder: f,
435
435
  maxLength: h,
436
436
  disabled: I
437
437
  }
@@ -445,7 +445,7 @@ const qe = It(
445
445
  value: s,
446
446
  onChange: (M) => r == null ? void 0 : r(M.target.value),
447
447
  onBlur: k,
448
- placeholder: g,
448
+ placeholder: f,
449
449
  disabled: I,
450
450
  inputMode: "numeric"
451
451
  }
@@ -485,7 +485,7 @@ const qe = It(
485
485
  value: s,
486
486
  onChange: (M) => r == null ? void 0 : r(M.target.value),
487
487
  onBlur: k,
488
- placeholder: g,
488
+ placeholder: f,
489
489
  maxLength: h,
490
490
  disabled: I
491
491
  }
@@ -524,8 +524,8 @@ const Fe = It(
524
524
  onChange: s,
525
525
  placeholder: r,
526
526
  maxLength: p,
527
- error: f = !1,
528
- disabled: g,
527
+ error: g = !1,
528
+ disabled: f,
529
529
  onDelete: h,
530
530
  labels: a,
531
531
  id: y,
@@ -537,8 +537,8 @@ const Fe = It(
537
537
  S && N && "bu-eib__box--actions-both",
538
538
  S && !N && "bu-eib__box--actions-toggle",
539
539
  !S && N && "bu-eib__box--actions-delete",
540
- f && "bu-eib__box--error",
541
- g && "bu-eib__box--disabled"
540
+ g && "bu-eib__box--error",
541
+ f && "bu-eib__box--disabled"
542
542
  ].filter(Boolean).join(" ");
543
543
  return /* @__PURE__ */ t("div", { className: ["bu-eib", b].filter(Boolean).join(" "), style: I, children: /* @__PURE__ */ l("div", { className: k, children: [
544
544
  /* @__PURE__ */ t(
@@ -551,7 +551,7 @@ const Fe = It(
551
551
  onChange: (P) => s == null ? void 0 : s(P.target.value),
552
552
  placeholder: r,
553
553
  maxLength: p,
554
- disabled: g
554
+ disabled: f
555
555
  }
556
556
  ),
557
557
  (S || N) && /* @__PURE__ */ l("div", { className: "bu-eib__actions", children: [
@@ -589,8 +589,8 @@ function We({
589
589
  cancelText: s = "取消",
590
590
  onOk: r,
591
591
  onCancel: p,
592
- onClose: f,
593
- activeLang: g = "zh",
592
+ onClose: g,
593
+ activeLang: f = "zh",
594
594
  onLangChange: h,
595
595
  labels: a,
596
596
  hint: y,
@@ -602,7 +602,7 @@ function We({
602
602
  const X = (a == null ? void 0 : a.zh) ?? "中文", S = (a == null ? void 0 : a.en) ?? "EN";
603
603
  if (!n) return null;
604
604
  const N = i === "bilingual", k = i === "single", P = I != null ? { width: I, ...q } : q;
605
- return /* @__PURE__ */ t("div", { className: ["bu-modal__overlay", G].filter(Boolean).join(" "), onClick: f, children: /* @__PURE__ */ l(
605
+ return /* @__PURE__ */ t("div", { className: ["bu-modal__overlay", G].filter(Boolean).join(" "), onClick: g, children: /* @__PURE__ */ l(
606
606
  "div",
607
607
  {
608
608
  className: "bu-modal__container",
@@ -616,7 +616,7 @@ function We({
616
616
  "button",
617
617
  {
618
618
  type: "button",
619
- className: `bu-modal__lang-btn${g === "zh" ? " bu-modal__lang-btn--active" : ""}`,
619
+ className: `bu-modal__lang-btn${f === "zh" ? " bu-modal__lang-btn--active" : ""}`,
620
620
  onClick: () => h == null ? void 0 : h("zh"),
621
621
  children: X
622
622
  }
@@ -625,19 +625,19 @@ function We({
625
625
  "button",
626
626
  {
627
627
  type: "button",
628
- className: `bu-modal__lang-btn${g === "en" ? " bu-modal__lang-btn--active" : ""}`,
628
+ className: `bu-modal__lang-btn${f === "en" ? " bu-modal__lang-btn--active" : ""}`,
629
629
  onClick: () => h == null ? void 0 : h("en"),
630
630
  children: S
631
631
  }
632
632
  )
633
633
  ] }),
634
- /* @__PURE__ */ t("button", { type: "button", className: "bu-modal__close", onClick: f, children: /* @__PURE__ */ t("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ t("path", { d: "M16.5613 6.73027C16.7558 6.53571 17.0723 6.53442 17.2684 6.72736C17.4644 6.92032 17.4657 7.23444 17.2713 7.42901L12.7036 12.0002L17.2713 16.5714C17.4657 16.766 17.4644 17.0801 17.2684 17.273C17.0723 17.4659 16.7558 17.4646 16.5613 17.2701L11.9996 12.7047L7.43794 17.2701C7.24352 17.4647 6.92699 17.4659 6.73091 17.273C6.53485 17.0801 6.53355 16.7659 6.72798 16.5714L11.2955 12.0002L6.72798 7.42901C6.53355 7.23442 6.53485 6.92032 6.73091 6.72736C6.92698 6.53442 7.2435 6.53571 7.43794 6.73027L11.9996 11.2955L16.5613 6.73027Z", fill: "currentColor" }) }) })
634
+ /* @__PURE__ */ t("button", { type: "button", className: "bu-modal__close", onClick: g, children: /* @__PURE__ */ t("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ t("path", { d: "M16.5613 6.73027C16.7558 6.53571 17.0723 6.53442 17.2684 6.72736C17.4644 6.92032 17.4657 7.23444 17.2713 7.42901L12.7036 12.0002L17.2713 16.5714C17.4657 16.766 17.4644 17.0801 17.2684 17.273C17.0723 17.4659 16.7558 17.4646 16.5613 17.2701L11.9996 12.7047L7.43794 17.2701C7.24352 17.4647 6.92699 17.4659 6.73091 17.273C6.53485 17.0801 6.53355 16.7659 6.72798 16.5714L11.2955 12.0002L6.72798 7.42901C6.53355 7.23442 6.53485 6.92032 6.73091 6.72736C6.92698 6.53442 7.2435 6.53571 7.43794 6.73027L11.9996 11.2955L16.5613 6.73027Z", fill: "currentColor" }) }) })
635
635
  ] }),
636
636
  /* @__PURE__ */ t("div", { className: "bu-modal__body", children: c }),
637
637
  /* @__PURE__ */ l("div", { className: "bu-modal__footer", children: [
638
638
  y && /* @__PURE__ */ t("p", { className: "bu-modal__hint", children: y }),
639
639
  /* @__PURE__ */ l("div", { className: "bu-modal__btn-row", children: [
640
- !k && /* @__PURE__ */ t("button", { type: "button", className: "bu-modal__btn-cancel", onClick: p ?? f, children: s }),
640
+ !k && /* @__PURE__ */ t("button", { type: "button", className: "bu-modal__btn-cancel", onClick: p ?? g, children: s }),
641
641
  /* @__PURE__ */ l(
642
642
  "button",
643
643
  {
@@ -670,8 +670,8 @@ function Ze({
670
670
  onManageField: s,
671
671
  multiple: r = !0,
672
672
  showSearch: p = !0,
673
- showSort: f = !0,
674
- addButtonText: g,
673
+ showSort: g = !0,
674
+ addButtonText: f,
675
675
  onAdd: h,
676
676
  labels: a,
677
677
  className: y,
@@ -796,7 +796,7 @@ function Ze({
796
796
  ] }) }),
797
797
  Mt(
798
798
  /* @__PURE__ */ t("div", { ref: E, className: "bu-pf__portal", style: { position: "fixed", top: j.top, left: j.left, width: j.width, zIndex: 1050 }, children: /* @__PURE__ */ l("div", { className: "bu-pf__dropdown", children: [
799
- (p || f) && /* @__PURE__ */ l("div", { className: "bu-pf__toolbar", children: [
799
+ (p || g) && /* @__PURE__ */ l("div", { className: "bu-pf__toolbar", children: [
800
800
  p && /* @__PURE__ */ l("div", { className: "bu-pf__search", children: [
801
801
  /* @__PURE__ */ t("span", { className: "bu-pf__search-icon", children: /* @__PURE__ */ t("img", { src: be, width: 20, height: 20, alt: "" }) }),
802
802
  /* @__PURE__ */ t(
@@ -809,7 +809,7 @@ function Ze({
809
809
  }
810
810
  )
811
811
  ] }),
812
- f && /* @__PURE__ */ l("div", { ref: C, className: "bu-pf__sort-wrap", children: [
812
+ g && /* @__PURE__ */ l("div", { ref: C, className: "bu-pf__sort-wrap", children: [
813
813
  /* @__PURE__ */ t(
814
814
  "button",
815
815
  {
@@ -864,7 +864,7 @@ function Ze({
864
864
  T
865
865
  ] })
866
866
  ] }) }),
867
- g && /* @__PURE__ */ t("div", { className: "bu-pf__add-row", onClick: h, children: g })
867
+ f && /* @__PURE__ */ t("div", { className: "bu-pf__add-row", onClick: h, children: f })
868
868
  ] }) }),
869
869
  (I == null ? void 0 : I()) ?? document.body
870
870
  )
@@ -876,40 +876,42 @@ function St({
876
876
  spanClassName: e,
877
877
  wrapperStyle: i,
878
878
  placement: c = "top",
879
- getPopupContainer: u
879
+ getPopupContainer: u,
880
+ trailing: s
880
881
  }) {
881
- const [s, r] = H(!1), p = R(null), f = R(null), [g, h] = H(null);
882
- function a() {
883
- var b;
884
- const y = f.current;
885
- y && y.scrollWidth > y.offsetWidth && (h(((b = p.current) == null ? void 0 : b.getBoundingClientRect()) ?? null), r(!0));
882
+ const [r, p] = H(!1), g = R(null), f = R(null), [h, a] = H(null);
883
+ function y() {
884
+ var I;
885
+ const b = f.current;
886
+ b && b.scrollWidth > b.offsetWidth && (a(((I = g.current) == null ? void 0 : I.getBoundingClientRect()) ?? null), p(!0));
886
887
  }
887
- return /* @__PURE__ */ l(Ht, { ref: p, style: i, children: [
888
+ return /* @__PURE__ */ l(Ht, { ref: g, style: i, children: [
888
889
  /* @__PURE__ */ t(
889
890
  "span",
890
891
  {
891
892
  ref: f,
892
893
  className: e,
893
- onMouseEnter: a,
894
- onMouseLeave: () => r(!1),
894
+ onMouseEnter: y,
895
+ onMouseLeave: () => p(!1),
895
896
  children: n
896
897
  }
897
898
  ),
898
- s && g && Mt(
899
+ s,
900
+ r && h && Mt(
899
901
  /* @__PURE__ */ t(
900
902
  "span",
901
903
  {
902
904
  style: {
903
905
  position: "fixed",
904
- top: g.top,
905
- left: g.left,
906
- width: g.width,
907
- height: g.height,
906
+ top: h.top,
907
+ left: h.left,
908
+ width: h.width,
909
+ height: h.height,
908
910
  display: "block",
909
911
  pointerEvents: "none",
910
912
  zIndex: 9999999999
911
913
  },
912
- children: /* @__PURE__ */ t(le, { content: n, placement: c })
914
+ children: /* @__PURE__ */ t(le, { content: n, placement: c, className: "bu-category-dropdown__tooltip" })
913
915
  }
914
916
  ),
915
917
  (u == null ? void 0 : u()) ?? document.body
@@ -959,8 +961,8 @@ function Xe({
959
961
  maxVisible: s = 6,
960
962
  className: r,
961
963
  style: p,
962
- getPopupContainer: f,
963
- dropdownStyle: g
964
+ getPopupContainer: g,
965
+ dropdownStyle: f
964
966
  }) {
965
967
  const [h, a] = H(!1), [y, b] = H(e), I = R(null), G = R(null), q = R(null), X = R(!1), [S, N] = H({}), [k, P] = H(), T = ct(() => {
966
968
  var et;
@@ -983,9 +985,9 @@ function Xe({
983
985
  top: M ? w.top - E - 4 : w.bottom + 4,
984
986
  left: w.left,
985
987
  zIndex: v > 0 ? v + 10 : 1100,
986
- ...g
988
+ ...f
987
989
  });
988
- }, [g]);
990
+ }, [f]);
989
991
  vt(() => {
990
992
  h && T();
991
993
  }, [h, y, T]), vt(() => {
@@ -1042,25 +1044,23 @@ function Xe({
1042
1044
  className: `bu-category-dropdown${r ? ` ${r}` : ""}`,
1043
1045
  style: p,
1044
1046
  children: [
1045
- /* @__PURE__ */ l(
1047
+ /* @__PURE__ */ t(
1046
1048
  "button",
1047
1049
  {
1048
1050
  type: "button",
1049
1051
  className: Z,
1050
1052
  disabled: u,
1051
1053
  onClick: () => h ? a(!1) : $(),
1052
- children: [
1053
- /* @__PURE__ */ t(
1054
- St,
1055
- {
1056
- text: U ?? c,
1057
- spanClassName: `bu-category-dropdown__trigger-label${W ? "" : " bu-category-dropdown__trigger-label--placeholder"}`,
1058
- wrapperStyle: { flex: 1, minWidth: 0, display: "block" },
1059
- getPopupContainer: f
1060
- }
1061
- ),
1062
- /* @__PURE__ */ t("span", { className: `bu-category-dropdown__trigger-chevron${h ? " bu-category-dropdown__trigger-chevron--open" : ""}`, children: /* @__PURE__ */ t(Ke, {}) })
1063
- ]
1054
+ children: /* @__PURE__ */ t(
1055
+ St,
1056
+ {
1057
+ text: U ?? c,
1058
+ spanClassName: `bu-category-dropdown__trigger-label${W ? "" : " bu-category-dropdown__trigger-label--placeholder"}`,
1059
+ wrapperStyle: { flex: 1, minWidth: 0, display: "flex", alignItems: "center", gap: 8 },
1060
+ getPopupContainer: g,
1061
+ trailing: /* @__PURE__ */ t("span", { className: `bu-category-dropdown__trigger-chevron${h ? " bu-category-dropdown__trigger-chevron--open" : ""}`, children: /* @__PURE__ */ t(Ke, {}) })
1062
+ }
1063
+ )
1064
1064
  }
1065
1065
  ),
1066
1066
  h && Mt(
@@ -1102,7 +1102,7 @@ function Xe({
1102
1102
  text: L.label,
1103
1103
  spanClassName: "bu-category-dropdown__item-label",
1104
1104
  wrapperStyle: { flex: 1, minWidth: 0, display: "block" },
1105
- getPopupContainer: f
1105
+ getPopupContainer: g
1106
1106
  }
1107
1107
  ),
1108
1108
  M && et && /* @__PURE__ */ t("span", { className: "bu-category-dropdown__item-arrow", children: /* @__PURE__ */ t(ze, {}) })
@@ -1130,8 +1130,8 @@ const Ve = (n) => {
1130
1130
  total: s = 0,
1131
1131
  onChange: r,
1132
1132
  onShowSizeChange: p,
1133
- showSizeChanger: f = !1,
1134
- showQuickJumper: g = !1,
1133
+ showSizeChanger: g = !1,
1134
+ showQuickJumper: f = !1,
1135
1135
  pageSizeOptions: h = [10, 20, 50, 100],
1136
1136
  disabled: a = !1,
1137
1137
  hideOnSinglePage: y = !1,
@@ -1278,7 +1278,7 @@ const Ve = (n) => {
1278
1278
  }
1279
1279
  )
1280
1280
  ] }),
1281
- f && /* @__PURE__ */ l("div", { className: "pagination-sizer", ref: Z, children: [
1281
+ g && /* @__PURE__ */ l("div", { className: "pagination-sizer", ref: Z, children: [
1282
1282
  /* @__PURE__ */ l(
1283
1283
  "button",
1284
1284
  {
@@ -1311,7 +1311,7 @@ const Ve = (n) => {
1311
1311
  A
1312
1312
  )) })
1313
1313
  ] }),
1314
- g && /* @__PURE__ */ l("div", { className: "pagination-jumper", children: [
1314
+ f && /* @__PURE__ */ l("div", { className: "pagination-jumper", children: [
1315
1315
  /* @__PURE__ */ t("span", { children: S("跳至") }),
1316
1316
  /* @__PURE__ */ t(
1317
1317
  "input",
@@ -1396,8 +1396,8 @@ function Tt({ fileName: n, onRename: e }) {
1396
1396
  const p = async () => {
1397
1397
  const y = u.trim();
1398
1398
  y && y !== n && await (e == null ? void 0 : e(y)), c(!1);
1399
- }, f = () => c(!1), g = (y) => {
1400
- y.key === "Enter" && !y.shiftKey && (y.preventDefault(), p()), y.key === "Escape" && f();
1399
+ }, g = () => c(!1), f = (y) => {
1400
+ y.key === "Enter" && !y.shiftKey && (y.preventDefault(), p()), y.key === "Escape" && g();
1401
1401
  }, h = () => {
1402
1402
  p();
1403
1403
  }, a = () => {
@@ -1410,7 +1410,7 @@ function Tt({ fileName: n, onRename: e }) {
1410
1410
  className: "file-card__edit-input",
1411
1411
  value: u,
1412
1412
  onChange: (y) => s(y.target.value),
1413
- onKeyDown: g,
1413
+ onKeyDown: f,
1414
1414
  onBlur: h,
1415
1415
  rows: 2,
1416
1416
  style: { height: "42px" }
@@ -1437,11 +1437,11 @@ function ke({ fileName: n, fileType: e, fileUrl: i, onDelete: c, onRename: u, on
1437
1437
  return /* @__PURE__ */ l("div", { className: `file-card file-card--other ${r || ""}`, style: p, children: [
1438
1438
  /* @__PURE__ */ l("div", { className: "file-card__other-preview", onClick: s, children: [
1439
1439
  (s || c) && /* @__PURE__ */ l("div", { className: "file-card__overlay", children: [
1440
- s && /* @__PURE__ */ t("button", { className: "file-card__overlay-btn", onClick: (f) => {
1441
- f.stopPropagation(), s();
1440
+ s && /* @__PURE__ */ t("button", { className: "file-card__overlay-btn", onClick: (g) => {
1441
+ g.stopPropagation(), s();
1442
1442
  }, children: /* @__PURE__ */ t(Gt, {}) }),
1443
- c && /* @__PURE__ */ t("button", { className: "file-card__overlay-btn", onClick: (f) => {
1444
- f.stopPropagation(), c();
1443
+ c && /* @__PURE__ */ t("button", { className: "file-card__overlay-btn", onClick: (g) => {
1444
+ g.stopPropagation(), c();
1445
1445
  }, children: /* @__PURE__ */ t(Pt, {}) })
1446
1446
  ] }),
1447
1447
  /* @__PURE__ */ t(Ne, { fileType: e, fileUrl: i, fileName: n })
@@ -1461,8 +1461,8 @@ const De = ({
1461
1461
  checkedChildren: s,
1462
1462
  unCheckedChildren: r,
1463
1463
  theme: p = "light",
1464
- activeColor: f,
1465
- inactiveColor: g,
1464
+ activeColor: g,
1465
+ inactiveColor: f,
1466
1466
  className: h,
1467
1467
  style: a
1468
1468
  }) => {
@@ -1470,7 +1470,7 @@ const De = ({
1470
1470
  if (c || u) return;
1471
1471
  const P = !G;
1472
1472
  y || I(P), i == null || i(P);
1473
- }, [G, c, u, y, i]), N = G ? f ?? (p === "dark" ? "var(--bu-switch-dark-on)" : "var(--bu-switch-light-on)") : g ?? (p === "dark" ? "var(--bu-switch-dark-off)" : "var(--bu-switch-light-off)"), k = [
1473
+ }, [G, c, u, y, i]), N = G ? g ?? (p === "dark" ? "var(--bu-switch-dark-on)" : "var(--bu-switch-light-on)") : f ?? (p === "dark" ? "var(--bu-switch-dark-off)" : "var(--bu-switch-light-off)"), k = [
1474
1474
  "bu-switch",
1475
1475
  G && "bu-switch--checked",
1476
1476
  c && "bu-switch--disabled",
@@ -1526,17 +1526,17 @@ function Le(n, e) {
1526
1526
  function u() {
1527
1527
  if (!(!n || !i.current || !e))
1528
1528
  try {
1529
- const { value: s } = n, { beforeTxt: r, afterTxt: p, start: f } = i.current;
1530
- let g = s.length;
1529
+ const { value: s } = n, { beforeTxt: r, afterTxt: p, start: g } = i.current;
1530
+ let f = s.length;
1531
1531
  if (s.startsWith(r))
1532
- g = r.length;
1532
+ f = r.length;
1533
1533
  else if (s.endsWith(p))
1534
- g = s.length - p.length;
1534
+ f = s.length - p.length;
1535
1535
  else {
1536
- const h = r[f - 1], a = s.indexOf(h, f - 1);
1537
- a !== -1 && (g = a + 1);
1536
+ const h = r[g - 1], a = s.indexOf(h, g - 1);
1537
+ a !== -1 && (f = a + 1);
1538
1538
  }
1539
- n.setSelectionRange(g, g);
1539
+ n.setSelectionRange(f, f);
1540
1540
  } catch {
1541
1541
  }
1542
1542
  }
@@ -1561,15 +1561,15 @@ function Jt({ className: n }) {
1561
1561
  function Re({ icon: n, upDisabled: e, downDisabled: i, onStep: c }) {
1562
1562
  const u = R(void 0), s = R(c);
1563
1563
  s.current = c;
1564
- const r = () => clearTimeout(u.current), p = (g, h) => {
1565
- g.preventDefault(), r(), s.current(h);
1564
+ const r = () => clearTimeout(u.current), p = (f, h) => {
1565
+ f.preventDefault(), r(), s.current(h);
1566
1566
  function a() {
1567
1567
  s.current(h), u.current = setTimeout(a, Je);
1568
1568
  }
1569
1569
  u.current = setTimeout(a, xe);
1570
1570
  };
1571
1571
  ot(() => r, []);
1572
- const f = {
1572
+ const g = {
1573
1573
  unselectable: "on",
1574
1574
  role: "button",
1575
1575
  onMouseUp: r,
@@ -1583,21 +1583,21 @@ function Re({ icon: n, upDisabled: e, downDisabled: i, onStep: c }) {
1583
1583
  /* @__PURE__ */ t(
1584
1584
  "span",
1585
1585
  {
1586
- ...f,
1586
+ ...g,
1587
1587
  "aria-label": "Increase Value",
1588
1588
  "aria-disabled": e,
1589
1589
  className: e ? "bj-input-number__handler bj-input-number__handler--up bj-input-number__handler--disabled" : "bj-input-number__handler bj-input-number__handler--up",
1590
- onMouseDown: (g) => p(g, !0)
1590
+ onMouseDown: (f) => p(f, !0)
1591
1591
  }
1592
1592
  ),
1593
1593
  /* @__PURE__ */ t(
1594
1594
  "span",
1595
1595
  {
1596
- ...f,
1596
+ ...g,
1597
1597
  "aria-label": "Decrease Value",
1598
1598
  "aria-disabled": i,
1599
1599
  className: i ? "bj-input-number__handler bj-input-number__handler--down bj-input-number__handler--disabled" : "bj-input-number__handler bj-input-number__handler--down",
1600
- onMouseDown: (g) => p(g, !1)
1600
+ onMouseDown: (f) => p(f, !1)
1601
1601
  }
1602
1602
  ),
1603
1603
  n || /* @__PURE__ */ l(ht, { children: [
@@ -1698,18 +1698,18 @@ function rt(n) {
1698
1698
  }
1699
1699
  function yt(n, e, i, c = !1) {
1700
1700
  if (n === "") return "";
1701
- const { negativeStr: u, integerStr: s, decimalStr: r } = gt(n), p = `${e}${r}`, f = `${u}${s}`;
1701
+ const { negativeStr: u, integerStr: s, decimalStr: r } = gt(n), p = `${e}${r}`, g = `${u}${s}`;
1702
1702
  if (i !== void 0 && i >= 0) {
1703
- const g = Number(r[i]);
1704
- if (g >= 5 && !c) {
1703
+ const f = Number(r[i]);
1704
+ if (f >= 5 && !c) {
1705
1705
  const h = rt(n).add(
1706
- `${u}0.${"0".repeat(i)}${10 - g}`
1706
+ `${u}0.${"0".repeat(i)}${10 - f}`
1707
1707
  );
1708
1708
  return yt(h.toString(), e, i, c);
1709
1709
  }
1710
- return i === 0 ? f : `${f}${e}${r.padEnd(i, "0").slice(0, i)}`;
1710
+ return i === 0 ? g : `${g}${e}${r.padEnd(i, "0").slice(0, i)}`;
1711
1711
  }
1712
- return p === ".0" ? f : `${f}${p}`;
1712
+ return p === ".0" ? g : `${g}${p}`;
1713
1713
  }
1714
1714
  function Rt(n) {
1715
1715
  const e = typeof n == "number" ? Yt(n) : gt(String(n)).fullStr;
@@ -1728,8 +1728,8 @@ const $e = It(function({
1728
1728
  max: s,
1729
1729
  step: r = 1,
1730
1730
  precision: p,
1731
- disabled: f = !1,
1732
- readOnly: g = !1,
1731
+ disabled: g = !1,
1732
+ readOnly: f = !1,
1733
1733
  placeholder: h,
1734
1734
  autoFocus: a,
1735
1735
  size: y = "middle",
@@ -1792,7 +1792,7 @@ const $e = It(function({
1792
1792
  );
1793
1793
  }, Y = dt(() => Ot(s), [s]), tt = dt(() => Ot(u), [u]), At = dt(() => !Y || x.isInvalidate() ? !1 : Y.lessEquals(x), [Y, x]), zt = dt(() => !tt || x.isInvalidate() ? !1 : x.lessEquals(tt), [tt, x]), [Ft] = Le(L.current, M), jt = (d) => Y && !d.lessEquals(Y) ? Y : tt && !tt.lessEquals(d) ? tt : null, mt = (d) => !jt(d), Ct = (d, z) => {
1794
1794
  let B = d, at = mt(B) || B.isEmpty();
1795
- if (!B.isEmpty() && !z && (B = jt(B) || B, at = !0), !g && !f && at) {
1795
+ if (!B.isEmpty() && !z && (B = jt(B) || B, at = !0), !f && !g && at) {
1796
1796
  const pt = B.toString(), wt = A(pt, z);
1797
1797
  return wt !== void 0 && wt >= 0 && (B = rt(yt(pt, ".", wt)), mt(B) || (B = rt(yt(pt, ".", wt, !0)))), B.equals(x) || (lt(B), c == null || c(B.isEmpty() ? null : B.toNumber()), e === void 0 && K(B, z)), B;
1798
1798
  }
@@ -1847,8 +1847,8 @@ const $e = It(function({
1847
1847
  "bj-input-number",
1848
1848
  `bj-input-number--${y}`,
1849
1849
  M && "bj-input-number--focused",
1850
- f && "bj-input-number--disabled",
1851
- g && "bj-input-number--readonly",
1850
+ g && "bj-input-number--disabled",
1851
+ f && "bj-input-number--readonly",
1852
1852
  !I && "bj-input-number--borderless",
1853
1853
  b && `bj-input-number--${b}`,
1854
1854
  re && "bj-input-number--out-of-range",
@@ -1878,8 +1878,8 @@ const $e = It(function({
1878
1878
  "aria-valuenow": x.isInvalidate() ? void 0 : x.toNumber(),
1879
1879
  value: o,
1880
1880
  placeholder: h,
1881
- disabled: f,
1882
- readOnly: g,
1881
+ disabled: g,
1882
+ readOnly: f,
1883
1883
  autoFocus: a,
1884
1884
  onChange: Vt,
1885
1885
  onFocus: te,
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./BInputNumber-DBhnkgUy.js");exports.BInputNumber=o.BInputNumber;exports.BuCategoryDropdown=o.BuCategoryDropdown;exports.BuEmptyInputBox=o.BuEmptyInputBox;exports.BuIcon=o.BuIcon;exports.BuInput=o.BuInput;exports.BuModal=o.BuModal;exports.BuProductField=o.BuProductField;exports.BuSwitch=o.BuSwitch;exports.ConfirmTooltip=o.ConfirmTooltip;exports.ContentTooltip=o.ContentTooltip;exports.FileCard=o.FileCard;exports.Pagination=o.Pagination;exports.ProgressTooltip=o.ProgressTooltip;exports.SkuInputCard=o.SkuInputCard;exports.TooltipWrapper=o.TooltipWrapper;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./BInputNumber-BZagCIlS.js");exports.BInputNumber=o.BInputNumber;exports.BuCategoryDropdown=o.BuCategoryDropdown;exports.BuEmptyInputBox=o.BuEmptyInputBox;exports.BuIcon=o.BuIcon;exports.BuInput=o.BuInput;exports.BuModal=o.BuModal;exports.BuProductField=o.BuProductField;exports.BuSwitch=o.BuSwitch;exports.ConfirmTooltip=o.ConfirmTooltip;exports.ContentTooltip=o.ContentTooltip;exports.FileCard=o.FileCard;exports.Pagination=o.Pagination;exports.ProgressTooltip=o.ProgressTooltip;exports.SkuInputCard=o.SkuInputCard;exports.TooltipWrapper=o.TooltipWrapper;
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { B as s, a as t, b as u, c as p, d as r, e as i, f as n, g as B, C as e, h as d, F as l, P as C, i as I, S as T, T as c } from "./BInputNumber-DRQMC_Un.mjs";
1
+ import { B as s, a as t, b as u, c as p, d as r, e as i, f as n, g as B, C as e, h as d, F as l, P as C, i as I, S as T, T as c } from "./BInputNumber-BcsY5snY.mjs";
2
2
  export {
3
3
  s as BInputNumber,
4
4
  t as BuCategoryDropdown,