loon-bulma-react 2026.0.43 → 2026.0.44

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/index.js CHANGED
@@ -13705,13 +13705,13 @@ function v_({ className: e = "", children: n, onScroll: r, iconScrollLeft: i = h
13705
13705
  },
13706
13706
  ...l,
13707
13707
  children: [
13708
- /* @__PURE__ */ b("button", {
13708
+ f.visible && /* @__PURE__ */ b("button", {
13709
13709
  type: "button",
13710
13710
  className: "h-scroll is-left-scroll",
13711
13711
  onClick: () => h("left"),
13712
13712
  "aria-label": o,
13713
13713
  title: o,
13714
- disabled: !f.visible || !f.canScrollLeft,
13714
+ disabled: !f.canScrollLeft,
13715
13715
  style: {
13716
13716
  top: `${f.top}px`,
13717
13717
  left: `${f.left - 20}px`
@@ -13719,13 +13719,13 @@ function v_({ className: e = "", children: n, onScroll: r, iconScrollLeft: i = h
13719
13719
  children: /* @__PURE__ */ b(Eo, { icon: i })
13720
13720
  }),
13721
13721
  n,
13722
- /* @__PURE__ */ b("button", {
13722
+ f.visible && /* @__PURE__ */ b("button", {
13723
13723
  type: "button",
13724
13724
  className: "h-scroll is-right-scroll",
13725
13725
  onClick: () => h("right"),
13726
13726
  "aria-label": s,
13727
13727
  title: s,
13728
- disabled: !f.visible || !f.canScrollRight,
13728
+ disabled: !f.canScrollRight,
13729
13729
  style: {
13730
13730
  top: `${f.top}px`,
13731
13731
  left: `${f.right + 20}px`
@@ -16713,22 +16713,22 @@ var Ly = 200, Ry = Object.freeze({
16713
16713
  ESCAPE_KEY: 27
16714
16714
  });
16715
16715
  function zy({ value: e, options: n, id: r, name: i, label: a, required: o = !1, showRequiredOnLabel: s = !1, errorMessage: c = "", infoMessage: l = "", alignment: u, size: d, direction: f, placeholder: p, helpTag: m, disabled: h = !1, loading: g = !1, autofocus: _ = !1, iconRight: v = "visible", labelHidden: S = !1, icon: C = Wo, infoData: w, className: T, color: E, onValueChanged: D, onChange: O, onFocus: k, onBlur: A, onKeyDown: j, onKeyUp: M, onSearch: N = (e, t) => e.toLowerCase().indexOf(JSON.stringify(t).toLowerCase()) !== -1, formatLabel: P = (e) => typeof e == "string" || typeof e == "number" || typeof e == "boolean" ? `${e}` : JSON.stringify(e), formatValue: F = (e) => /* @__PURE__ */ b(y, { children: typeof e == "string" || typeof e == "number" || typeof e == "boolean" ? `${e}` : JSON.stringify(e) }), formatOption: I = (e, t) => /* @__PURE__ */ b(y, { children: typeof e == "string" || typeof e == "number" || typeof e == "boolean" ? `${e}` : JSON.stringify(e) }) }) {
16716
- let [L, R] = t.useState(we(n)), [ee, z] = t.useState(P(e)), [B, V] = t.useReducer(Vy, By), [te, ne] = t.useState(!1), [H, re] = t.useState(!1), [U, ie] = t.useState(-1), [ae, oe] = t.useState(!1), [se, ce] = t.useState(!1), { defaults: le } = t.useContext(lh), { scheme: ue } = Ne(), de = d ?? le.input.size, fe = f ?? le.input.direction, pe = u ?? le.input.alignment, me = typeof c == "string" ? c : c({
16716
+ let [L, R] = t.useState(Ce(n)), [ee, z] = t.useState(P(e)), [B, V] = t.useReducer(Vy, By), [te, ne] = t.useState(!1), [H, re] = t.useState(!1), [U, ie] = t.useState(-1), [ae, oe] = t.useState(!1), [se, ce] = t.useState(!1), { defaults: le } = t.useContext(lh), ue = d ?? le.input.size, de = f ?? le.input.direction, fe = u ?? le.input.alignment, pe = typeof c == "string" ? c : c({
16717
16717
  value: ee,
16718
16718
  touched: ae,
16719
16719
  focused: B.focused,
16720
16720
  required: o,
16721
16721
  disabled: h,
16722
16722
  readonly: !1
16723
- }), he = typeof l == "string" ? l : l(ee), ge = t.useRef(null), _e = t.useRef(null);
16724
- Iy(B.focusIndex, ge, _e);
16725
- let ve = "input is-fullwidth";
16726
- ve += $d(de), ve += Zd(pe), T && (ve += ` ${T}`), g && (ve += " is-loading"), E ? ve += Kd(E, !1) : me.length > 0 && (ve += " is-danger");
16727
- let ye = "output input";
16728
- ye += $d(de), ye += Zd(pe), h && (ye += " is-disabled"), E ? ye += Kd(E, !1) : me.length > 0 && (ye += " is-danger");
16729
- let [be, xe, Se] = Jd({
16723
+ }), me = typeof l == "string" ? l : l(ee), he = t.useRef(null), ge = t.useRef(null);
16724
+ Iy(B.focusIndex, he, ge);
16725
+ let _e = "input is-fullwidth";
16726
+ _e += $d(ue), _e += Zd(fe), T && (_e += ` ${T}`), g && (_e += " is-loading"), E ? _e += Kd(E, !1) : pe.length > 0 && (_e += " is-danger");
16727
+ let ve = "output input";
16728
+ ve += $d(ue), ve += Zd(fe), h && (ve += " is-disabled"), E ? ve += Kd(E, !1) : pe.length > 0 && (ve += " is-danger");
16729
+ let [ye, be, xe] = Jd({
16730
16730
  icon: C,
16731
- error: me,
16731
+ error: pe,
16732
16732
  showInfo: ph(B.focused, se),
16733
16733
  inputId: r ?? i,
16734
16734
  infoData: w,
@@ -16742,7 +16742,7 @@ function zy({ value: e, options: n, id: r, name: i, label: a, required: o = !1,
16742
16742
  type: "select"
16743
16743
  });
16744
16744
  t.useEffect(() => {
16745
- R(we(n));
16745
+ R(Ce(n));
16746
16746
  }, [n]), t.useEffect(() => {
16747
16747
  B.focused || z(P(e));
16748
16748
  let t = e ? L.findIndex((t) => t.key === P(e)) : -1;
@@ -16751,10 +16751,10 @@ function zy({ value: e, options: n, id: r, name: i, label: a, required: o = !1,
16751
16751
  focusIndex: t
16752
16752
  }), ie(t);
16753
16753
  }, [e]), t.useEffect(() => {
16754
- let e = ge.current?.offsetParent?.getBoundingClientRect(), t = window.innerHeight - (e?.top ?? 0);
16754
+ let e = he.current?.offsetParent?.getBoundingClientRect(), t = window.innerHeight - (e?.top ?? 0);
16755
16755
  re(Ly > t && (e?.top ?? 0) > t);
16756
16756
  }, [B.focused]);
16757
- let Ce = t.useMemo(() => ({
16757
+ let Se = t.useMemo(() => ({
16758
16758
  position: "absolute",
16759
16759
  width: "100%",
16760
16760
  opacity: +!!B.focused,
@@ -16767,13 +16767,14 @@ function zy({ value: e, options: n, id: r, name: i, label: a, required: o = !1,
16767
16767
  marginBottom: H ? "5px" : void 0,
16768
16768
  marginTop: H ? void 0 : "5px"
16769
16769
  }), [H, B]);
16770
- function we(e) {
16770
+ function Ce(e) {
16771
16771
  return e.map((e, t) => ({
16772
16772
  key: P(e),
16773
- value: I(e, t)
16773
+ value: I(e, t),
16774
+ disabled: !1
16774
16775
  }));
16775
16776
  }
16776
- function Te(t) {
16777
+ function we(t) {
16777
16778
  z(P(e)), w && !te ? setTimeout(() => {
16778
16779
  let e = document.getElementById(r ?? i);
16779
16780
  document.activeElement !== e && (V({
@@ -16785,13 +16786,13 @@ function zy({ value: e, options: n, id: r, name: i, label: a, required: o = !1,
16785
16786
  isFocused: !1
16786
16787
  }));
16787
16788
  }
16788
- function Ee(e) {
16789
+ function Te(e) {
16789
16790
  ae || oe(!0), k && k(e, m), V({
16790
16791
  type: "toggleFocus",
16791
16792
  isFocused: !0
16792
16793
  });
16793
16794
  }
16794
- function De() {
16795
+ function Ee() {
16795
16796
  n.forEach((e, t) => {
16796
16797
  let r = P(e);
16797
16798
  r === L[B.focusIndex]?.key && (V({
@@ -16800,14 +16801,14 @@ function zy({ value: e, options: n, id: r, name: i, label: a, required: o = !1,
16800
16801
  }), ie(t), z(r), D && n[t] && D(n[t]));
16801
16802
  });
16802
16803
  }
16803
- function Oe() {
16804
+ function De() {
16804
16805
  V({
16805
16806
  type: "toggleFocus",
16806
16807
  isFocused: !1
16807
- }), R(L), De();
16808
+ }), R(L), Ee();
16808
16809
  }
16809
- function ke(e) {
16810
- let t = ge.current, r = B.focusIndex;
16810
+ function Oe(e) {
16811
+ let t = he.current, r = B.focusIndex;
16811
16812
  switch (e.keyCode) {
16812
16813
  case Ry.DOWN_ARROW:
16813
16814
  e.preventDefault(), B.focused ? B.focusIndex >= n.length - 1 ? (r = 0, t.scrollTop = 0) : r = B.focusIndex + 1 : V({
@@ -16816,7 +16817,7 @@ function zy({ value: e, options: n, id: r, name: i, label: a, required: o = !1,
16816
16817
  }), V({
16817
16818
  type: "setFocusIndex",
16818
16819
  focusIndex: r
16819
- }), ge.current = t;
16820
+ }), he.current = t;
16820
16821
  break;
16821
16822
  case Ry.UP_ARROW:
16822
16823
  e.preventDefault(), B.focused ? B.focusIndex <= 0 ? (r = n.length - 1, t && (t.scrollTop = t.scrollHeight)) : r = B.focusIndex - 1 : V({
@@ -16825,10 +16826,10 @@ function zy({ value: e, options: n, id: r, name: i, label: a, required: o = !1,
16825
16826
  }), V({
16826
16827
  type: "setFocusIndex",
16827
16828
  focusIndex: r
16828
- }), ge.current = t;
16829
+ }), he.current = t;
16829
16830
  break;
16830
16831
  case Ry.ENTER_KEY:
16831
- e.preventDefault(), B.focusIndex > -1 && B.focusIndex < n.length && Oe();
16832
+ e.preventDefault(), B.focusIndex > -1 && B.focusIndex < n.length && De();
16832
16833
  break;
16833
16834
  case Ry.ESCAPE_KEY:
16834
16835
  e.target.blur(), V({
@@ -16839,13 +16840,13 @@ function zy({ value: e, options: n, id: r, name: i, label: a, required: o = !1,
16839
16840
  }
16840
16841
  j && j(e);
16841
16842
  }
16842
- function Ae(e) {
16843
- e.length === 0 ? R(we(n)) : R(we(n.filter((t) => N(e, t))));
16843
+ function ke(e) {
16844
+ e.length === 0 ? R(Ce(n)) : R(Ce(n.filter((t) => N(e, t))));
16844
16845
  }
16845
- function je(e) {
16846
- ae || oe(!0), O && O(e), z(e.target.value), Ae(e.target.value);
16846
+ function Ae(e) {
16847
+ ae || oe(!0), O && O(e), z(e.target.value), ke(e.target.value);
16847
16848
  }
16848
- function Me() {
16849
+ function je() {
16849
16850
  V({
16850
16851
  type: "toggleFocus",
16851
16852
  isFocused: !0
@@ -16854,7 +16855,7 @@ function zy({ value: e, options: n, id: r, name: i, label: a, required: o = !1,
16854
16855
  focusIndex: L.findIndex((e) => e.key === ee.toString())
16855
16856
  });
16856
16857
  }
16857
- function Pe(e) {
16858
+ function Me(e) {
16858
16859
  V({
16859
16860
  type: "setFocusIndex",
16860
16861
  focusIndex: e
@@ -16863,11 +16864,11 @@ function zy({ value: e, options: n, id: r, name: i, label: a, required: o = !1,
16863
16864
  return /* @__PURE__ */ x(Sh, {
16864
16865
  inputId: r ?? i,
16865
16866
  label: a ?? i ?? r,
16866
- direction: fe,
16867
+ direction: de,
16867
16868
  required: o,
16868
- size: de,
16869
+ size: ue,
16869
16870
  labelHidden: S,
16870
- controlClassName: be,
16871
+ controlClassName: ye,
16871
16872
  showRequiredOnLabel: s,
16872
16873
  setHovered: ce,
16873
16874
  children: [
@@ -16877,20 +16878,20 @@ function zy({ value: e, options: n, id: r, name: i, label: a, required: o = !1,
16877
16878
  role: "combobox",
16878
16879
  placeholder: p,
16879
16880
  value: ee,
16880
- className: ve,
16881
+ className: _e,
16881
16882
  name: i,
16882
16883
  id: r ?? i,
16883
16884
  disabled: h,
16884
16885
  autoFocus: _,
16885
- onChange: je,
16886
- onClick: Me,
16886
+ onChange: Ae,
16887
+ onClick: je,
16887
16888
  onKeyUp: M,
16888
- onKeyDown: ke,
16889
- onFocus: Ee,
16890
- onBlur: Te
16889
+ onKeyDown: Oe,
16890
+ onFocus: Te,
16891
+ onBlur: we
16891
16892
  }),
16892
16893
  !B.focused && /* @__PURE__ */ b("output", {
16893
- className: ye,
16894
+ className: ve,
16894
16895
  onClick: () => {
16895
16896
  document.getElementById(r ?? i)?.focus();
16896
16897
  },
@@ -16898,35 +16899,35 @@ function zy({ value: e, options: n, id: r, name: i, label: a, required: o = !1,
16898
16899
  }),
16899
16900
  /* @__PURE__ */ b("div", {
16900
16901
  className: "bulma-box",
16901
- style: Ce,
16902
- ref: ge,
16902
+ style: Se,
16903
+ ref: he,
16903
16904
  onMouseEnter: () => ne(!0),
16904
16905
  onMouseLeave: () => ne(!1),
16905
16906
  children: /* @__PURE__ */ b("ul", {
16906
- ref: _e,
16907
+ ref: ge,
16907
16908
  className: "combobox-list",
16908
16909
  children: L.map((e, t) => {
16909
16910
  let n = "combobox-listitem";
16910
- return t === U && (n += " is-selected"), /* @__PURE__ */ b("li", {
16911
+ return t === U && (n += " is-selected"), e.disabled && (n += " is-disabled"), /* @__PURE__ */ b("li", {
16911
16912
  className: n,
16912
- onClick: () => Oe(),
16913
+ onClick: () => De(),
16913
16914
  onMouseDown: (e) => e.preventDefault(),
16914
- onMouseEnter: () => Pe(t),
16915
+ onMouseEnter: () => Me(t),
16915
16916
  children: e.value
16916
16917
  }, e.key);
16917
16918
  })
16918
16919
  })
16919
16920
  }),
16920
- xe,
16921
- Se
16921
+ be,
16922
+ xe
16922
16923
  ] }),
16923
- me.length > 0 && /* @__PURE__ */ b("p", {
16924
+ pe.length > 0 && /* @__PURE__ */ b("p", {
16924
16925
  className: "help is-danger",
16925
- children: me
16926
+ children: pe
16926
16927
  }),
16927
- he.length > 0 && /* @__PURE__ */ b("p", {
16928
+ me.length > 0 && /* @__PURE__ */ b("p", {
16928
16929
  className: "help is-info",
16929
- children: he
16930
+ children: me
16930
16931
  })
16931
16932
  ]
16932
16933
  });
@@ -5,26 +5,67 @@
5
5
  @use 'bulma/sass/utilities/mixins' as mx;
6
6
  @use 'bulma/sass/form/shared' as frm;
7
7
 
8
+ $cmb-item-h: cv.getVar('scheme-h');
9
+ $cmb-item-s: cv.getVar('scheme-s');
10
+ $cmb-item-l: cv.getVar('scheme-main-l');
11
+ $cmb-item-background-l: cv.getVar('scheme-main-l');
12
+ $cmb-item-background-l-delta: 0%;
13
+ $cmb-item-hover-background-l-delta: cv.getVar('hover-background-l-delta');
14
+ $cmb-item-active-background-l-delta: cv.getVar('active-background-l-delta');
15
+ $cmb-item-color-l: cv.getVar('text-l');
16
+ $cmb-item-radius: cv.getVar('radius-small') !default;
17
+ $cmb-item-selected-h: cv.getVar('link-h');
18
+ $cmb-item-selected-s: cv.getVar('link-s');
19
+ $cmb-item-selected-l: cv.getVar('link-l');
20
+ $cmb-item-selected-background-l: cv.getVar('link-l');
21
+ $cmb-item-selected-color-l: cv.getVar('link-invert-l');
22
+
8
23
  ul.combobox-list,
9
24
  ol.combobox-list {
10
25
  list-style-type: none;
11
26
 
27
+ @include cv.register-vars(
28
+ (
29
+ 'cmb-item-h': #{$cmb-item-h},
30
+ 'cmb-item-s': #{$cmb-item-s},
31
+ 'cmb-item-l': #{$cmb-item-l},
32
+ 'cmb-item-background-l': #{$cmb-item-background-l},
33
+ 'cmb-item-background-l-delta': #{$cmb-item-background-l-delta},
34
+ 'cmb-item-hover-background-l-delta': #{$cmb-item-hover-background-l-delta},
35
+ 'cmb-item-active-background-l-delta': #{$cmb-item-active-background-l-delta},
36
+ 'cmb-item-color-l': #{$cmb-item-color-l},
37
+ 'cmb-item-radius': #{$cmb-item-radius},
38
+ 'cmb-item-selected-h': #{$cmb-item-selected-h},
39
+ 'cmb-item-selected-s': #{$cmb-item-selected-s},
40
+ 'cmb-item-selected-l': #{$cmb-item-selected-l},
41
+ 'cmb-item-selected-background-l': #{$cmb-item-selected-background-l},
42
+ 'cmb-item-selected-color-l': #{$cmb-item-selected-color-l},
43
+ )
44
+ );
45
+
12
46
  .combobox-listitem {
13
47
  padding: 3px 5px;
48
+ background-color: hsl(#{cv.getVar('cmb-item-h')}, #{cv.getVar('cmb-item-s')}, calc(#{cv.getVar('cmb-item-background-l')} + #{cv.getVar('cmb-item-background-l-delta')}));
49
+ color: hsl(#{cv.getVar('cmb-item-h')}, #{cv.getVar('cmb-item-s')}, #{cv.getVar('cmb-item-color-l')});
14
50
 
15
51
  &:hover {
16
- background-color: dv.$info;
17
- color: white;
52
+ @include cv.register-vars(
53
+ (
54
+ 'cmb-item-background-l-delta': #{cv.getVar('cmb-item-hover-background-l-delta')},
55
+ )
56
+ );
18
57
  }
19
58
 
20
59
  &.is-selected {
21
- background-color: dv.$info;
22
- color: white;
23
- font-weight: bolder;
24
- &:hover {
25
- background-color: dv.$info;
26
- color: white;
27
- }
60
+ @include cv.register-vars(
61
+ (
62
+ 'cmb-item-h': #{cv.getVar('cmb-item-selected-h')},
63
+ 'cmb-item-s': #{cv.getVar('cmb-item-selected-s')},
64
+ 'cmb-item-l': #{cv.getVar('cmb-item-selected-l')},
65
+ 'cmb-item-background-l': #{cv.getVar('cmb-item-selected-background-l')},
66
+ 'cmb-item-color-l': #{cv.getVar('cmb-item-selected-color-l')},
67
+ )
68
+ );
28
69
  }
29
70
  }
30
71
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "loon-bulma-react",
3
3
  "private": false,
4
- "version": "2026.0.43",
4
+ "version": "2026.0.44",
5
5
  "description": "Bulma &amp; React componenten voor Loon Salarissoftware",
6
6
  "type": "module",
7
7
  "license": "MIT",
@@ -92,7 +92,7 @@
92
92
  "eslint-plugin-standard": "^5.0.0",
93
93
  "eslint-plugin-testing-library": "^7.16.0",
94
94
  "globals": "^17.6.0",
95
- "happy-dom": "^20.9.0",
95
+ "happy-dom": "^20.10.1",
96
96
  "prettier": "^3.8.3",
97
97
  "react": "^19.2.7",
98
98
  "react-dom": "^19.2.7",