@refraction-ui/react 0.16.0 → 0.16.2
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.cjs +412 -424
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +412 -411
- package/dist/index.js.map +1 -1
- package/dist/internal/date-picker/index.d.cts +3 -1
- package/dist/internal/date-picker/index.d.ts +3 -1
- package/dist/internal/mascot/index.d.ts +46 -0
- package/dist/internal/react-date-picker/index.d.cts +2 -10
- package/dist/internal/react-date-picker/index.d.ts +2 -10
- package/dist/internal/react-mascot/index.d.ts +30 -0
- package/dist/internal/react-slider/index.d.cts +8 -1
- package/dist/internal/react-slider/index.d.ts +8 -1
- package/package.json +2 -1
- package/dist/internal/slider/index.d.cts +0 -4
- package/dist/internal/slider/index.d.ts +0 -4
package/dist/index.cjs
CHANGED
|
@@ -31204,14 +31204,14 @@ function createCalendar(props = {}) {
|
|
|
31204
31204
|
const gridId = generateId("rfr-calendar");
|
|
31205
31205
|
const labelId = generateId("rfr-calendar-label");
|
|
31206
31206
|
function isDateDisabled(date) {
|
|
31207
|
-
if (minDate && date <
|
|
31208
|
-
if (maxDate && date >
|
|
31207
|
+
if (minDate && date < startOfDay(minDate)) return true;
|
|
31208
|
+
if (maxDate && date > endOfDay(maxDate)) return true;
|
|
31209
31209
|
return disabledDates.some((d2) => isSameDay(d2, date));
|
|
31210
31210
|
}
|
|
31211
|
-
function
|
|
31211
|
+
function startOfDay(date) {
|
|
31212
31212
|
return new Date(date.getFullYear(), date.getMonth(), date.getDate());
|
|
31213
31213
|
}
|
|
31214
|
-
function
|
|
31214
|
+
function endOfDay(date) {
|
|
31215
31215
|
return new Date(date.getFullYear(), date.getMonth(), date.getDate(), 23, 59, 59, 999);
|
|
31216
31216
|
}
|
|
31217
31217
|
function buildDays() {
|
|
@@ -36497,6 +36497,360 @@ var InstallPrompt = React11__namespace.forwardRef(
|
|
|
36497
36497
|
);
|
|
36498
36498
|
InstallPrompt.displayName = "InstallPrompt";
|
|
36499
36499
|
|
|
36500
|
+
// ../mascot/dist/index.js
|
|
36501
|
+
function getMascotMoodStyles(mood) {
|
|
36502
|
+
switch (mood) {
|
|
36503
|
+
case "happy":
|
|
36504
|
+
return {
|
|
36505
|
+
"--rfr-mascot-shell": "var(--primary, 138 60% 51%)",
|
|
36506
|
+
"--rfr-mascot-shell-rim": "var(--primary-700, 138 58% 36%)",
|
|
36507
|
+
"--rfr-mascot-belly": "var(--primary-200, 138 60% 83%)",
|
|
36508
|
+
"--rfr-mascot-skin": "var(--primary-400, 138 59% 63%)",
|
|
36509
|
+
"--rfr-mascot-skin-d": "var(--primary-600, 138 58% 43%)",
|
|
36510
|
+
"--rfr-mascot-scute": "var(--sunshine, 42 100% 62%)",
|
|
36511
|
+
"--rfr-mascot-scute-alt": "var(--primary-300, 138 59% 74%)",
|
|
36512
|
+
"--rfr-mascot-cheek": "var(--accent-solid, 26 100% 67%)"
|
|
36513
|
+
};
|
|
36514
|
+
case "think":
|
|
36515
|
+
return {
|
|
36516
|
+
// Indigo / purple tones
|
|
36517
|
+
"--rfr-mascot-shell": "250 65% 55%",
|
|
36518
|
+
"--rfr-mascot-shell-rim": "250 65% 40%",
|
|
36519
|
+
"--rfr-mascot-belly": "250 65% 85%",
|
|
36520
|
+
"--rfr-mascot-skin": "250 65% 72%",
|
|
36521
|
+
"--rfr-mascot-skin-d": "250 65% 62%",
|
|
36522
|
+
"--rfr-mascot-scute": "280 65% 60%",
|
|
36523
|
+
"--rfr-mascot-scute-alt": "280 65% 50%",
|
|
36524
|
+
"--rfr-mascot-cheek": "320 80% 65%"
|
|
36525
|
+
};
|
|
36526
|
+
case "wave":
|
|
36527
|
+
return {
|
|
36528
|
+
// Orange / warm tones
|
|
36529
|
+
"--rfr-mascot-shell": "24 85% 50%",
|
|
36530
|
+
"--rfr-mascot-shell-rim": "24 85% 40%",
|
|
36531
|
+
"--rfr-mascot-belly": "24 85% 85%",
|
|
36532
|
+
"--rfr-mascot-skin": "24 85% 68%",
|
|
36533
|
+
"--rfr-mascot-skin-d": "24 85% 58%",
|
|
36534
|
+
"--rfr-mascot-scute": "160 60% 45%",
|
|
36535
|
+
"--rfr-mascot-scute-alt": "160 60% 35%",
|
|
36536
|
+
"--rfr-mascot-cheek": "15 90% 65%"
|
|
36537
|
+
};
|
|
36538
|
+
}
|
|
36539
|
+
}
|
|
36540
|
+
function startMascotBlinkInterval(onBlinkChange, intervalMs = 4e3, durationMs = 150) {
|
|
36541
|
+
const timer = setInterval(() => {
|
|
36542
|
+
onBlinkChange(true);
|
|
36543
|
+
setTimeout(() => {
|
|
36544
|
+
onBlinkChange(false);
|
|
36545
|
+
}, durationMs);
|
|
36546
|
+
}, intervalMs);
|
|
36547
|
+
return () => {
|
|
36548
|
+
clearInterval(timer);
|
|
36549
|
+
};
|
|
36550
|
+
}
|
|
36551
|
+
function createMascot(props = {}) {
|
|
36552
|
+
const { mood = "happy", animation = "none", size = "md", animate = true } = props;
|
|
36553
|
+
const ariaProps = {
|
|
36554
|
+
role: "img",
|
|
36555
|
+
"aria-label": `Tobi the Tortoise feeling ${mood}`
|
|
36556
|
+
};
|
|
36557
|
+
const dataAttributes = {
|
|
36558
|
+
"data-slot": "mascot",
|
|
36559
|
+
"data-mood": mood,
|
|
36560
|
+
"data-animation": animation,
|
|
36561
|
+
"data-size": size,
|
|
36562
|
+
"data-animate": animate ? "true" : "false"
|
|
36563
|
+
};
|
|
36564
|
+
return {
|
|
36565
|
+
ariaProps,
|
|
36566
|
+
dataAttributes,
|
|
36567
|
+
state: {
|
|
36568
|
+
mood,
|
|
36569
|
+
animation,
|
|
36570
|
+
size,
|
|
36571
|
+
animate
|
|
36572
|
+
},
|
|
36573
|
+
style: getMascotMoodStyles(mood)
|
|
36574
|
+
};
|
|
36575
|
+
}
|
|
36576
|
+
var mascotVariants = cva({
|
|
36577
|
+
base: "inline-block select-none transition-all duration-300",
|
|
36578
|
+
variants: {
|
|
36579
|
+
size: {
|
|
36580
|
+
sm: "w-24 h-auto",
|
|
36581
|
+
md: "w-36 h-auto",
|
|
36582
|
+
lg: "w-48 h-auto",
|
|
36583
|
+
xl: "w-64 h-auto"
|
|
36584
|
+
},
|
|
36585
|
+
animation: {
|
|
36586
|
+
none: "",
|
|
36587
|
+
bounce: "motion-safe:animate-bounce",
|
|
36588
|
+
float: "rfr-mascot-float"
|
|
36589
|
+
}
|
|
36590
|
+
},
|
|
36591
|
+
defaultVariants: {
|
|
36592
|
+
size: "md",
|
|
36593
|
+
animation: "none"
|
|
36594
|
+
}
|
|
36595
|
+
});
|
|
36596
|
+
var Mascot = React11__namespace.forwardRef(
|
|
36597
|
+
({
|
|
36598
|
+
mood = "happy",
|
|
36599
|
+
animation = "none",
|
|
36600
|
+
size = "md",
|
|
36601
|
+
animate = true,
|
|
36602
|
+
animateBobbing,
|
|
36603
|
+
animateBlinking,
|
|
36604
|
+
animateSprout,
|
|
36605
|
+
className,
|
|
36606
|
+
style,
|
|
36607
|
+
...props
|
|
36608
|
+
}, ref) => {
|
|
36609
|
+
const [isBlinking, setIsBlinking] = React11__namespace.useState(false);
|
|
36610
|
+
const shouldBob = animateBobbing ?? animate;
|
|
36611
|
+
const shouldSway = animateSprout ?? animate;
|
|
36612
|
+
const shouldBlink = animateBlinking ?? animate;
|
|
36613
|
+
React11__namespace.useEffect(() => {
|
|
36614
|
+
if (!shouldBlink) {
|
|
36615
|
+
setIsBlinking(false);
|
|
36616
|
+
return;
|
|
36617
|
+
}
|
|
36618
|
+
const cleanup = startMascotBlinkInterval(setIsBlinking);
|
|
36619
|
+
return cleanup;
|
|
36620
|
+
}, [shouldBlink]);
|
|
36621
|
+
const api = createMascot({ mood, animation, size, animate });
|
|
36622
|
+
const combinedStyle = {
|
|
36623
|
+
...api.style,
|
|
36624
|
+
...style
|
|
36625
|
+
};
|
|
36626
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
36627
|
+
"svg",
|
|
36628
|
+
{
|
|
36629
|
+
ref,
|
|
36630
|
+
className: cn("mascot", mascotVariants({ size, animation }), className),
|
|
36631
|
+
viewBox: "0 0 340 300",
|
|
36632
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
36633
|
+
style: combinedStyle,
|
|
36634
|
+
...api.ariaProps,
|
|
36635
|
+
...api.dataAttributes,
|
|
36636
|
+
"data-blinking": isBlinking ? "true" : "false",
|
|
36637
|
+
"data-bobbing": shouldBob ? "true" : "false",
|
|
36638
|
+
"data-sprout": shouldSway ? "true" : "false",
|
|
36639
|
+
"data-waving": animate ? "true" : "false",
|
|
36640
|
+
...props,
|
|
36641
|
+
children: [
|
|
36642
|
+
/* @__PURE__ */ jsxRuntime.jsx("defs", { children: /* @__PURE__ */ jsxRuntime.jsx("style", { children: `
|
|
36643
|
+
/* Base styles and fallback HSL values */
|
|
36644
|
+
svg.mascot {
|
|
36645
|
+
--primary: 138 60% 51%;
|
|
36646
|
+
--primary-200: 138 60% 83%;
|
|
36647
|
+
--primary-300: 138 59% 74%;
|
|
36648
|
+
--primary-400: 138 59% 63%;
|
|
36649
|
+
--primary-600: 138 58% 43%;
|
|
36650
|
+
--primary-700: 138 58% 36%;
|
|
36651
|
+
--primary-800: 138 58% 29%;
|
|
36652
|
+
--primary-900: 138 58% 22%;
|
|
36653
|
+
--primary-950: 139 59% 16%;
|
|
36654
|
+
--sunshine: 42 100% 62%;
|
|
36655
|
+
--accent-solid: 26 100% 67%;
|
|
36656
|
+
|
|
36657
|
+
fill: none;
|
|
36658
|
+
stroke-linecap: round;
|
|
36659
|
+
stroke-linejoin: round;
|
|
36660
|
+
}
|
|
36661
|
+
|
|
36662
|
+
/* Mapping elements to tokens */
|
|
36663
|
+
svg.mascot .shadow {
|
|
36664
|
+
fill: hsl(var(--primary-900) / 0.15);
|
|
36665
|
+
}
|
|
36666
|
+
svg.mascot .stem {
|
|
36667
|
+
stroke: hsl(var(--rfr-mascot-stroke, var(--primary-950)));
|
|
36668
|
+
stroke-width: 3px;
|
|
36669
|
+
fill: none;
|
|
36670
|
+
}
|
|
36671
|
+
svg.mascot .leaf {
|
|
36672
|
+
fill: hsl(var(--rfr-mascot-leaf, var(--primary-400)));
|
|
36673
|
+
stroke: hsl(var(--rfr-mascot-stroke, var(--primary-950)));
|
|
36674
|
+
stroke-width: 3px;
|
|
36675
|
+
}
|
|
36676
|
+
svg.mascot .skin-d {
|
|
36677
|
+
fill: hsl(var(--rfr-mascot-skin-d, var(--primary-400)));
|
|
36678
|
+
stroke: hsl(var(--rfr-mascot-stroke, var(--primary-950)));
|
|
36679
|
+
stroke-width: 3px;
|
|
36680
|
+
}
|
|
36681
|
+
svg.mascot .skin {
|
|
36682
|
+
fill: hsl(var(--rfr-mascot-skin, var(--primary-300)));
|
|
36683
|
+
stroke: hsl(var(--rfr-mascot-stroke, var(--primary-950)));
|
|
36684
|
+
stroke-width: 3px;
|
|
36685
|
+
}
|
|
36686
|
+
svg.mascot .shell-rim {
|
|
36687
|
+
fill: hsl(var(--rfr-mascot-shell-rim, var(--primary-800)));
|
|
36688
|
+
stroke: hsl(var(--rfr-mascot-stroke, var(--primary-950)));
|
|
36689
|
+
stroke-width: 3px;
|
|
36690
|
+
}
|
|
36691
|
+
svg.mascot .shell {
|
|
36692
|
+
fill: hsl(var(--rfr-mascot-shell, var(--primary-600)));
|
|
36693
|
+
stroke: hsl(var(--rfr-mascot-stroke, var(--primary-950)));
|
|
36694
|
+
stroke-width: 3px;
|
|
36695
|
+
}
|
|
36696
|
+
svg.mascot .belly {
|
|
36697
|
+
fill: hsl(var(--rfr-mascot-belly, var(--primary-200)));
|
|
36698
|
+
stroke: hsl(var(--rfr-mascot-stroke, var(--primary-950)));
|
|
36699
|
+
stroke-width: 3px;
|
|
36700
|
+
}
|
|
36701
|
+
svg.mascot .scute {
|
|
36702
|
+
fill: hsl(var(--rfr-mascot-scute, var(--primary-700)));
|
|
36703
|
+
stroke: hsl(var(--rfr-mascot-stroke, var(--primary-950)));
|
|
36704
|
+
stroke-width: 2.5px;
|
|
36705
|
+
}
|
|
36706
|
+
svg.mascot .scute.alt {
|
|
36707
|
+
fill: hsl(var(--rfr-mascot-scute-alt, var(--primary-800)));
|
|
36708
|
+
}
|
|
36709
|
+
svg.mascot .ln {
|
|
36710
|
+
stroke: hsl(var(--rfr-mascot-stroke, var(--primary-950)));
|
|
36711
|
+
stroke-width: 3px;
|
|
36712
|
+
fill: none;
|
|
36713
|
+
}
|
|
36714
|
+
svg.mascot .eye-w {
|
|
36715
|
+
fill: #ffffff;
|
|
36716
|
+
stroke: hsl(var(--rfr-mascot-stroke, var(--primary-950)));
|
|
36717
|
+
stroke-width: 3px;
|
|
36718
|
+
}
|
|
36719
|
+
svg.mascot .pupil {
|
|
36720
|
+
fill: hsl(var(--rfr-mascot-stroke, var(--primary-950)));
|
|
36721
|
+
}
|
|
36722
|
+
svg.mascot .glint {
|
|
36723
|
+
fill: #ffffff;
|
|
36724
|
+
}
|
|
36725
|
+
svg.mascot .cheek {
|
|
36726
|
+
fill: hsl(var(--rfr-mascot-cheek, var(--accent-solid)));
|
|
36727
|
+
}
|
|
36728
|
+
|
|
36729
|
+
/* Float Animation keyframes */
|
|
36730
|
+
@keyframes rfrMascotFloat {
|
|
36731
|
+
0%, 100% {
|
|
36732
|
+
transform: translateY(0);
|
|
36733
|
+
}
|
|
36734
|
+
50% {
|
|
36735
|
+
transform: translateY(-8px);
|
|
36736
|
+
}
|
|
36737
|
+
}
|
|
36738
|
+
|
|
36739
|
+
/* Sway/antenna animation keyframes */
|
|
36740
|
+
@keyframes rfrMascotSway {
|
|
36741
|
+
0%, 100% {
|
|
36742
|
+
transform: rotate(0deg);
|
|
36743
|
+
}
|
|
36744
|
+
50% {
|
|
36745
|
+
transform: rotate(4deg);
|
|
36746
|
+
}
|
|
36747
|
+
}
|
|
36748
|
+
|
|
36749
|
+
/* Waving animation keyframes */
|
|
36750
|
+
@keyframes rfrMascotWave {
|
|
36751
|
+
0%, 100% {
|
|
36752
|
+
transform: rotate(0deg);
|
|
36753
|
+
}
|
|
36754
|
+
50% {
|
|
36755
|
+
transform: rotate(-18deg);
|
|
36756
|
+
}
|
|
36757
|
+
}
|
|
36758
|
+
|
|
36759
|
+
/* Bounce animation keyframes */
|
|
36760
|
+
@keyframes rfrMascotBounce {
|
|
36761
|
+
0%, 100% {
|
|
36762
|
+
transform: translateY(0) scaleY(1);
|
|
36763
|
+
}
|
|
36764
|
+
50% {
|
|
36765
|
+
transform: translateY(-16px) scaleY(0.96);
|
|
36766
|
+
}
|
|
36767
|
+
}
|
|
36768
|
+
|
|
36769
|
+
/* Animation hook connections */
|
|
36770
|
+
.rfr-mascot-float[data-bobbing="true"] .m-bob {
|
|
36771
|
+
animation: rfrMascotFloat 3s ease-in-out infinite;
|
|
36772
|
+
}
|
|
36773
|
+
.rfr-mascot-float[data-sprout="true"] .m-sprout {
|
|
36774
|
+
animation: rfrMascotSway 3s ease-in-out infinite;
|
|
36775
|
+
transform-origin: 158px 92px;
|
|
36776
|
+
}
|
|
36777
|
+
.rfr-mascot-float[data-waving="true"] .m-wave {
|
|
36778
|
+
animation: rfrMascotWave 1.2s ease-in-out infinite;
|
|
36779
|
+
transform-origin: 250px 120px;
|
|
36780
|
+
}
|
|
36781
|
+
|
|
36782
|
+
.motion-safe\\:animate-bounce[data-bobbing="true"] .m-bob {
|
|
36783
|
+
animation: rfrMascotBounce 1.2s ease-in-out infinite;
|
|
36784
|
+
}
|
|
36785
|
+
.motion-safe\\:animate-bounce[data-sprout="true"] .m-sprout {
|
|
36786
|
+
animation: rfrMascotSway 1.2s ease-in-out infinite;
|
|
36787
|
+
transform-origin: 158px 92px;
|
|
36788
|
+
}
|
|
36789
|
+
|
|
36790
|
+
/* Stationary wave arm if not floating */
|
|
36791
|
+
.mascot:not(.rfr-mascot-float)[data-waving="true"] .m-wave {
|
|
36792
|
+
animation: rfrMascotWave 1.2s ease-in-out infinite;
|
|
36793
|
+
transform-origin: 250px 120px;
|
|
36794
|
+
}
|
|
36795
|
+
` }) }),
|
|
36796
|
+
/* @__PURE__ */ jsxRuntime.jsx("ellipse", { className: "shadow", cx: "166", cy: "280", rx: "116", ry: "16" }),
|
|
36797
|
+
/* @__PURE__ */ jsxRuntime.jsxs("g", { className: "m-bob", children: [
|
|
36798
|
+
/* @__PURE__ */ jsxRuntime.jsxs("g", { className: "m-sprout", children: [
|
|
36799
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { className: "stem", d: "M158 92 C158 70 158 58 158 44" }),
|
|
36800
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { className: "leaf", d: "M158 56 C140 50 126 58 128 74 C146 76 158 70 158 56 Z" }),
|
|
36801
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { className: "leaf", d: "M158 50 C176 42 192 50 190 66 C172 70 158 64 158 50 Z" })
|
|
36802
|
+
] }),
|
|
36803
|
+
/* @__PURE__ */ jsxRuntime.jsx("ellipse", { className: "skin-d", cx: "96", cy: "222", rx: "27", ry: "32" }),
|
|
36804
|
+
/* @__PURE__ */ jsxRuntime.jsx("ellipse", { className: "skin-d", cx: "214", cy: "224", rx: "27", ry: "32" }),
|
|
36805
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { className: "skin-d", d: "M58 176 C40 178 28 190 26 204 C44 206 60 196 66 182 Z" }),
|
|
36806
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { className: "shell-rim", d: "M36 196 C30 86 92 70 162 70 C232 70 294 86 288 196 C288 210 252 220 162 220 C72 220 36 210 36 196 Z" }),
|
|
36807
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { className: "shell", d: "M44 190 C40 92 96 78 162 78 C228 78 284 92 280 190 C280 200 246 206 162 206 C78 206 44 200 44 190 Z" }),
|
|
36808
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { className: "belly", d: "M50 192 C92 206 232 206 274 192 C274 202 240 210 162 210 C84 210 50 202 50 192 Z" }),
|
|
36809
|
+
/* @__PURE__ */ jsxRuntime.jsx("polygon", { className: "scute", points: "162,86 190,102 190,134 162,150 134,134 134,102" }),
|
|
36810
|
+
/* @__PURE__ */ jsxRuntime.jsx("polygon", { className: "scute alt", points: "162,150 186,162 186,184 162,196 138,184 138,162" }),
|
|
36811
|
+
/* @__PURE__ */ jsxRuntime.jsx("polygon", { className: "scute alt", points: "104,108 126,120 126,148 104,160 82,148 82,120" }),
|
|
36812
|
+
/* @__PURE__ */ jsxRuntime.jsx("polygon", { className: "scute alt", points: "220,108 242,120 242,148 220,160 198,148 198,120" }),
|
|
36813
|
+
/* @__PURE__ */ jsxRuntime.jsx("polygon", { className: "scute", points: "108,162 126,172 126,190 108,200 90,190 90,172" }),
|
|
36814
|
+
/* @__PURE__ */ jsxRuntime.jsx("polygon", { className: "scute", points: "216,162 234,172 234,190 216,200 198,190 198,172" }),
|
|
36815
|
+
/* @__PURE__ */ jsxRuntime.jsx("ellipse", { className: "skin", cx: "116", cy: "232", rx: "25", ry: "31" }),
|
|
36816
|
+
mood !== "wave" && /* @__PURE__ */ jsxRuntime.jsx("ellipse", { className: "skin", cx: "236", cy: "234", rx: "25", ry: "31" }),
|
|
36817
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { className: "ln", d: mood === "wave" ? "M104 250 H128" : "M104 250 H128 M224 252 H248", opacity: 0.4 }),
|
|
36818
|
+
mood === "wave" && /* @__PURE__ */ jsxRuntime.jsxs("g", { className: "m-wave", children: [
|
|
36819
|
+
/* @__PURE__ */ jsxRuntime.jsx("ellipse", { className: "skin", cx: "250", cy: "120", rx: "15", ry: "22" }),
|
|
36820
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { className: "ln", d: "M244 104 Q250 96 256 104", opacity: 0.4 })
|
|
36821
|
+
] }),
|
|
36822
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { className: "skin", d: "M262 150 C276 142 296 142 310 150 L312 176 C300 188 274 188 262 178 Z" }),
|
|
36823
|
+
/* @__PURE__ */ jsxRuntime.jsx("ellipse", { className: "skin", cx: "296", cy: "156", rx: "40", ry: "36" }),
|
|
36824
|
+
/* @__PURE__ */ jsxRuntime.jsx("ellipse", { className: "cheek", cx: "280", cy: "174", rx: "11", ry: "8" }),
|
|
36825
|
+
isBlinking ? /* @__PURE__ */ jsxRuntime.jsxs("g", { className: "mascot-face-blinking", children: [
|
|
36826
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { className: "ln", d: "M275 150 C280 155 292 155 297 150" }),
|
|
36827
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { className: "ln", d: "M304 152 C309 157 319 157 324 152" }),
|
|
36828
|
+
mood === "think" ? /* @__PURE__ */ jsxRuntime.jsx("path", { className: "ln", d: "M280 174 Q290 169 298 175" }) : /* @__PURE__ */ jsxRuntime.jsx("path", { className: "ln", d: "M286 172 C294 180 306 180 314 171" })
|
|
36829
|
+
] }) : mood === "think" ? /* @__PURE__ */ jsxRuntime.jsxs("g", { className: "mascot-face-think", children: [
|
|
36830
|
+
/* @__PURE__ */ jsxRuntime.jsx("ellipse", { className: "eye-w", cx: "286", cy: "150", rx: "11", ry: "13" }),
|
|
36831
|
+
/* @__PURE__ */ jsxRuntime.jsx("ellipse", { className: "eye-w", cx: "314", cy: "152", rx: "10", ry: "12" }),
|
|
36832
|
+
/* @__PURE__ */ jsxRuntime.jsx("circle", { className: "pupil", cx: "288", cy: "146", r: 5.5 }),
|
|
36833
|
+
/* @__PURE__ */ jsxRuntime.jsx("circle", { className: "pupil", cx: "315", cy: "148", r: 5 }),
|
|
36834
|
+
/* @__PURE__ */ jsxRuntime.jsx("circle", { className: "glint", cx: "290", cy: "143", r: 1.9 }),
|
|
36835
|
+
/* @__PURE__ */ jsxRuntime.jsx("circle", { className: "glint", cx: "317", cy: "145", r: 1.7 }),
|
|
36836
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { className: "ln", d: "M280 174 Q290 169 298 175" })
|
|
36837
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsxs("g", { className: "mascot-face-happy", children: [
|
|
36838
|
+
/* @__PURE__ */ jsxRuntime.jsx("ellipse", { className: "eye-w", cx: "286", cy: "150", rx: "11", ry: "13" }),
|
|
36839
|
+
/* @__PURE__ */ jsxRuntime.jsx("ellipse", { className: "eye-w", cx: "314", cy: "152", rx: "10", ry: "12" }),
|
|
36840
|
+
/* @__PURE__ */ jsxRuntime.jsx("circle", { className: "pupil", cx: "289", cy: "152", r: 5.5 }),
|
|
36841
|
+
/* @__PURE__ */ jsxRuntime.jsx("circle", { className: "pupil", cx: "316", cy: "154", r: 5 }),
|
|
36842
|
+
/* @__PURE__ */ jsxRuntime.jsx("circle", { className: "glint", cx: "291", cy: "149", r: 1.9 }),
|
|
36843
|
+
/* @__PURE__ */ jsxRuntime.jsx("circle", { className: "glint", cx: "318", cy: "151", r: 1.7 }),
|
|
36844
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { className: "ln", d: "M286 172 C294 180 306 180 314 171" })
|
|
36845
|
+
] })
|
|
36846
|
+
] })
|
|
36847
|
+
]
|
|
36848
|
+
}
|
|
36849
|
+
);
|
|
36850
|
+
}
|
|
36851
|
+
);
|
|
36852
|
+
Mascot.displayName = "Mascot";
|
|
36853
|
+
|
|
36500
36854
|
// ../mobile-nav/dist/index.js
|
|
36501
36855
|
function createMobileNav(props = {}) {
|
|
36502
36856
|
const isOpen = props.open ?? false;
|
|
@@ -41334,7 +41688,11 @@ var Avatar2 = React11__namespace.forwardRef(
|
|
|
41334
41688
|
Avatar2.displayName = "Avatar";
|
|
41335
41689
|
var AvatarImage = React11__namespace.forwardRef(
|
|
41336
41690
|
({ className, src, alt = "", onLoad, onError, ...props }, ref) => {
|
|
41337
|
-
const { setImageLoaded, setImageError } = React11__namespace.useContext(AvatarContext);
|
|
41691
|
+
const { imageError, setImageLoaded, setImageError } = React11__namespace.useContext(AvatarContext);
|
|
41692
|
+
React11__namespace.useEffect(() => {
|
|
41693
|
+
setImageLoaded(false);
|
|
41694
|
+
setImageError(false);
|
|
41695
|
+
}, [src, setImageLoaded, setImageError]);
|
|
41338
41696
|
const handleLoad = (e2) => {
|
|
41339
41697
|
setImageLoaded(true);
|
|
41340
41698
|
onLoad?.(e2);
|
|
@@ -41343,6 +41701,7 @@ var AvatarImage = React11__namespace.forwardRef(
|
|
|
41343
41701
|
setImageError(true);
|
|
41344
41702
|
onError?.(e2);
|
|
41345
41703
|
};
|
|
41704
|
+
if (imageError) return null;
|
|
41346
41705
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
41347
41706
|
"img",
|
|
41348
41707
|
{
|
|
@@ -41360,7 +41719,8 @@ var AvatarImage = React11__namespace.forwardRef(
|
|
|
41360
41719
|
AvatarImage.displayName = "AvatarImage";
|
|
41361
41720
|
var AvatarFallback = React11__namespace.forwardRef(
|
|
41362
41721
|
({ className, children, ...props }, ref) => {
|
|
41363
|
-
const { size } = React11__namespace.useContext(AvatarContext);
|
|
41722
|
+
const { size, imageLoaded, imageError } = React11__namespace.useContext(AvatarContext);
|
|
41723
|
+
if (imageLoaded && !imageError) return null;
|
|
41364
41724
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
41365
41725
|
"span",
|
|
41366
41726
|
{
|
|
@@ -41813,427 +42173,39 @@ var Checkbox = React11__namespace.forwardRef(
|
|
|
41813
42173
|
Checkbox.displayName = "Checkbox";
|
|
41814
42174
|
|
|
41815
42175
|
// ../date-picker/dist/index.js
|
|
41816
|
-
function isSameDay2(a2, b2) {
|
|
41817
|
-
return a2.getFullYear() === b2.getFullYear() && a2.getMonth() === b2.getMonth() && a2.getDate() === b2.getDate();
|
|
41818
|
-
}
|
|
41819
|
-
function startOfMonth2(date) {
|
|
41820
|
-
return new Date(date.getFullYear(), date.getMonth(), 1);
|
|
41821
|
-
}
|
|
41822
|
-
function startOfDay(date) {
|
|
41823
|
-
return new Date(date.getFullYear(), date.getMonth(), date.getDate());
|
|
41824
|
-
}
|
|
41825
|
-
function endOfDay(date) {
|
|
41826
|
-
return new Date(date.getFullYear(), date.getMonth(), date.getDate(), 23, 59, 59, 999);
|
|
41827
|
-
}
|
|
41828
|
-
var DAY_NAMES2 = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"];
|
|
41829
|
-
function padZero(n2) {
|
|
41830
|
-
return n2 < 10 ? `0${n2}` : `${n2}`;
|
|
41831
|
-
}
|
|
41832
|
-
function formatDate(date, format, showTime) {
|
|
41833
|
-
if (!date) return "";
|
|
41834
|
-
const year = date.getFullYear();
|
|
41835
|
-
const month = padZero(date.getMonth() + 1);
|
|
41836
|
-
const day = padZero(date.getDate());
|
|
41837
|
-
const hours = padZero(date.getHours());
|
|
41838
|
-
const minutes = padZero(date.getMinutes());
|
|
41839
|
-
let result = format.replace("YYYY", String(year)).replace("MM", month).replace("DD", day);
|
|
41840
|
-
if (showTime) {
|
|
41841
|
-
result = result.replace("HH", hours).replace("mm", minutes);
|
|
41842
|
-
}
|
|
41843
|
-
return result;
|
|
41844
|
-
}
|
|
41845
|
-
function createDatePicker(props = {}) {
|
|
41846
|
-
const {
|
|
41847
|
-
value,
|
|
41848
|
-
onChange,
|
|
41849
|
-
minDate,
|
|
41850
|
-
maxDate,
|
|
41851
|
-
showTime = false,
|
|
41852
|
-
format = showTime ? "YYYY-MM-DD HH:mm" : "YYYY-MM-DD",
|
|
41853
|
-
placeholder = "Select date...",
|
|
41854
|
-
open: controlledOpen,
|
|
41855
|
-
defaultOpen = false,
|
|
41856
|
-
onOpenChange
|
|
41857
|
-
} = props;
|
|
41858
|
-
const today = /* @__PURE__ */ new Date();
|
|
41859
|
-
let internalOpen = controlledOpen ?? defaultOpen;
|
|
41860
|
-
let currentMonth = value ? startOfMonth2(value) : startOfMonth2(today);
|
|
41861
|
-
let view = "calendar";
|
|
41862
|
-
const hours = value ? value.getHours() : 0;
|
|
41863
|
-
const minutes = value ? value.getMinutes() : 0;
|
|
41864
|
-
const triggerId = generateId("rfr-datepicker-trigger");
|
|
41865
|
-
const dropdownId = generateId("rfr-datepicker-dropdown");
|
|
41866
|
-
const gridId = generateId("rfr-datepicker-grid");
|
|
41867
|
-
const labelId = generateId("rfr-datepicker-label");
|
|
41868
|
-
function isOpen() {
|
|
41869
|
-
if (controlledOpen !== void 0) return controlledOpen;
|
|
41870
|
-
return internalOpen;
|
|
41871
|
-
}
|
|
41872
|
-
function isDateDisabled(date) {
|
|
41873
|
-
if (minDate && date < startOfDay(minDate)) return true;
|
|
41874
|
-
if (maxDate && date > endOfDay(maxDate)) return true;
|
|
41875
|
-
return false;
|
|
41876
|
-
}
|
|
41877
|
-
function buildDays() {
|
|
41878
|
-
const year = currentMonth.getFullYear();
|
|
41879
|
-
const month = currentMonth.getMonth();
|
|
41880
|
-
const first = new Date(year, month, 1);
|
|
41881
|
-
const startDow = first.getDay();
|
|
41882
|
-
const gridStart = new Date(year, month, 1 - startDow);
|
|
41883
|
-
const days = [];
|
|
41884
|
-
for (let i2 = 0; i2 < 42; i2++) {
|
|
41885
|
-
const date = new Date(
|
|
41886
|
-
gridStart.getFullYear(),
|
|
41887
|
-
gridStart.getMonth(),
|
|
41888
|
-
gridStart.getDate() + i2
|
|
41889
|
-
);
|
|
41890
|
-
days.push({
|
|
41891
|
-
date,
|
|
41892
|
-
isToday: isSameDay2(date, today),
|
|
41893
|
-
isSelected: value ? isSameDay2(date, value) : false,
|
|
41894
|
-
isCurrentMonth: date.getMonth() === month,
|
|
41895
|
-
isDisabled: isDateDisabled(date)
|
|
41896
|
-
});
|
|
41897
|
-
}
|
|
41898
|
-
return days;
|
|
41899
|
-
}
|
|
41900
|
-
function openPicker() {
|
|
41901
|
-
internalOpen = true;
|
|
41902
|
-
onOpenChange?.(true);
|
|
41903
|
-
}
|
|
41904
|
-
function closePicker() {
|
|
41905
|
-
internalOpen = false;
|
|
41906
|
-
onOpenChange?.(false);
|
|
41907
|
-
}
|
|
41908
|
-
function togglePicker() {
|
|
41909
|
-
if (isOpen()) {
|
|
41910
|
-
closePicker();
|
|
41911
|
-
} else {
|
|
41912
|
-
openPicker();
|
|
41913
|
-
}
|
|
41914
|
-
}
|
|
41915
|
-
function selectDate(date) {
|
|
41916
|
-
if (isDateDisabled(date)) return;
|
|
41917
|
-
const newDate = new Date(date);
|
|
41918
|
-
if (value) {
|
|
41919
|
-
newDate.setHours(value.getHours());
|
|
41920
|
-
newDate.setMinutes(value.getMinutes());
|
|
41921
|
-
}
|
|
41922
|
-
onChange?.(newDate);
|
|
41923
|
-
if (!showTime) {
|
|
41924
|
-
closePicker();
|
|
41925
|
-
}
|
|
41926
|
-
}
|
|
41927
|
-
function setHours(h5) {
|
|
41928
|
-
if (h5 < 0 || h5 > 23) return;
|
|
41929
|
-
const newDate = value ? new Date(value) : /* @__PURE__ */ new Date();
|
|
41930
|
-
newDate.setHours(h5);
|
|
41931
|
-
onChange?.(newDate);
|
|
41932
|
-
}
|
|
41933
|
-
function setMinutes(m2) {
|
|
41934
|
-
if (m2 < 0 || m2 > 59) return;
|
|
41935
|
-
const newDate = value ? new Date(value) : /* @__PURE__ */ new Date();
|
|
41936
|
-
newDate.setMinutes(m2);
|
|
41937
|
-
onChange?.(newDate);
|
|
41938
|
-
}
|
|
41939
|
-
function prevMonth() {
|
|
41940
|
-
currentMonth = new Date(currentMonth.getFullYear(), currentMonth.getMonth() - 1, 1);
|
|
41941
|
-
}
|
|
41942
|
-
function nextMonth() {
|
|
41943
|
-
currentMonth = new Date(currentMonth.getFullYear(), currentMonth.getMonth() + 1, 1);
|
|
41944
|
-
}
|
|
41945
|
-
function setView(v2) {
|
|
41946
|
-
view = v2;
|
|
41947
|
-
}
|
|
41948
|
-
function formatDisplay() {
|
|
41949
|
-
return value ? formatDate(value, format, showTime) : placeholder;
|
|
41950
|
-
}
|
|
41951
|
-
const keyboardHandlers = {
|
|
41952
|
-
[Keys.Escape]: (e2) => {
|
|
41953
|
-
e2.preventDefault();
|
|
41954
|
-
closePicker();
|
|
41955
|
-
}
|
|
41956
|
-
};
|
|
41957
|
-
const triggerProps = {
|
|
41958
|
-
"aria-expanded": isOpen(),
|
|
41959
|
-
"aria-controls": dropdownId,
|
|
41960
|
-
"aria-haspopup": "dialog",
|
|
41961
|
-
id: triggerId,
|
|
41962
|
-
role: "combobox"
|
|
41963
|
-
};
|
|
41964
|
-
const dropdownProps = {
|
|
41965
|
-
role: "dialog",
|
|
41966
|
-
"aria-modal": true,
|
|
41967
|
-
"aria-labelledby": labelId,
|
|
41968
|
-
id: dropdownId
|
|
41969
|
-
};
|
|
41970
|
-
const gridProps = {
|
|
41971
|
-
role: "grid",
|
|
41972
|
-
"aria-labelledby": labelId,
|
|
41973
|
-
id: gridId
|
|
41974
|
-
};
|
|
41975
|
-
function getDayAriaProps(day) {
|
|
41976
|
-
return {
|
|
41977
|
-
role: "gridcell",
|
|
41978
|
-
"aria-selected": day.isSelected,
|
|
41979
|
-
"aria-disabled": day.isDisabled,
|
|
41980
|
-
"aria-current": day.isToday ? "date" : void 0,
|
|
41981
|
-
"aria-label": `${DAY_NAMES2[day.date.getDay()]}, ${day.date.toLocaleDateString("en-US", {
|
|
41982
|
-
month: "long",
|
|
41983
|
-
day: "numeric",
|
|
41984
|
-
year: "numeric"
|
|
41985
|
-
})}`
|
|
41986
|
-
};
|
|
41987
|
-
}
|
|
41988
|
-
return {
|
|
41989
|
-
state: {
|
|
41990
|
-
open: isOpen(),
|
|
41991
|
-
selectedDate: value,
|
|
41992
|
-
view,
|
|
41993
|
-
hours,
|
|
41994
|
-
minutes,
|
|
41995
|
-
currentMonth
|
|
41996
|
-
},
|
|
41997
|
-
days: buildDays(),
|
|
41998
|
-
openPicker,
|
|
41999
|
-
closePicker,
|
|
42000
|
-
togglePicker,
|
|
42001
|
-
selectDate,
|
|
42002
|
-
setHours,
|
|
42003
|
-
setMinutes,
|
|
42004
|
-
prevMonth,
|
|
42005
|
-
nextMonth,
|
|
42006
|
-
setView,
|
|
42007
|
-
formatDisplay,
|
|
42008
|
-
triggerProps,
|
|
42009
|
-
dropdownProps,
|
|
42010
|
-
gridProps,
|
|
42011
|
-
getDayAriaProps,
|
|
42012
|
-
keyboardHandlers,
|
|
42013
|
-
ids: {
|
|
42014
|
-
trigger: triggerId,
|
|
42015
|
-
dropdown: dropdownId,
|
|
42016
|
-
grid: gridId,
|
|
42017
|
-
label: labelId
|
|
42018
|
-
}
|
|
42019
|
-
};
|
|
42020
|
-
}
|
|
42021
42176
|
var datePickerTriggerStyles = "inline-flex items-center gap-2 rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring cursor-pointer";
|
|
42022
|
-
var
|
|
42023
|
-
|
|
42024
|
-
|
|
42025
|
-
|
|
42026
|
-
|
|
42027
|
-
|
|
42028
|
-
|
|
42029
|
-
|
|
42030
|
-
|
|
42031
|
-
|
|
42032
|
-
|
|
42033
|
-
|
|
42034
|
-
|
|
42035
|
-
state: "default"
|
|
42036
|
-
}
|
|
42037
|
-
});
|
|
42038
|
-
var datePickerTimeStyles = "flex items-center gap-2 mt-3 pt-3 border-t";
|
|
42039
|
-
var datePickerTimeInputStyles = "w-14 rounded-md border border-input bg-background px-2 py-1 text-sm text-center";
|
|
42040
|
-
|
|
42041
|
-
// ../react-date-picker/dist/index.js
|
|
42042
|
-
function DatePicker({
|
|
42043
|
-
value,
|
|
42044
|
-
onChange,
|
|
42045
|
-
minDate,
|
|
42046
|
-
maxDate,
|
|
42047
|
-
showTime = false,
|
|
42048
|
-
format,
|
|
42049
|
-
placeholder,
|
|
42050
|
-
className,
|
|
42051
|
-
disabled = false
|
|
42052
|
-
}) {
|
|
42053
|
-
const [open, setOpen] = React11__namespace.useState(false);
|
|
42054
|
-
const [currentMonth, setCurrentMonth] = React11__namespace.useState(
|
|
42055
|
-
() => value ? new Date(value.getFullYear(), value.getMonth(), 1) : new Date((/* @__PURE__ */ new Date()).getFullYear(), (/* @__PURE__ */ new Date()).getMonth(), 1)
|
|
42056
|
-
);
|
|
42057
|
-
const [view, setView] = React11__namespace.useState("calendar");
|
|
42058
|
-
const containerRef = React11__namespace.useRef(null);
|
|
42059
|
-
const api = React11__namespace.useMemo(
|
|
42060
|
-
() => createDatePicker({
|
|
42061
|
-
value,
|
|
42062
|
-
onChange,
|
|
42063
|
-
minDate,
|
|
42064
|
-
maxDate,
|
|
42065
|
-
showTime,
|
|
42066
|
-
format,
|
|
42067
|
-
placeholder,
|
|
42068
|
-
open,
|
|
42069
|
-
onOpenChange: setOpen
|
|
42070
|
-
}),
|
|
42071
|
-
[value, onChange, minDate, maxDate, showTime, format, placeholder, open]
|
|
42072
|
-
);
|
|
42073
|
-
React11__namespace.useMemo(() => {
|
|
42074
|
-
createDatePicker({
|
|
42075
|
-
value,
|
|
42076
|
-
minDate,
|
|
42077
|
-
maxDate,
|
|
42078
|
-
open: true
|
|
42079
|
-
});
|
|
42080
|
-
const tempApi = createDatePicker({
|
|
42081
|
-
value,
|
|
42082
|
-
minDate,
|
|
42083
|
-
maxDate,
|
|
42084
|
-
open: true
|
|
42085
|
-
});
|
|
42086
|
-
return tempApi.days;
|
|
42087
|
-
}, [value, minDate, maxDate, currentMonth]);
|
|
42088
|
-
React11__namespace.useEffect(() => {
|
|
42089
|
-
if (!open) return;
|
|
42090
|
-
function handleClick(e2) {
|
|
42091
|
-
if (containerRef.current && !containerRef.current.contains(e2.target)) {
|
|
42092
|
-
setOpen(false);
|
|
42093
|
-
}
|
|
42094
|
-
}
|
|
42095
|
-
document.addEventListener("mousedown", handleClick);
|
|
42096
|
-
return () => document.removeEventListener("mousedown", handleClick);
|
|
42097
|
-
}, [open]);
|
|
42098
|
-
React11__namespace.useEffect(() => {
|
|
42099
|
-
if (!open) return;
|
|
42100
|
-
function handleKeyDown(e2) {
|
|
42101
|
-
if (e2.key === "Escape") {
|
|
42102
|
-
e2.preventDefault();
|
|
42103
|
-
setOpen(false);
|
|
42177
|
+
var DatePicker = React11__namespace.forwardRef(
|
|
42178
|
+
({ value, onChange, minDate, maxDate, showTime = false, format, placeholder, className, disabled = false, ...props }, ref) => {
|
|
42179
|
+
const dateToString = (date) => {
|
|
42180
|
+
if (!date) return "";
|
|
42181
|
+
const offset = date.getTimezoneOffset() * 6e4;
|
|
42182
|
+
const localDate = new Date(date.getTime() - offset);
|
|
42183
|
+
const iso = localDate.toISOString();
|
|
42184
|
+
return showTime ? iso.slice(0, 16) : iso.slice(0, 10);
|
|
42185
|
+
};
|
|
42186
|
+
const handleChange = (e2) => {
|
|
42187
|
+
if (!onChange) return;
|
|
42188
|
+
if (e2.target.value) {
|
|
42189
|
+
onChange(new Date(e2.target.value));
|
|
42104
42190
|
}
|
|
42105
|
-
}
|
|
42106
|
-
|
|
42107
|
-
|
|
42108
|
-
}, [open]);
|
|
42109
|
-
const displayValue = api.formatDisplay();
|
|
42110
|
-
const handleSelectDate = (date) => {
|
|
42111
|
-
const newDate = new Date(date);
|
|
42112
|
-
if (value) {
|
|
42113
|
-
newDate.setHours(value.getHours());
|
|
42114
|
-
newDate.setMinutes(value.getMinutes());
|
|
42115
|
-
}
|
|
42116
|
-
onChange?.(newDate);
|
|
42117
|
-
if (!showTime) {
|
|
42118
|
-
setOpen(false);
|
|
42119
|
-
}
|
|
42120
|
-
};
|
|
42121
|
-
const handleHoursChange = (e2) => {
|
|
42122
|
-
const h5 = parseInt(e2.target.value, 10);
|
|
42123
|
-
if (isNaN(h5) || h5 < 0 || h5 > 23) return;
|
|
42124
|
-
const newDate = value ? new Date(value) : /* @__PURE__ */ new Date();
|
|
42125
|
-
newDate.setHours(h5);
|
|
42126
|
-
onChange?.(newDate);
|
|
42127
|
-
};
|
|
42128
|
-
const handleMinutesChange = (e2) => {
|
|
42129
|
-
const m2 = parseInt(e2.target.value, 10);
|
|
42130
|
-
if (isNaN(m2) || m2 < 0 || m2 > 59) return;
|
|
42131
|
-
const newDate = value ? new Date(value) : /* @__PURE__ */ new Date();
|
|
42132
|
-
newDate.setMinutes(m2);
|
|
42133
|
-
onChange?.(newDate);
|
|
42134
|
-
};
|
|
42135
|
-
const monthLabel = currentMonth.toLocaleDateString("en-US", { month: "long", year: "numeric" });
|
|
42136
|
-
return React11__namespace.createElement(
|
|
42137
|
-
"div",
|
|
42138
|
-
{ ref: containerRef, className: cn("relative inline-block", className) },
|
|
42139
|
-
React11__namespace.createElement(
|
|
42140
|
-
"button",
|
|
42141
|
-
{
|
|
42142
|
-
type: "button",
|
|
42143
|
-
className: cn(datePickerTriggerStyles, disabled && "opacity-50 cursor-not-allowed"),
|
|
42144
|
-
onClick: () => !disabled && setOpen(!open),
|
|
42145
|
-
"aria-expanded": open,
|
|
42146
|
-
"aria-haspopup": "dialog",
|
|
42147
|
-
disabled
|
|
42148
|
-
},
|
|
42149
|
-
displayValue
|
|
42150
|
-
),
|
|
42151
|
-
open && React11__namespace.createElement(
|
|
42152
|
-
"div",
|
|
42191
|
+
};
|
|
42192
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
42193
|
+
"input",
|
|
42153
42194
|
{
|
|
42154
|
-
|
|
42155
|
-
|
|
42156
|
-
"
|
|
42157
|
-
|
|
42158
|
-
|
|
42159
|
-
|
|
42160
|
-
|
|
42161
|
-
|
|
42162
|
-
|
|
42163
|
-
|
|
42164
|
-
|
|
42165
|
-
|
|
42166
|
-
|
|
42167
|
-
|
|
42168
|
-
},
|
|
42169
|
-
"\u2039"
|
|
42170
|
-
),
|
|
42171
|
-
React11__namespace.createElement("span", { className: "text-sm font-medium" }, monthLabel),
|
|
42172
|
-
React11__namespace.createElement(
|
|
42173
|
-
"button",
|
|
42174
|
-
{
|
|
42175
|
-
type: "button",
|
|
42176
|
-
className: "p-1 hover:bg-accent rounded cursor-pointer",
|
|
42177
|
-
onClick: () => setCurrentMonth(new Date(currentMonth.getFullYear(), currentMonth.getMonth() + 1, 1)),
|
|
42178
|
-
"aria-label": "Next month"
|
|
42179
|
-
},
|
|
42180
|
-
"\u203A"
|
|
42181
|
-
)
|
|
42182
|
-
),
|
|
42183
|
-
React11__namespace.createElement(
|
|
42184
|
-
"div",
|
|
42185
|
-
{ className: "grid grid-cols-7 gap-0 text-center", role: "grid" },
|
|
42186
|
-
["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"].map(
|
|
42187
|
-
(d2) => React11__namespace.createElement("div", { key: d2, className: "text-xs text-muted-foreground py-1 font-medium" }, d2)
|
|
42188
|
-
),
|
|
42189
|
-
api.days.map((day, i2) => {
|
|
42190
|
-
let state = "default";
|
|
42191
|
-
if (day.isDisabled) state = "disabled";
|
|
42192
|
-
else if (day.isSelected) state = "selected";
|
|
42193
|
-
else if (day.isToday) state = "today";
|
|
42194
|
-
else if (!day.isCurrentMonth) state = "outside";
|
|
42195
|
-
return React11__namespace.createElement(
|
|
42196
|
-
"button",
|
|
42197
|
-
{
|
|
42198
|
-
key: i2,
|
|
42199
|
-
type: "button",
|
|
42200
|
-
className: datePickerDayVariants({ state }),
|
|
42201
|
-
onClick: () => !day.isDisabled && handleSelectDate(day.date),
|
|
42202
|
-
disabled: day.isDisabled,
|
|
42203
|
-
"aria-selected": day.isSelected,
|
|
42204
|
-
"aria-disabled": day.isDisabled
|
|
42205
|
-
},
|
|
42206
|
-
day.date.getDate()
|
|
42207
|
-
);
|
|
42208
|
-
})
|
|
42209
|
-
),
|
|
42210
|
-
showTime && React11__namespace.createElement(
|
|
42211
|
-
"div",
|
|
42212
|
-
{ className: datePickerTimeStyles },
|
|
42213
|
-
React11__namespace.createElement("span", { className: "text-sm text-muted-foreground" }, "Time:"),
|
|
42214
|
-
React11__namespace.createElement("input", {
|
|
42215
|
-
type: "number",
|
|
42216
|
-
min: 0,
|
|
42217
|
-
max: 23,
|
|
42218
|
-
value: value ? value.getHours() : 0,
|
|
42219
|
-
onChange: handleHoursChange,
|
|
42220
|
-
className: datePickerTimeInputStyles,
|
|
42221
|
-
"aria-label": "Hours"
|
|
42222
|
-
}),
|
|
42223
|
-
React11__namespace.createElement("span", { className: "text-muted-foreground" }, ":"),
|
|
42224
|
-
React11__namespace.createElement("input", {
|
|
42225
|
-
type: "number",
|
|
42226
|
-
min: 0,
|
|
42227
|
-
max: 59,
|
|
42228
|
-
value: value ? value.getMinutes() : 0,
|
|
42229
|
-
onChange: handleMinutesChange,
|
|
42230
|
-
className: datePickerTimeInputStyles,
|
|
42231
|
-
"aria-label": "Minutes"
|
|
42232
|
-
})
|
|
42233
|
-
)
|
|
42234
|
-
)
|
|
42235
|
-
);
|
|
42236
|
-
}
|
|
42195
|
+
ref,
|
|
42196
|
+
type: showTime ? "datetime-local" : "date",
|
|
42197
|
+
className: cn(datePickerTriggerStyles, "justify-start text-left font-normal w-[280px]", className),
|
|
42198
|
+
value: dateToString(value),
|
|
42199
|
+
min: dateToString(minDate),
|
|
42200
|
+
max: dateToString(maxDate),
|
|
42201
|
+
onChange: handleChange,
|
|
42202
|
+
disabled,
|
|
42203
|
+
placeholder,
|
|
42204
|
+
...props
|
|
42205
|
+
}
|
|
42206
|
+
);
|
|
42207
|
+
}
|
|
42208
|
+
);
|
|
42237
42209
|
DatePicker.displayName = "DatePicker";
|
|
42238
42210
|
|
|
42239
42211
|
// ../emoji-picker/dist/index.js
|
|
@@ -44760,6 +44732,20 @@ var CarouselContent = React11__namespace.forwardRef(
|
|
|
44760
44732
|
}
|
|
44761
44733
|
);
|
|
44762
44734
|
CarouselContent.displayName = "CarouselContent";
|
|
44735
|
+
var Slider = React11__namespace.forwardRef(
|
|
44736
|
+
({ className, variant, ...props }, ref) => {
|
|
44737
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
44738
|
+
"input",
|
|
44739
|
+
{
|
|
44740
|
+
type: "range",
|
|
44741
|
+
ref,
|
|
44742
|
+
className: `w-full ${className || ""}`,
|
|
44743
|
+
...props
|
|
44744
|
+
}
|
|
44745
|
+
);
|
|
44746
|
+
}
|
|
44747
|
+
);
|
|
44748
|
+
Slider.displayName = "Slider";
|
|
44763
44749
|
var Pagination = React11__namespace.forwardRef(
|
|
44764
44750
|
({ className, ...props }, ref) => {
|
|
44765
44751
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("", className), ...props });
|
|
@@ -52625,6 +52611,7 @@ exports.LiveCursors = LiveCursors;
|
|
|
52625
52611
|
exports.LiveTranscript = LiveTranscript;
|
|
52626
52612
|
exports.MarkdownRenderer = MarkdownRenderer;
|
|
52627
52613
|
exports.MarqueeStrip = MarqueeStrip;
|
|
52614
|
+
exports.Mascot = Mascot;
|
|
52628
52615
|
exports.MasteryBar = MasteryBar;
|
|
52629
52616
|
exports.MiniMap = MiniMap;
|
|
52630
52617
|
exports.MobileNav = MobileNav;
|
|
@@ -52690,6 +52677,7 @@ exports.Skeleton = Skeleton;
|
|
|
52690
52677
|
exports.SkeletonText = SkeletonText;
|
|
52691
52678
|
exports.SkipToContent = SkipToContent;
|
|
52692
52679
|
exports.SlideViewer = SlideViewer;
|
|
52680
|
+
exports.Slider = Slider;
|
|
52693
52681
|
exports.SlotPicker = SlotPicker;
|
|
52694
52682
|
exports.SocialAuthButton = SocialAuthButton;
|
|
52695
52683
|
exports.SocialAuthRow = SocialAuthRow;
|