@hybr1d-tech/charizard 0.7.166 → 0.7.167
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/hybr1d-ui.js +35 -32
- package/dist/hybr1d-ui.umd.cjs +11 -11
- package/dist/index.d.ts +2 -1
- package/package.json +1 -1
package/dist/hybr1d-ui.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import './style.css';
|
|
2
2
|
import * as q from "react";
|
|
3
|
-
import y2, { useState as T0, useEffect as d1, useLayoutEffect as ve,
|
|
4
|
-
import { differenceInCalendarDays as be, parseISO as u6, addMonths as l3, format as c3, isDate as xe, isSameDay as Q4,
|
|
3
|
+
import y2, { useState as T0, useEffect as d1, useLayoutEffect as ve, useContext as ge, useRef as g2, createContext as qe, useMemo as F2, useCallback as L0, Component as fe, Fragment as s4, forwardRef as i6, createElement as o4 } from "react";
|
|
4
|
+
import { differenceInCalendarDays as be, parseISO as u6, addMonths as l3, format as c3, isDate as xe, isSameDay as Q4, isBefore as K4, addYears as _e, addDays as Ce } from "date-fns";
|
|
5
5
|
import b, { clsx as V2 } from "clsx";
|
|
6
6
|
import { toast as x3 } from "react-toastify";
|
|
7
7
|
import Ie from "react-inlinesvg";
|
|
@@ -18,7 +18,7 @@ import { useReactTable as d6, getCoreRowModel as m6, flexRender as E1 } from "@t
|
|
|
18
18
|
import * as s3 from "@zag-js/dialog";
|
|
19
19
|
import * as o3 from "@zag-js/popover";
|
|
20
20
|
import h6, { components as r2 } from "react-select";
|
|
21
|
-
import {
|
|
21
|
+
import { keyframes as Ae, jsx as Z, css as p6 } from "@emotion/react";
|
|
22
22
|
import { createPortal as v6 } from "react-dom";
|
|
23
23
|
import * as p1 from "@zag-js/radio-group";
|
|
24
24
|
import { Tooltip as Ne } from "react-tooltip";
|
|
@@ -4009,8 +4009,8 @@ var l7 = function(l) {
|
|
|
4009
4009
|
marginBottom: i.menuGutter,
|
|
4010
4010
|
marginTop: i.menuGutter
|
|
4011
4011
|
});
|
|
4012
|
-
}, t7 = /* @__PURE__ */
|
|
4013
|
-
var c = l.children, n = l.minMenuHeight, a = l.maxMenuHeight, s = l.menuPlacement, r = l.menuPosition, i = l.menuShouldScrollIntoView, o = l.theme, u =
|
|
4012
|
+
}, t7 = /* @__PURE__ */ qe(null), $c = function(l) {
|
|
4013
|
+
var c = l.children, n = l.minMenuHeight, a = l.maxMenuHeight, s = l.menuPlacement, r = l.menuPosition, i = l.menuShouldScrollIntoView, o = l.theme, u = ge(t7) || {}, m = u.setPortalPlacement, d = g2(null), p = T0(a), h = k0(p, 2), _ = h[0], x = h[1], g = T0(null), C = k0(g, 2), v = C[0], I = C[1], z = o.spacing.controlHeight;
|
|
4014
4014
|
return h4(function() {
|
|
4015
4015
|
var N = d.current;
|
|
4016
4016
|
if (N) {
|
|
@@ -5103,7 +5103,9 @@ function _s(e) {
|
|
|
5103
5103
|
m(g, C);
|
|
5104
5104
|
}, [m]), _ = L0(function(g) {
|
|
5105
5105
|
if (g) {
|
|
5106
|
-
var C = Gc ? {
|
|
5106
|
+
var C = Gc ? {
|
|
5107
|
+
passive: !1
|
|
5108
|
+
} : !1;
|
|
5107
5109
|
g.addEventListener("wheel", d, C), g.addEventListener("touchstart", p, C), g.addEventListener("touchmove", h, C);
|
|
5108
5110
|
}
|
|
5109
5111
|
}, [h, p, d]), x = L0(function(g) {
|
|
@@ -9258,36 +9260,37 @@ function Cx({
|
|
|
9258
9260
|
isError: d,
|
|
9259
9261
|
showOutsideDays: p = !0,
|
|
9260
9262
|
trigger: h,
|
|
9261
|
-
|
|
9263
|
+
id: _,
|
|
9264
|
+
...x
|
|
9262
9265
|
}) {
|
|
9263
|
-
const { monthYear:
|
|
9266
|
+
const { monthYear: g, setMonthYear: C } = G4();
|
|
9264
9267
|
q.useEffect(() => {
|
|
9265
|
-
e && !isNaN(new Date(e).getTime()) &&
|
|
9268
|
+
e && !isNaN(new Date(e).getTime()) && C({
|
|
9266
9269
|
month: new Date(e).getMonth(),
|
|
9267
9270
|
year: new Date(e).getFullYear()
|
|
9268
9271
|
});
|
|
9269
9272
|
}, [e]);
|
|
9270
|
-
const
|
|
9273
|
+
const v = q.useMemo(() => {
|
|
9271
9274
|
if (e) {
|
|
9272
|
-
const
|
|
9273
|
-
return console.log("Parsed date:",
|
|
9274
|
-
}
|
|
9275
|
-
}, [e]),
|
|
9276
|
-
if (!
|
|
9277
|
-
const
|
|
9278
|
-
return console.log("Formatted display date:",
|
|
9279
|
-
}, [
|
|
9280
|
-
var
|
|
9281
|
-
if (!
|
|
9275
|
+
const y = xe(e) ? e : u6(e);
|
|
9276
|
+
return console.log("Parsed date:", y), y;
|
|
9277
|
+
}
|
|
9278
|
+
}, [e]), I = q.useMemo(() => {
|
|
9279
|
+
if (!v) return "Pick a date";
|
|
9280
|
+
const y = c3(v, a);
|
|
9281
|
+
return console.log("Formatted display date:", y), y;
|
|
9282
|
+
}, [v, a]), z = q.useRef(null), N = (y) => {
|
|
9283
|
+
var A;
|
|
9284
|
+
if (!y) {
|
|
9282
9285
|
l("");
|
|
9283
9286
|
return;
|
|
9284
9287
|
}
|
|
9285
|
-
const
|
|
9286
|
-
l(
|
|
9288
|
+
const w = c3(y, "yyyy-MM-dd");
|
|
9289
|
+
l(w), (A = z == null ? void 0 : z.current) == null || A.click();
|
|
9287
9290
|
};
|
|
9288
9291
|
return /* @__PURE__ */ t.jsx("div", { className: b(o0.datePicker), style: u, children: /* @__PURE__ */ t.jsxs(A3, { placement: "bottom", children: [
|
|
9289
9292
|
/* @__PURE__ */ t.jsxs(w3, { openOnHover: !1, children: [
|
|
9290
|
-
h ? /* @__PURE__ */ t.jsx("div", { ref:
|
|
9293
|
+
h ? /* @__PURE__ */ t.jsx("div", { ref: z, id: _, children: h }) : n === "form" ? /* @__PURE__ */ t.jsx(
|
|
9291
9294
|
X0,
|
|
9292
9295
|
{
|
|
9293
9296
|
size: "adapt",
|
|
@@ -9300,8 +9303,8 @@ function Cx({
|
|
|
9300
9303
|
borderColor: d || s ? "var(--status-danger)" : void 0,
|
|
9301
9304
|
height: "32px"
|
|
9302
9305
|
},
|
|
9303
|
-
children: /* @__PURE__ */ t.jsxs("div", { className: o0.formButton, ref:
|
|
9304
|
-
/* @__PURE__ */ t.jsx("span", { style: { color:
|
|
9306
|
+
children: /* @__PURE__ */ t.jsxs("div", { className: o0.formButton, ref: z, id: _, children: [
|
|
9307
|
+
/* @__PURE__ */ t.jsx("span", { style: { color: v ? void 0 : "var(--text-secondary)" }, children: I }),
|
|
9305
9308
|
/* @__PURE__ */ t.jsx(M, { path: f4, width: 20, height: 20 })
|
|
9306
9309
|
] })
|
|
9307
9310
|
}
|
|
@@ -9312,7 +9315,7 @@ function Cx({
|
|
|
9312
9315
|
size: "adapt",
|
|
9313
9316
|
disabled: r,
|
|
9314
9317
|
customStyles: { cursor: r ? "not-allowed" : "pointer", height: "32px" },
|
|
9315
|
-
children: /* @__PURE__ */ t.jsxs("div", { className: o0.buttonContent, ref:
|
|
9318
|
+
children: /* @__PURE__ */ t.jsxs("div", { className: o0.buttonContent, ref: z, id: _, children: [
|
|
9316
9319
|
/* @__PURE__ */ t.jsx(
|
|
9317
9320
|
M,
|
|
9318
9321
|
{
|
|
@@ -9322,7 +9325,7 @@ function Cx({
|
|
|
9322
9325
|
spanClassName: o0.calendarIconSpan
|
|
9323
9326
|
}
|
|
9324
9327
|
),
|
|
9325
|
-
/* @__PURE__ */ t.jsx("span", { style: { color:
|
|
9328
|
+
/* @__PURE__ */ t.jsx("span", { style: { color: v ? void 0 : "var(--text-secondary)" }, children: I })
|
|
9326
9329
|
] })
|
|
9327
9330
|
}
|
|
9328
9331
|
),
|
|
@@ -9366,13 +9369,13 @@ function Cx({
|
|
|
9366
9369
|
Nav: oh
|
|
9367
9370
|
},
|
|
9368
9371
|
mode: c,
|
|
9369
|
-
defaultMonth:
|
|
9370
|
-
selected:
|
|
9371
|
-
onSelect:
|
|
9372
|
+
defaultMonth: v,
|
|
9373
|
+
selected: v,
|
|
9374
|
+
onSelect: N,
|
|
9372
9375
|
numberOfMonths: 1,
|
|
9373
9376
|
disabled: r ? !0 : i,
|
|
9374
|
-
month: new Date(
|
|
9375
|
-
...
|
|
9377
|
+
month: new Date(g.year, g.month),
|
|
9378
|
+
...x
|
|
9376
9379
|
}
|
|
9377
9380
|
)
|
|
9378
9381
|
}
|