@solibo/solibo-ui 2.0.0 → 2.0.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.
@@ -1,12 +1,12 @@
1
1
  import { jsx as a, jsxs as F, Fragment as V } from "react/jsx-runtime";
2
- import { t as d } from "../../classix-DG18itHa.js";
2
+ import { t as g } from "../../classix-DG18itHa.js";
3
3
  import e from "react";
4
- import '../../assets/index50.css';function g(t) {
4
+ import '../../assets/index50.css';function k(t) {
5
5
  return e.isValidElement(t) && t.type === e.Fragment;
6
6
  }
7
7
  function x(t, n = []) {
8
8
  return e.Children.forEach(t, (s) => {
9
- g(s) ? x(s.props.children, n) : n.push(s);
9
+ k(s) ? x(s.props.children, n) : n.push(s);
10
10
  }), n;
11
11
  }
12
12
  function E(t, {
@@ -21,9 +21,9 @@ function E(t, {
21
21
  }, l);
22
22
  });
23
23
  }
24
- const k = "_controls_1i7ll_1", C = "_horizontal_1i7ll_6", j = "_list_1i7ll_17", v = "_columns_1i7ll_57", L = "_compact_1i7ll_74", o = {
25
- controls: k,
26
- horizontal: C,
24
+ const C = "_controls_1i7ll_1", d = "_horizontal_1i7ll_6", j = "_list_1i7ll_17", v = "_columns_1i7ll_57", L = "_compact_1i7ll_74", o = {
25
+ controls: C,
26
+ horizontal: d,
27
27
  list: j,
28
28
  columns: v,
29
29
  compact: L
@@ -42,7 +42,7 @@ function w({
42
42
  style: z,
43
43
  ...f
44
44
  }) {
45
- const _ = Number.isFinite(s) ? Math.max(1, Math.floor(s)) : 1, p = d(n, o.list, _ > 1 && o.columns, i && o.horizontal, m && o.compact), y = {
45
+ const _ = Number.isFinite(s) ? Math.max(1, Math.floor(s)) : 1, p = g(n, o.list, _ > 1 && o.columns, i && o.horizontal, m && o.compact), y = {
46
46
  ...z,
47
47
  "--list-columns": _
48
48
  }, h = r ? /* @__PURE__ */ a("ol", { className: p, ref: (c) => N(u, c), style: y, ...f, children: E(t) }) : /* @__PURE__ */ a("ul", { className: p, ref: (c) => N(u, c), style: y, ...f, children: E(t) });
@@ -40,7 +40,7 @@ function ht({
40
40
  onChangeOrder: A,
41
41
  ...S
42
42
  }) {
43
- const y = Number.isFinite(i) ? Math.max(1, Math.floor(i)) : 1, _ = $(() => L.Children.toArray(s), [s]), a = u(-1), N = $(() => typeof window < "u" && (navigator.maxTouchPoints > 0 || window.matchMedia("(pointer: coarse)").matches), []), p = u(!1), C = u(null), w = u(null), x = u(null), I = u(0), E = u(null), m = u(null), M = u((o) => o.preventDefault()).current, [R, V] = q({
43
+ const y = Number.isFinite(i) ? Math.max(1, Math.floor(i)) : 1, C = $(() => L.Children.toArray(s), [s]), a = u(-1), N = $(() => typeof window < "u" && (navigator.maxTouchPoints > 0 || window.matchMedia("(pointer: coarse)").matches), []), p = u(!1), I = u(null), w = u(null), x = u(null), _ = u(0), E = u(null), m = u(null), M = u((o) => o.preventDefault()).current, [R, V] = q({
44
44
  borderRadius: "0px",
45
45
  height: 0,
46
46
  width: 0,
@@ -51,8 +51,8 @@ function ht({
51
51
  "--sortable-placeholder-radius": R.borderRadius,
52
52
  "--sortable-placeholder-width": `${R.width}px`
53
53
  }, H = (o, t) => {
54
- if (t < 0 || t >= _.length || o === t) return;
55
- const c = _.slice(), [e] = c.splice(o, 1);
54
+ if (t < 0 || t >= C.length || o === t) return;
55
+ const c = C.slice(), [e] = c.splice(o, 1);
56
56
  c.splice(t, 0, e), A(c.map((n, r) => ({
57
57
  id: String(L.isValidElement(n) ? n.props["data-id"] ?? `idx-${r}` : `idx-${r}`),
58
58
  weight: c.length - 1 - r
@@ -72,7 +72,7 @@ function ht({
72
72
  }
73
73
  return document.scrollingElement instanceof HTMLElement ? document.scrollingElement : null;
74
74
  }, P = (o = !1) => {
75
- T(), B(), window.removeEventListener("touchmove", M), E.current = null, p.current = !1, C.current = null, x.current = null, I.current = o ? Date.now() + 500 : 0, a.current = -1, D(null);
75
+ T(), B(), window.removeEventListener("touchmove", M), E.current = null, p.current = !1, I.current = null, x.current = null, _.current = o ? Date.now() + 500 : 0, a.current = -1, D(null);
76
76
  }, Y = (o, t) => {
77
77
  a.current = o, V(lt(t)), D(o);
78
78
  }, G = (o) => o instanceof Element && !!o.closest('button, a, input, textarea, select, option, [role="button"], [contenteditable="true"]'), z = (o, t, c) => {
@@ -85,7 +85,7 @@ function ht({
85
85
  const c = (n = document.elementFromPoint(o, t)) == null ? void 0 : n.closest("[data-sortable-index]");
86
86
  if (!c) return;
87
87
  const e = z(c, Number(c.dataset.sortableIndex), t);
88
- e !== null && (C.current = e, D(e));
88
+ e !== null && (I.current = e, D(e));
89
89
  }, J = (o) => {
90
90
  const t = Z(o);
91
91
  if (!t) return;
@@ -122,15 +122,15 @@ function ht({
122
122
  };
123
123
  return Q(() => () => {
124
124
  T(), B(), window.removeEventListener("touchmove", M);
125
- }, [M]), /* @__PURE__ */ j(et, { className: W(v, b.sortable, y > 1 && b.columns), columns: i, ordered: !0, style: O, ...S, "data-component": "sortable", children: _.map((o, t) => {
125
+ }, [M]), /* @__PURE__ */ j(et, { className: W(v, b.sortable, y > 1 && b.columns), columns: i, ordered: !0, style: O, ...S, "data-component": "sortable", children: C.map((o, t) => {
126
126
  const c = L.isValidElement(o) ? o.key : null;
127
127
  return /* @__PURE__ */ j("li", { "data-sortable-index": t, onClickCapture: (e) => {
128
- I.current <= Date.now() || (e.preventDefault(), e.stopPropagation(), I.current = 0);
128
+ _.current <= Date.now() || (e.preventDefault(), e.stopPropagation(), _.current = 0);
129
129
  }, className: W(g !== null && g > t - 10 && g < t + 10 && b.pseudo, g === t && a.current < t && b["target-below"], g === t && a.current > t && b["target-above"], a.current === t && b.dragging), onContextMenu: (e) => {
130
130
  (p.current || w.current !== null) && e.preventDefault();
131
131
  }, onTouchStart: (e) => {
132
132
  if (l || G(e.target)) return;
133
- I.current = 0;
133
+ _.current = 0;
134
134
  const n = e.touches[0];
135
135
  if (!n) return;
136
136
  const r = e.currentTarget;
@@ -138,7 +138,7 @@ function ht({
138
138
  x: n.clientX,
139
139
  y: n.clientY
140
140
  }, T(), w.current = setTimeout(() => {
141
- Y(t, r), p.current = !0, C.current = t, E.current = {
141
+ Y(t, r), p.current = !0, I.current = t, E.current = {
142
142
  x: n.clientX,
143
143
  y: n.clientY
144
144
  }, window.addEventListener("touchmove", M, {
@@ -165,7 +165,7 @@ function ht({
165
165
  return;
166
166
  }
167
167
  e.preventDefault();
168
- const n = a.current, r = C.current;
168
+ const n = a.current, r = I.current;
169
169
  n >= 0 && r !== null && n !== r && H(n, r), P(!0);
170
170
  }, onTouchCancel: () => P(), draggable: !l && !N, onDragEnd: () => k(), onDragOver: (e) => {
171
171
  e.preventDefault(), e.dataTransfer.dropEffect = "move";
@@ -182,7 +182,7 @@ function ht({
182
182
  const n = a.current, r = g;
183
183
  n < 0 || r === null || n === r || (H(n, r), k());
184
184
  }, "data-component": "sortable", children: /* @__PURE__ */ j(U.Provider, { value: {
185
- canMoveDown: t < _.length - 1,
185
+ canMoveDown: t < C.length - 1,
186
186
  canMoveUp: t > 0,
187
187
  index: t,
188
188
  moveDown: () => H(t, t + 1),
package/dist/tokens.json CHANGED
@@ -363,7 +363,7 @@
363
363
  },
364
364
  "com.solibo": {
365
365
  "packageName": "@solibo/solibo-ui",
366
- "packageVersion": "2.0.0"
366
+ "packageVersion": "2.0.1"
367
367
  }
368
368
  },
369
369
  "$name": "TEST Solibo UI Tokens (Copy)",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@solibo/solibo-ui",
3
- "version": "2.0.0",
3
+ "version": "2.0.1",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "dev": "pnpm run tokens:build && vite build --watch",
@@ -42,13 +42,13 @@
42
42
  "dist"
43
43
  ],
44
44
  "dependencies": {
45
- "@lexical/html": "^0.21.0",
46
- "@lexical/link": "^0.21.0",
47
- "@lexical/list": "^0.21.0",
48
- "@lexical/react": "^0.21.0",
49
- "@lexical/utils": "^0.21.0",
45
+ "@lexical/html": "0.52.0",
46
+ "@lexical/link": "0.52.0",
47
+ "@lexical/list": "0.52.0",
48
+ "@lexical/react": "0.52.0",
49
+ "@lexical/utils": "0.52.0",
50
50
  "classix": "^2.2.8",
51
- "lexical": "^0.21.0",
51
+ "lexical": "0.52.0",
52
52
  "sanitize-html": "^2.17.1"
53
53
  },
54
54
  "devDependencies": {