@memobit/libs 3.8.1 → 3.8.3

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,22 +1,22 @@
1
1
  import './DatePicker.css';
2
2
  import { Icon as H } from "../Icon/Icon2.js";
3
- import { Tooltip as Y } from "../Tooltip/Tooltip2.js";
3
+ import { Tooltip as E } from "../Tooltip/Tooltip2.js";
4
4
  import { APP_DATE_FORMAT as Z, formatDate as l } from "../../helpers/Datetime.js";
5
5
  import { Calendar as O } from "../Calendar/Calendar2.js";
6
6
  import { TimePicker as ee } from "../TimePicker/TimePicker2.js";
7
7
  /* empty css */
8
- import { useCallback as te, useEffect as x, useRef as E, useState as D } from "react";
9
- import { Fragment as ne, jsx as i, jsxs as h } from "react/jsx-runtime";
8
+ import { useCallback as te, useEffect as x, useRef as L, useState as D } from "react";
9
+ import { Fragment as ne, jsx as r, jsxs as h } from "react/jsx-runtime";
10
10
  import { createPortal as re } from "react-dom";
11
- var me = ({ value: t, onChange: g, mode: s = "single", withTime: f = !1, timeFormat: L = "24h", withSeconds: w = !1, withClock: M = !1, clockSize: P = 208, minuteStep: I = 1, dateFormat: _ = Z, placeholder: z = "Select date...", disabled: b = !1, clearable: F = !0, autoClose: N = !0, alwaysOpen: r = !1, ...C }) => {
12
- const [j, u] = D(!1), [k, S] = D({
11
+ var me = ({ value: t, onChange: g, mode: s = "single", withTime: f = !1, timeFormat: M = "24h", withSeconds: w = !1, withClock: P = !1, clockSize: I = 208, minuteStep: z = 1, dateFormat: _ = Z, placeholder: F = "Select date...", disabled: b = !1, clearable: j = !0, autoClose: N = !0, alwaysOpen: i = !1, ...C }) => {
12
+ const [B, u] = D(!1), [k, S] = D({
13
13
  hours: 0,
14
14
  minutes: 0,
15
15
  seconds: 0
16
- }), [B, p] = D(null), [q, $] = D({
16
+ }), [q, p] = D(null), [y, $] = D({
17
17
  position: "fixed",
18
18
  visibility: "hidden"
19
- }), m = E(null), c = E(null);
19
+ }), m = L(null), c = L(null);
20
20
  x(() => {
21
21
  f && t instanceof Date && S({
22
22
  hours: t.getHours(),
@@ -24,26 +24,26 @@ var me = ({ value: t, onChange: g, mode: s = "single", withTime: f = !1, timeFor
24
24
  seconds: t.getSeconds()
25
25
  });
26
26
  }, [t, f]);
27
- const o = r ? !b : j;
27
+ const o = i ? !b : B;
28
28
  x(() => {
29
- if (r) return;
29
+ if (i) return;
30
30
  const e = (n) => {
31
31
  o && m.current && c.current && !m.current.contains(n.target) && !c.current.contains(n.target) && (p(null), u(!1));
32
32
  };
33
33
  return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
34
- }, [r, o]);
34
+ }, [i, o]);
35
35
  const a = te(() => {
36
- if (r || !o || !m.current || !c.current) return;
37
- const e = m.current.getBoundingClientRect(), n = c.current.getBoundingClientRect(), d = 16, A = 8, Q = window.innerHeight - e.bottom - d, T = e.top - d, U = Q < n.height && T > n.height ? e.top - n.height - A : e.bottom + A, V = Math.max(d, Math.min(U, window.innerHeight - n.height - d)), X = Math.max(d, Math.min(e.left, window.innerWidth - n.width - d));
36
+ if (i || !o || !m.current || !c.current) return;
37
+ const e = m.current.getBoundingClientRect(), n = c.current.getBoundingClientRect(), d = 16, A = 8, T = window.innerHeight - e.bottom - d, U = e.top - d, V = T < n.height && U > n.height ? e.top - n.height - A : e.bottom + A, X = Math.max(d, Math.min(V, window.innerHeight - n.height - d)), Y = Math.max(d, Math.min(e.left, window.innerWidth - n.width - d));
38
38
  $({
39
39
  position: "fixed",
40
- top: `${V}px`,
41
- left: `${X}px`,
40
+ top: `${X}px`,
41
+ left: `${Y}px`,
42
42
  zIndex: 1100
43
43
  });
44
- }, [r, o]);
44
+ }, [i, o]);
45
45
  x(() => {
46
- if (r || !o) {
46
+ if (i || !o) {
47
47
  $({
48
48
  position: "fixed",
49
49
  visibility: "hidden"
@@ -57,48 +57,48 @@ var me = ({ value: t, onChange: g, mode: s = "single", withTime: f = !1, timeFor
57
57
  cancelAnimationFrame(e), n.disconnect(), window.removeEventListener("resize", a), window.removeEventListener("scroll", a, !0);
58
58
  };
59
59
  }, [
60
- r,
60
+ i,
61
61
  o,
62
62
  a
63
63
  ]);
64
- const y = () => {
64
+ const W = () => {
65
65
  if (!t) return "";
66
66
  if (s === "single" && t instanceof Date) {
67
67
  const e = l(t, _);
68
68
  return f ? `${e} ${w ? l(t, "HH:mm:ss") : l(t, "HH:mm")}` : e;
69
69
  }
70
70
  return s === "range" && t && "start" in t ? `${l(t.start, _)} - ${l(t.end, _)}` : s === "multiple" && Array.isArray(t) ? t.map((e) => l(e, _)).join(", ") : "";
71
- }, W = (e) => {
71
+ }, G = (e) => {
72
72
  if (!f || !(e instanceof Date)) {
73
- g?.(e), N && s !== "multiple" && !r && u(!1);
73
+ g?.(e), N && s !== "multiple" && !i && u(!1);
74
74
  return;
75
75
  }
76
76
  const n = new Date(e);
77
- n.setHours(k.hours, k.minutes, k.seconds), g?.(n), N && !r && u(!1);
78
- }, G = (e) => {
77
+ n.setHours(k.hours, k.minutes, k.seconds), g?.(n), N && !i && u(!1);
78
+ }, J = (e) => {
79
79
  if (S(e), !(t instanceof Date)) return;
80
80
  const n = new Date(t);
81
81
  n.setHours(e.hours, e.minutes, e.seconds), g?.(n);
82
- }, J = (e) => {
82
+ }, K = (e) => {
83
83
  e.stopPropagation(), p(null), g?.(void 0);
84
- }, K = () => {
84
+ }, Q = () => {
85
85
  p(null), u(!1);
86
- }, R = y(), v = () => /* @__PURE__ */ h(ne, { children: [/* @__PURE__ */ i(O, {
86
+ }, R = W(), v = () => /* @__PURE__ */ h(ne, { children: [/* @__PURE__ */ r(O, {
87
87
  ...C,
88
88
  mode: s,
89
89
  value: t,
90
- onChange: W,
91
- rangeStart: s === "range" ? B : C.rangeStart,
90
+ onChange: G,
91
+ rangeStart: s === "range" ? q : C.rangeStart,
92
92
  onRangeStartChange: s === "range" ? p : C.onRangeStartChange
93
- }), f && s === "single" && t instanceof Date && /* @__PURE__ */ i("div", {
93
+ }), f && s === "single" && t instanceof Date && /* @__PURE__ */ r("div", {
94
94
  className: "datepicker__time",
95
- children: /* @__PURE__ */ i(ee, {
96
- clockSize: P,
97
- format: L,
98
- minuteStep: I,
99
- onChange: G,
95
+ children: /* @__PURE__ */ r(ee, {
96
+ clockSize: I,
97
+ format: M,
98
+ minuteStep: z,
99
+ onChange: J,
100
100
  value: k,
101
- withClock: M,
101
+ withClock: P,
102
102
  withSeconds: w
103
103
  })
104
104
  })] });
@@ -108,40 +108,42 @@ var me = ({ value: t, onChange: g, mode: s = "single", withTime: f = !1, timeFor
108
108
  ref: m,
109
109
  className: `datepicker__input ${b ? "datepicker__input--disabled" : ""} ${o ? "datepicker__input--open" : ""}`,
110
110
  onClick: () => {
111
- b || r || (o && p(null), u(!o));
111
+ b || i || (o && p(null), u(!o));
112
112
  },
113
- children: [/* @__PURE__ */ i("span", {
113
+ children: [/* @__PURE__ */ r("span", {
114
114
  className: `datepicker__value ${R ? "" : "datepicker__value--placeholder"}`,
115
- children: R || z
115
+ children: R || F
116
116
  }), /* @__PURE__ */ h("div", {
117
117
  className: "datepicker__actions",
118
- children: [F && R && /* @__PURE__ */ i(Y, {
118
+ children: [j && R && /* @__PURE__ */ r(E, {
119
119
  title: "Clear",
120
- children: /* @__PURE__ */ i("button", {
120
+ children: /* @__PURE__ */ r("button", {
121
121
  type: "button",
122
122
  className: "datepicker__clear",
123
- onClick: J,
123
+ onClick: K,
124
124
  children: "×"
125
125
  })
126
- }), /* @__PURE__ */ i("span", {
126
+ }), /* @__PURE__ */ r("span", {
127
127
  className: "datepicker__icon",
128
- children: /* @__PURE__ */ i(H, { name: "calendar" })
128
+ children: /* @__PURE__ */ r(H, { name: "calendar" })
129
129
  })]
130
130
  })]
131
- }), o && (r ? /* @__PURE__ */ i("div", {
131
+ }), o && (i ? /* @__PURE__ */ r("div", {
132
132
  ref: c,
133
133
  className: "datepicker__dropdown datepicker__dropdown--inline",
134
134
  children: v()
135
135
  }) : re(/* @__PURE__ */ h("div", {
136
136
  ref: c,
137
137
  className: "datepicker__dropdown",
138
- style: q,
139
- children: [/* @__PURE__ */ i("button", {
140
- type: "button",
141
- className: "datepicker__dropdown-close",
142
- onClick: K,
138
+ style: y,
139
+ children: [/* @__PURE__ */ r(E, {
143
140
  title: "Close",
144
- children: /* @__PURE__ */ i(H, { name: "clear" })
141
+ children: /* @__PURE__ */ r("button", {
142
+ type: "button",
143
+ className: "datepicker__dropdown-close",
144
+ onClick: Q,
145
+ children: /* @__PURE__ */ r(H, { name: "clear" })
146
+ })
145
147
  }), v()]
146
148
  }), document.body))]
147
149
  });
@@ -23,7 +23,7 @@ var r = (i) => {
23
23
  const o = {
24
24
  ...i,
25
25
  lib: d,
26
- libBuildNumber: 491,
26
+ libBuildNumber: 3,
27
27
  libCommit: n,
28
28
  libBuildDate: t
29
29
  };
package/dist/index.d.ts CHANGED
@@ -1072,7 +1072,7 @@ export declare interface DataViewColumn<T> {
1072
1072
  minWidth?: number;
1073
1073
  hideInCard?: boolean;
1074
1074
  hideInTable?: boolean;
1075
- /** Hide this column only on mobile breakpoint (not when cards are used on desktop). */
1075
+ /** Hide this column only on mobile breakpoint, in both table and card views (not when cards are used on desktop). */
1076
1076
  hideInMobile?: boolean;
1077
1077
  }
1078
1078
 
@@ -1,36 +1,36 @@
1
- // Universal body painting + sizing. Consumed via themes.scss so every memobit
2
- // app picks it up automatically.
3
- //
4
- // Why this lives here:
5
- // Theme backgrounds are gradients (multi-stop linear/radial). If the body is
6
- // shorter than the viewport during initial render — empty content, loading
7
- // state — the gradient gets tiled vertically by default, producing visible
8
- // horizontal banding. `min-height: 100vh` ensures the body is at least as tall
9
- // as the viewport so the gradient renders at full size on first paint;
10
- // `background-repeat: no-repeat` is a defensive guard for edge cases (zoom,
11
- // tall viewport with short content after HMR).
12
- //
13
- // Do NOT use the `background` shorthand in consumer App.scss — it resets
14
- // `background-repeat` to its initial `repeat` value and re-introduces the
15
- // banding. Set `background-image` long-hand if a per-project override is
16
- // needed; otherwise omit and let this rule own it.
17
-
18
- html,
19
- body {
20
- background: var(--body-background);
21
- background-repeat: no-repeat;
22
- margin: 0;
23
- padding: 0;
24
- min-height: 100vh;
25
- }
26
-
27
- // Ambient glow overlay — themes opt in via `--body-background-glow`. Pinned to
28
- // the viewport so it stays put on scroll; z-index: -1 keeps it behind app content.
29
- body::before {
30
- content: '';
31
- position: fixed;
32
- inset: 0;
33
- z-index: -1;
34
- background: var(--body-background-glow, none);
35
- pointer-events: none;
36
- }
1
+ // Universal body painting + sizing. Consumed via themes.scss so every memobit
2
+ // app picks it up automatically.
3
+ //
4
+ // Why this lives here:
5
+ // Theme backgrounds are gradients (multi-stop linear/radial). If the body is
6
+ // shorter than the viewport during initial render — empty content, loading
7
+ // state — the gradient gets tiled vertically by default, producing visible
8
+ // horizontal banding. `min-height: 100vh` ensures the body is at least as tall
9
+ // as the viewport so the gradient renders at full size on first paint;
10
+ // `background-repeat: no-repeat` is a defensive guard for edge cases (zoom,
11
+ // tall viewport with short content after HMR).
12
+ //
13
+ // Do NOT use the `background` shorthand in consumer App.scss — it resets
14
+ // `background-repeat` to its initial `repeat` value and re-introduces the
15
+ // banding. Set `background-image` long-hand if a per-project override is
16
+ // needed; otherwise omit and let this rule own it.
17
+
18
+ html,
19
+ body {
20
+ background: var(--body-background);
21
+ background-repeat: no-repeat;
22
+ margin: 0;
23
+ padding: 0;
24
+ min-height: 100vh;
25
+ }
26
+
27
+ // Ambient glow overlay — themes opt in via `--body-background-glow`. Pinned to
28
+ // the viewport so it stays put on scroll; z-index: -1 keeps it behind app content.
29
+ body::before {
30
+ content: '';
31
+ position: fixed;
32
+ inset: 0;
33
+ z-index: -1;
34
+ background: var(--body-background-glow, none);
35
+ pointer-events: none;
36
+ }
@@ -1,72 +1,72 @@
1
- .note-container-effect {
2
- font-size: var(--font-size-md);
3
- line-height: 1.6;
4
- padding: var(--spacing-16);
5
- border-radius: var(--spacing-12);
6
- border-left: var(--spacing-2) solid var(--note-container-effect-border-left-color);
7
- background-color: var(--note-container-effect-background-color);
8
- color: var(--note-container-effect-color);
9
- }
10
-
11
- .infuse-effect {
12
- border-width: var(--spacing-1);
13
- border-style: solid;
14
- transition: all 0.3s;
15
- position: relative;
16
-
17
- &::before {
18
- content: '';
19
- position: absolute;
20
- top: 0;
21
- left: 0;
22
- background: var(--infuse-effect-before-background);
23
- width: var(--spacing-4);
24
- height: 100%;
25
- opacity: 0;
26
- transition: opacity 0.3s;
27
- }
28
-
29
- &:hover {
30
- transform: translateY(-5px);
31
- border-color: var(--infuse-effect-hover-border-color);
32
- box-shadow: 0 var(--spacing-12) var(--spacing-24) var(--infuse-effect-hover-box-shadow-color);
33
-
34
- &::before {
35
- opacity: 1;
36
- }
37
- }
38
- }
39
-
40
- .up-lift-effect {
41
- border-width: var(--spacing-1);
42
- border-style: solid;
43
- box-shadow: 0 var(--spacing-4) var(--spacing-12) var(--up-lift-effect-box-shadow-color);
44
- transition: all 0.3s ease;
45
- position: relative;
46
-
47
- &::before {
48
- content: '';
49
- position: absolute;
50
- top: 0;
51
- left: 0;
52
- width: 5px;
53
- height: 100%;
54
- background: var(--up-lift-effect-before-background);
55
- }
56
-
57
- &:hover {
58
- transform: translateY(-5px);
59
- border-color: var(--up-lift-effect-hover-border-color);
60
- box-shadow: 0 var(--spacing-12) var(--spacing-24) var(--up-lift-effect-hover-box-shadow-color);
61
- }
62
- }
63
-
64
- .glow-effect {
65
- transition: 0.3s;
66
-
67
- &:hover {
68
- box-shadow: var(--glow-box-shadow-color);
69
- transform: translateY(-2px);
70
- border-color: var(--glow-hover-border-color);
71
- }
72
- }
1
+ .note-container-effect {
2
+ font-size: var(--font-size-md);
3
+ line-height: 1.6;
4
+ padding: var(--spacing-16);
5
+ border-radius: var(--spacing-12);
6
+ border-left: var(--spacing-2) solid var(--note-container-effect-border-left-color);
7
+ background-color: var(--note-container-effect-background-color);
8
+ color: var(--note-container-effect-color);
9
+ }
10
+
11
+ .infuse-effect {
12
+ border-width: var(--spacing-1);
13
+ border-style: solid;
14
+ transition: all 0.3s;
15
+ position: relative;
16
+
17
+ &::before {
18
+ content: '';
19
+ position: absolute;
20
+ top: 0;
21
+ left: 0;
22
+ background: var(--infuse-effect-before-background);
23
+ width: var(--spacing-4);
24
+ height: 100%;
25
+ opacity: 0;
26
+ transition: opacity 0.3s;
27
+ }
28
+
29
+ &:hover {
30
+ transform: translateY(-5px);
31
+ border-color: var(--infuse-effect-hover-border-color);
32
+ box-shadow: 0 var(--spacing-12) var(--spacing-24) var(--infuse-effect-hover-box-shadow-color);
33
+
34
+ &::before {
35
+ opacity: 1;
36
+ }
37
+ }
38
+ }
39
+
40
+ .up-lift-effect {
41
+ border-width: var(--spacing-1);
42
+ border-style: solid;
43
+ box-shadow: 0 var(--spacing-4) var(--spacing-12) var(--up-lift-effect-box-shadow-color);
44
+ transition: all 0.3s ease;
45
+ position: relative;
46
+
47
+ &::before {
48
+ content: '';
49
+ position: absolute;
50
+ top: 0;
51
+ left: 0;
52
+ width: 5px;
53
+ height: 100%;
54
+ background: var(--up-lift-effect-before-background);
55
+ }
56
+
57
+ &:hover {
58
+ transform: translateY(-5px);
59
+ border-color: var(--up-lift-effect-hover-border-color);
60
+ box-shadow: 0 var(--spacing-12) var(--spacing-24) var(--up-lift-effect-hover-box-shadow-color);
61
+ }
62
+ }
63
+
64
+ .glow-effect {
65
+ transition: 0.3s;
66
+
67
+ &:hover {
68
+ box-shadow: var(--glow-box-shadow-color);
69
+ transform: translateY(-2px);
70
+ border-color: var(--glow-hover-border-color);
71
+ }
72
+ }
@@ -1,30 +1,30 @@
1
- :root {
2
- --scrollbar-size: 6px;
3
- --scrollbar-track-color: transparent;
4
- --scrollbar-thumb-color: var(--delimiter-color, rgba(128, 128, 128, 0.45));
5
- --scrollbar-thumb-hover-color: var(--body-color-muted, rgba(128, 128, 128, 0.65));
6
- --scrollbar-radius: var(--radius-full, 9999px);
7
- }
8
-
9
- * {
10
- scrollbar-color: var(--scrollbar-thumb-color) var(--scrollbar-track-color);
11
- scrollbar-width: thin;
12
- }
13
-
14
- *::-webkit-scrollbar {
15
- width: var(--scrollbar-size);
16
- height: var(--scrollbar-size);
17
- }
18
-
19
- *::-webkit-scrollbar-track {
20
- background: var(--scrollbar-track-color);
21
- }
22
-
23
- *::-webkit-scrollbar-thumb {
24
- background: var(--scrollbar-thumb-color);
25
- border-radius: var(--scrollbar-radius);
26
- }
27
-
28
- *::-webkit-scrollbar-thumb:hover {
29
- background: var(--scrollbar-thumb-hover-color);
30
- }
1
+ :root {
2
+ --scrollbar-size: 6px;
3
+ --scrollbar-track-color: transparent;
4
+ --scrollbar-thumb-color: var(--delimiter-color, rgba(128, 128, 128, 0.45));
5
+ --scrollbar-thumb-hover-color: var(--body-color-muted, rgba(128, 128, 128, 0.65));
6
+ --scrollbar-radius: var(--radius-full, 9999px);
7
+ }
8
+
9
+ * {
10
+ scrollbar-color: var(--scrollbar-thumb-color) var(--scrollbar-track-color);
11
+ scrollbar-width: thin;
12
+ }
13
+
14
+ *::-webkit-scrollbar {
15
+ width: var(--scrollbar-size);
16
+ height: var(--scrollbar-size);
17
+ }
18
+
19
+ *::-webkit-scrollbar-track {
20
+ background: var(--scrollbar-track-color);
21
+ }
22
+
23
+ *::-webkit-scrollbar-thumb {
24
+ background: var(--scrollbar-thumb-color);
25
+ border-radius: var(--scrollbar-radius);
26
+ }
27
+
28
+ *::-webkit-scrollbar-thumb:hover {
29
+ background: var(--scrollbar-thumb-hover-color);
30
+ }