@almadar/ui 5.18.0 → 5.18.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.
- package/dist/avl/index.cjs +5 -4
- package/dist/avl/index.js +5 -4
- package/dist/components/atoms/DayCell.d.ts +3 -2
- package/dist/components/index.cjs +5 -4
- package/dist/components/index.js +5 -4
- package/dist/providers/index.cjs +5 -4
- package/dist/providers/index.js +5 -4
- package/dist/runtime/index.cjs +5 -4
- package/dist/runtime/index.js +5 -4
- package/package.json +3 -3
package/dist/avl/index.cjs
CHANGED
|
@@ -9831,10 +9831,11 @@ function DayCell({
|
|
|
9831
9831
|
onClick,
|
|
9832
9832
|
className
|
|
9833
9833
|
}) {
|
|
9834
|
+
const safeDate = date instanceof Date && !Number.isNaN(date.getTime()) ? date : /* @__PURE__ */ new Date();
|
|
9834
9835
|
const handleClick = React98.useCallback(() => {
|
|
9835
|
-
onClick?.(
|
|
9836
|
-
}, [onClick,
|
|
9837
|
-
const dayAbbr = DAY_ABBREVIATIONS[
|
|
9836
|
+
onClick?.(safeDate);
|
|
9837
|
+
}, [onClick, safeDate]);
|
|
9838
|
+
const dayAbbr = DAY_ABBREVIATIONS[safeDate.getDay()];
|
|
9838
9839
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
9839
9840
|
Box,
|
|
9840
9841
|
{
|
|
@@ -9865,7 +9866,7 @@ function DayCell({
|
|
|
9865
9866
|
"h-8 w-8 mx-auto items-center justify-center",
|
|
9866
9867
|
isToday && "bg-blue-600 text-white"
|
|
9867
9868
|
),
|
|
9868
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", className: "font-semibold", children:
|
|
9869
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", className: "font-semibold", children: safeDate.getDate() })
|
|
9869
9870
|
}
|
|
9870
9871
|
)
|
|
9871
9872
|
]
|
package/dist/avl/index.js
CHANGED
|
@@ -9782,10 +9782,11 @@ function DayCell({
|
|
|
9782
9782
|
onClick,
|
|
9783
9783
|
className
|
|
9784
9784
|
}) {
|
|
9785
|
+
const safeDate = date instanceof Date && !Number.isNaN(date.getTime()) ? date : /* @__PURE__ */ new Date();
|
|
9785
9786
|
const handleClick = useCallback(() => {
|
|
9786
|
-
onClick?.(
|
|
9787
|
-
}, [onClick,
|
|
9788
|
-
const dayAbbr = DAY_ABBREVIATIONS[
|
|
9787
|
+
onClick?.(safeDate);
|
|
9788
|
+
}, [onClick, safeDate]);
|
|
9789
|
+
const dayAbbr = DAY_ABBREVIATIONS[safeDate.getDay()];
|
|
9789
9790
|
return /* @__PURE__ */ jsxs(
|
|
9790
9791
|
Box,
|
|
9791
9792
|
{
|
|
@@ -9816,7 +9817,7 @@ function DayCell({
|
|
|
9816
9817
|
"h-8 w-8 mx-auto items-center justify-center",
|
|
9817
9818
|
isToday && "bg-blue-600 text-white"
|
|
9818
9819
|
),
|
|
9819
|
-
children: /* @__PURE__ */ jsx(Typography, { variant: "body", className: "font-semibold", children:
|
|
9820
|
+
children: /* @__PURE__ */ jsx(Typography, { variant: "body", className: "font-semibold", children: safeDate.getDate() })
|
|
9820
9821
|
}
|
|
9821
9822
|
)
|
|
9822
9823
|
]
|
|
@@ -6,8 +6,9 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import React from "react";
|
|
8
8
|
export interface DayCellProps {
|
|
9
|
-
/** The date this cell represents
|
|
10
|
-
|
|
9
|
+
/** The date this cell represents. Optional at the dynamic render edge: an
|
|
10
|
+
* unbound `@config.date` arrives as `undefined`, so the cell falls back to today. */
|
|
11
|
+
date?: Date;
|
|
11
12
|
/** Whether this date is today */
|
|
12
13
|
isToday?: boolean;
|
|
13
14
|
/** Called when the day is clicked */
|
|
@@ -4587,10 +4587,11 @@ function DayCell({
|
|
|
4587
4587
|
onClick,
|
|
4588
4588
|
className
|
|
4589
4589
|
}) {
|
|
4590
|
+
const safeDate = date instanceof Date && !Number.isNaN(date.getTime()) ? date : /* @__PURE__ */ new Date();
|
|
4590
4591
|
const handleClick = React80.useCallback(() => {
|
|
4591
|
-
onClick?.(
|
|
4592
|
-
}, [onClick,
|
|
4593
|
-
const dayAbbr = DAY_ABBREVIATIONS[
|
|
4592
|
+
onClick?.(safeDate);
|
|
4593
|
+
}, [onClick, safeDate]);
|
|
4594
|
+
const dayAbbr = DAY_ABBREVIATIONS[safeDate.getDay()];
|
|
4594
4595
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4595
4596
|
exports.Box,
|
|
4596
4597
|
{
|
|
@@ -4621,7 +4622,7 @@ function DayCell({
|
|
|
4621
4622
|
"h-8 w-8 mx-auto items-center justify-center",
|
|
4622
4623
|
isToday && "bg-blue-600 text-white"
|
|
4623
4624
|
),
|
|
4624
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "body", className: "font-semibold", children:
|
|
4625
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "body", className: "font-semibold", children: safeDate.getDate() })
|
|
4625
4626
|
}
|
|
4626
4627
|
)
|
|
4627
4628
|
]
|
package/dist/components/index.js
CHANGED
|
@@ -4538,10 +4538,11 @@ function DayCell({
|
|
|
4538
4538
|
onClick,
|
|
4539
4539
|
className
|
|
4540
4540
|
}) {
|
|
4541
|
+
const safeDate = date instanceof Date && !Number.isNaN(date.getTime()) ? date : /* @__PURE__ */ new Date();
|
|
4541
4542
|
const handleClick = useCallback(() => {
|
|
4542
|
-
onClick?.(
|
|
4543
|
-
}, [onClick,
|
|
4544
|
-
const dayAbbr = DAY_ABBREVIATIONS[
|
|
4543
|
+
onClick?.(safeDate);
|
|
4544
|
+
}, [onClick, safeDate]);
|
|
4545
|
+
const dayAbbr = DAY_ABBREVIATIONS[safeDate.getDay()];
|
|
4545
4546
|
return /* @__PURE__ */ jsxs(
|
|
4546
4547
|
Box,
|
|
4547
4548
|
{
|
|
@@ -4572,7 +4573,7 @@ function DayCell({
|
|
|
4572
4573
|
"h-8 w-8 mx-auto items-center justify-center",
|
|
4573
4574
|
isToday && "bg-blue-600 text-white"
|
|
4574
4575
|
),
|
|
4575
|
-
children: /* @__PURE__ */ jsx(Typography, { variant: "body", className: "font-semibold", children:
|
|
4576
|
+
children: /* @__PURE__ */ jsx(Typography, { variant: "body", className: "font-semibold", children: safeDate.getDate() })
|
|
4576
4577
|
}
|
|
4577
4578
|
)
|
|
4578
4579
|
]
|
package/dist/providers/index.cjs
CHANGED
|
@@ -5097,10 +5097,11 @@ function DayCell({
|
|
|
5097
5097
|
onClick,
|
|
5098
5098
|
className
|
|
5099
5099
|
}) {
|
|
5100
|
+
const safeDate = date instanceof Date && !Number.isNaN(date.getTime()) ? date : /* @__PURE__ */ new Date();
|
|
5100
5101
|
const handleClick = React86.useCallback(() => {
|
|
5101
|
-
onClick?.(
|
|
5102
|
-
}, [onClick,
|
|
5103
|
-
const dayAbbr = DAY_ABBREVIATIONS[
|
|
5102
|
+
onClick?.(safeDate);
|
|
5103
|
+
}, [onClick, safeDate]);
|
|
5104
|
+
const dayAbbr = DAY_ABBREVIATIONS[safeDate.getDay()];
|
|
5104
5105
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5105
5106
|
Box,
|
|
5106
5107
|
{
|
|
@@ -5131,7 +5132,7 @@ function DayCell({
|
|
|
5131
5132
|
"h-8 w-8 mx-auto items-center justify-center",
|
|
5132
5133
|
isToday && "bg-blue-600 text-white"
|
|
5133
5134
|
),
|
|
5134
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", className: "font-semibold", children:
|
|
5135
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", className: "font-semibold", children: safeDate.getDate() })
|
|
5135
5136
|
}
|
|
5136
5137
|
)
|
|
5137
5138
|
]
|
package/dist/providers/index.js
CHANGED
|
@@ -5048,10 +5048,11 @@ function DayCell({
|
|
|
5048
5048
|
onClick,
|
|
5049
5049
|
className
|
|
5050
5050
|
}) {
|
|
5051
|
+
const safeDate = date instanceof Date && !Number.isNaN(date.getTime()) ? date : /* @__PURE__ */ new Date();
|
|
5051
5052
|
const handleClick = useCallback(() => {
|
|
5052
|
-
onClick?.(
|
|
5053
|
-
}, [onClick,
|
|
5054
|
-
const dayAbbr = DAY_ABBREVIATIONS[
|
|
5053
|
+
onClick?.(safeDate);
|
|
5054
|
+
}, [onClick, safeDate]);
|
|
5055
|
+
const dayAbbr = DAY_ABBREVIATIONS[safeDate.getDay()];
|
|
5055
5056
|
return /* @__PURE__ */ jsxs(
|
|
5056
5057
|
Box,
|
|
5057
5058
|
{
|
|
@@ -5082,7 +5083,7 @@ function DayCell({
|
|
|
5082
5083
|
"h-8 w-8 mx-auto items-center justify-center",
|
|
5083
5084
|
isToday && "bg-blue-600 text-white"
|
|
5084
5085
|
),
|
|
5085
|
-
children: /* @__PURE__ */ jsx(Typography, { variant: "body", className: "font-semibold", children:
|
|
5086
|
+
children: /* @__PURE__ */ jsx(Typography, { variant: "body", className: "font-semibold", children: safeDate.getDate() })
|
|
5086
5087
|
}
|
|
5087
5088
|
)
|
|
5088
5089
|
]
|
package/dist/runtime/index.cjs
CHANGED
|
@@ -5507,10 +5507,11 @@ function DayCell({
|
|
|
5507
5507
|
onClick,
|
|
5508
5508
|
className
|
|
5509
5509
|
}) {
|
|
5510
|
+
const safeDate = date instanceof Date && !Number.isNaN(date.getTime()) ? date : /* @__PURE__ */ new Date();
|
|
5510
5511
|
const handleClick = React85.useCallback(() => {
|
|
5511
|
-
onClick?.(
|
|
5512
|
-
}, [onClick,
|
|
5513
|
-
const dayAbbr = DAY_ABBREVIATIONS[
|
|
5512
|
+
onClick?.(safeDate);
|
|
5513
|
+
}, [onClick, safeDate]);
|
|
5514
|
+
const dayAbbr = DAY_ABBREVIATIONS[safeDate.getDay()];
|
|
5514
5515
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5515
5516
|
Box,
|
|
5516
5517
|
{
|
|
@@ -5541,7 +5542,7 @@ function DayCell({
|
|
|
5541
5542
|
"h-8 w-8 mx-auto items-center justify-center",
|
|
5542
5543
|
isToday && "bg-blue-600 text-white"
|
|
5543
5544
|
),
|
|
5544
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", className: "font-semibold", children:
|
|
5545
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", className: "font-semibold", children: safeDate.getDate() })
|
|
5545
5546
|
}
|
|
5546
5547
|
)
|
|
5547
5548
|
]
|
package/dist/runtime/index.js
CHANGED
|
@@ -5458,10 +5458,11 @@ function DayCell({
|
|
|
5458
5458
|
onClick,
|
|
5459
5459
|
className
|
|
5460
5460
|
}) {
|
|
5461
|
+
const safeDate = date instanceof Date && !Number.isNaN(date.getTime()) ? date : /* @__PURE__ */ new Date();
|
|
5461
5462
|
const handleClick = useCallback(() => {
|
|
5462
|
-
onClick?.(
|
|
5463
|
-
}, [onClick,
|
|
5464
|
-
const dayAbbr = DAY_ABBREVIATIONS[
|
|
5463
|
+
onClick?.(safeDate);
|
|
5464
|
+
}, [onClick, safeDate]);
|
|
5465
|
+
const dayAbbr = DAY_ABBREVIATIONS[safeDate.getDay()];
|
|
5465
5466
|
return /* @__PURE__ */ jsxs(
|
|
5466
5467
|
Box,
|
|
5467
5468
|
{
|
|
@@ -5492,7 +5493,7 @@ function DayCell({
|
|
|
5492
5493
|
"h-8 w-8 mx-auto items-center justify-center",
|
|
5493
5494
|
isToday && "bg-blue-600 text-white"
|
|
5494
5495
|
),
|
|
5495
|
-
children: /* @__PURE__ */ jsx(Typography, { variant: "body", className: "font-semibold", children:
|
|
5496
|
+
children: /* @__PURE__ */ jsx(Typography, { variant: "body", className: "font-semibold", children: safeDate.getDate() })
|
|
5496
5497
|
}
|
|
5497
5498
|
)
|
|
5498
5499
|
]
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@almadar/ui",
|
|
3
|
-
"version": "5.18.
|
|
3
|
+
"version": "5.18.1",
|
|
4
4
|
"description": "React UI components, hooks, and providers for Almadar",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": [
|
|
@@ -191,7 +191,7 @@
|
|
|
191
191
|
"@types/three": "^0.160.0",
|
|
192
192
|
"@typescript-eslint/parser": "8.56.0",
|
|
193
193
|
"@vitejs/plugin-react": "^4.2.0",
|
|
194
|
-
"@vitest/ui": "^
|
|
194
|
+
"@vitest/ui": "^3.2.6",
|
|
195
195
|
"autoprefixer": "^10.4.0",
|
|
196
196
|
"babel-plugin-react-compiler": "19.0.0-beta-af1b7da-20250417",
|
|
197
197
|
"eslint": "10.0.0",
|
|
@@ -211,7 +211,7 @@
|
|
|
211
211
|
"tsx": "^4.7.0",
|
|
212
212
|
"typescript": "^5.4.0",
|
|
213
213
|
"vite": "^5.2.0",
|
|
214
|
-
"vitest": "^
|
|
214
|
+
"vitest": "^3.2.6"
|
|
215
215
|
},
|
|
216
216
|
"repository": {
|
|
217
217
|
"type": "git",
|