@yewdiel21/motion-kit 0.9.1 → 0.10.0

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.
Files changed (129) hide show
  1. package/README.md +93 -83
  2. package/dist/auto/index.d.ts +22 -3
  3. package/dist/auto/index.js +41 -3
  4. package/dist/auto/index.js.map +1 -1
  5. package/dist/{chunk-BFC27F2G.js → chunk-IKQ5FODN.js} +2 -2
  6. package/dist/{chunk-JQMJQSXD.js → chunk-TFNRIZHU.js} +1614 -11
  7. package/dist/chunk-TFNRIZHU.js.map +1 -0
  8. package/dist/{chunk-XDWBVFHQ.js → chunk-XAKC2QY7.js} +1202 -3
  9. package/dist/chunk-XAKC2QY7.js.map +1 -0
  10. package/dist/css/components/calendar.css +159 -0
  11. package/dist/css/components/hover-card.css +14 -0
  12. package/dist/css/components/input-otp.css +10 -0
  13. package/dist/css/components/pagination.css +11 -0
  14. package/dist/css/components/quantity.css +16 -0
  15. package/dist/css/components/slot-picker.css +126 -0
  16. package/dist/css/components/studio-dock.css +35 -0
  17. package/dist/css/components/trailer.css +37 -0
  18. package/dist/css/controls.css +65 -0
  19. package/dist/elements/index.d.ts +72 -4
  20. package/dist/elements/index.js +170 -4
  21. package/dist/elements/index.js.map +1 -1
  22. package/dist/index.css +1017 -0
  23. package/dist/index.d.ts +3 -3
  24. package/dist/index.js +45 -3
  25. package/dist/index.js.map +1 -1
  26. package/dist/react/index.d.ts +105 -6
  27. package/dist/react/index.js +350 -3
  28. package/dist/react/index.js.map +1 -1
  29. package/dist/{reduced-B98f8LPs.d.ts → reduced-BmBzKH94.d.ts} +199 -2
  30. package/dist/{reveal-C0hCDcB_.d.ts → reveal-jsX-uwUz.d.ts} +211 -1
  31. package/dist/{store-pHiUvxP8.d.ts → store-DYb3tTsZ.d.ts} +1 -1
  32. package/package.json +1 -1
  33. package/registry.json +178 -104
  34. package/skills/motion-kit/SKILL.md +209 -189
  35. package/src/auto/auto-init.ts +38 -0
  36. package/src/components/calendar/README.md +82 -0
  37. package/src/components/calendar/calendar.css +158 -0
  38. package/src/components/calendar/element.ts +27 -0
  39. package/src/components/calendar/engine.ts +412 -0
  40. package/src/components/calendar/react.tsx +69 -0
  41. package/src/components/hover-card/README.md +16 -0
  42. package/src/components/hover-card/element.ts +8 -0
  43. package/src/components/hover-card/engine.ts +69 -0
  44. package/src/components/hover-card/hover-card.css +13 -0
  45. package/src/components/hover-card/react.tsx +19 -0
  46. package/src/components/input-otp/README.md +18 -0
  47. package/src/components/input-otp/element.ts +14 -0
  48. package/src/components/input-otp/engine.ts +106 -0
  49. package/src/components/input-otp/input-otp.css +9 -0
  50. package/src/components/input-otp/react.tsx +21 -0
  51. package/src/components/pagination/README.md +17 -0
  52. package/src/components/pagination/element.ts +14 -0
  53. package/src/components/pagination/engine.ts +102 -0
  54. package/src/components/pagination/pagination.css +10 -0
  55. package/src/components/pagination/react.tsx +22 -0
  56. package/src/components/quantity/README.md +20 -0
  57. package/src/components/quantity/element.ts +14 -0
  58. package/src/components/quantity/engine.ts +85 -0
  59. package/src/components/quantity/quantity.css +15 -0
  60. package/src/components/quantity/react.tsx +21 -0
  61. package/src/components/slot-picker/README.md +68 -0
  62. package/src/components/slot-picker/element.ts +27 -0
  63. package/src/components/slot-picker/engine.ts +412 -0
  64. package/src/components/slot-picker/react.tsx +76 -0
  65. package/src/components/slot-picker/slot-picker.css +125 -0
  66. package/src/components/studio-dock/README.md +44 -0
  67. package/src/components/studio-dock/element.ts +11 -0
  68. package/src/components/studio-dock/engine.ts +212 -0
  69. package/src/components/studio-dock/react.tsx +23 -0
  70. package/src/components/studio-dock/studio-dock.css +34 -0
  71. package/src/components/trailer/README.md +28 -0
  72. package/src/components/trailer/element.ts +13 -0
  73. package/src/components/trailer/engine.ts +189 -0
  74. package/src/components/trailer/react.tsx +16 -0
  75. package/src/components/trailer/trailer.css +36 -0
  76. package/src/core/dates.ts +98 -0
  77. package/src/css/controls/README.md +14 -0
  78. package/src/css/controls/status.css +63 -0
  79. package/src/elements/index.ts +24 -0
  80. package/src/index.ts +25 -0
  81. package/src/react/index.ts +21 -0
  82. package/src/react/use-action-button.ts +6 -0
  83. package/src/react/use-editorial-reveal.ts +7 -0
  84. package/src/react/use-film-hero.ts +6 -0
  85. package/src/react/use-font-cycle.ts +7 -0
  86. package/src/react/use-image-zoom.ts +5 -0
  87. package/src/react/use-joined-cta.ts +5 -0
  88. package/src/react/use-local-clock.ts +5 -0
  89. package/src/react/use-scroll-dock.ts +5 -0
  90. package/src/react/use-sticker.ts +5 -0
  91. package/src/react/use-studio-dock.ts +8 -0
  92. package/src/react/use-thumbnail-nav.ts +7 -0
  93. package/src/react/use-trailer.ts +6 -0
  94. package/src/react/use-weight-hover.ts +5 -0
  95. package/src/recipes/action-button/README.md +31 -0
  96. package/src/recipes/action-button/action-button.css +113 -0
  97. package/src/recipes/action-button/create-action-button.ts +56 -0
  98. package/src/recipes/editorial-reveal/README.md +35 -0
  99. package/src/recipes/editorial-reveal/create-editorial-reveal.ts +91 -0
  100. package/src/recipes/editorial-reveal/editorial-reveal.css +17 -0
  101. package/src/recipes/film-hero/README.md +23 -0
  102. package/src/recipes/film-hero/create-film-hero.ts +65 -0
  103. package/src/recipes/film-hero/film-hero.css +29 -0
  104. package/src/recipes/font-cycle/README.md +11 -0
  105. package/src/recipes/font-cycle/create-font-cycle.ts +126 -0
  106. package/src/recipes/font-cycle/font-cycle.css +36 -0
  107. package/src/recipes/image-zoom/README.md +16 -0
  108. package/src/recipes/image-zoom/create-image-zoom.ts +27 -0
  109. package/src/recipes/image-zoom/image-zoom.css +7 -0
  110. package/src/recipes/joined-cta/README.md +13 -0
  111. package/src/recipes/joined-cta/create-joined-cta.ts +22 -0
  112. package/src/recipes/joined-cta/joined-cta.css +17 -0
  113. package/src/recipes/local-clock/README.md +31 -0
  114. package/src/recipes/local-clock/create-local-clock.ts +61 -0
  115. package/src/recipes/scroll-dock/README.md +46 -0
  116. package/src/recipes/scroll-dock/create-scroll-dock.ts +72 -0
  117. package/src/recipes/scroll-dock/scroll-dock.css +70 -0
  118. package/src/recipes/sticker/README.md +59 -0
  119. package/src/recipes/sticker/create-sticker.ts +490 -0
  120. package/src/recipes/sticker/sticker.css +112 -0
  121. package/src/recipes/thumbnail-nav/README.md +16 -0
  122. package/src/recipes/thumbnail-nav/create-thumbnail-nav.ts +165 -0
  123. package/src/recipes/thumbnail-nav/thumbnail-nav.css +108 -0
  124. package/src/recipes/weight-hover/README.md +37 -0
  125. package/src/recipes/weight-hover/create-weight-hover.ts +136 -0
  126. package/src/recipes/weight-hover/weight-hover.css +7 -0
  127. package/dist/chunk-JQMJQSXD.js.map +0 -1
  128. package/dist/chunk-XDWBVFHQ.js.map +0 -1
  129. /package/dist/{chunk-BFC27F2G.js.map → chunk-IKQ5FODN.js.map} +0 -0
@@ -7,6 +7,7 @@ import {
7
7
  } from "../chunk-J6OCFNGU.js";
8
8
  import {
9
9
  captureLayout,
10
+ createActionButton,
10
11
  createCardDock,
11
12
  createCascade,
12
13
  createContrast,
@@ -16,12 +17,18 @@ import {
16
17
  createDetails,
17
18
  createDockPill,
18
19
  createDragRuler,
20
+ createEditorialReveal,
19
21
  createFillText,
22
+ createFilmHero,
20
23
  createFitText,
21
24
  createFlow,
25
+ createFontCycle,
22
26
  createFrameZoom,
27
+ createImageZoom,
23
28
  createInfiniteReel,
29
+ createJoinedCta,
24
30
  createLetters,
31
+ createLocalClock,
25
32
  createMarquee,
26
33
  createMaskText,
27
34
  createParallax,
@@ -32,20 +39,24 @@ import {
32
39
  createRepelBento,
33
40
  createReveal,
34
41
  createRotator,
42
+ createScrollDock,
35
43
  createSlotText,
36
44
  createSnapStrip,
37
45
  createSortable,
38
46
  createSpringCards,
47
+ createSticker,
39
48
  createStretchFooter,
40
49
  createTabs,
41
50
  createTextRoll,
51
+ createThumbnailNav,
42
52
  createTicketMenu,
53
+ createWeightHover,
43
54
  createWords,
44
55
  moveItem,
45
56
  pileLayers,
46
57
  pileStyle,
47
58
  reflowLayout
48
- } from "../chunk-XDWBVFHQ.js";
59
+ } from "../chunk-XAKC2QY7.js";
49
60
  import {
50
61
  ICON_PATHS,
51
62
  NAV_STYLES,
@@ -63,12 +74,20 @@ import {
63
74
  morphPendingToReply,
64
75
  revealShell,
65
76
  toast
66
- } from "../chunk-BFC27F2G.js";
77
+ } from "../chunk-IKQ5FODN.js";
67
78
  import {
79
+ createCalendar,
68
80
  createDialog,
81
+ createHoverCard,
82
+ createInputOtp,
69
83
  createMenu,
84
+ createPagination,
85
+ createQuantity,
86
+ createSlotPicker,
87
+ createStudioDock,
88
+ createTrailer,
70
89
  tweenNumber
71
- } from "../chunk-JQMJQSXD.js";
90
+ } from "../chunk-TFNRIZHU.js";
72
91
  import {
73
92
  DEFAULT_THEME,
74
93
  MK_THEME_HEAD_SCRIPT,
@@ -888,15 +907,325 @@ function Island({
888
907
  ] })
889
908
  ] });
890
909
  }
910
+
911
+ // src/components/quantity/react.tsx
912
+ import { useRef as useRef14 } from "react";
913
+ import { jsx as jsx16, jsxs as jsxs6 } from "react/jsx-runtime";
914
+ function Quantity({ min, max, step, value, disabled, onChange, label = "Cantidad", decreaseLabel = "Disminuir", increaseLabel = "Aumentar", name, className, ...props }) {
915
+ const ref = useRef14(null);
916
+ const edited = useRef14(void 0);
917
+ const change = useLatest(onChange);
918
+ useIsomorphicLayoutEffect(() => {
919
+ const instance = createQuantity(ref.current, { min, max, step, value: value ?? edited.current, disabled, onChange: (n) => change.current?.(n) });
920
+ return () => {
921
+ edited.current = instance.value;
922
+ instance.destroy();
923
+ };
924
+ }, [min, max, step, value, disabled]);
925
+ return /* @__PURE__ */ jsxs6("div", { ...props, ref, className: ["mk-quantity", className].filter(Boolean).join(" "), role: "group", "aria-label": label, children: [
926
+ /* @__PURE__ */ jsx16("button", { type: "button", "data-mk-quantity-decrease": true, "aria-label": decreaseLabel, children: "\u2212" }),
927
+ /* @__PURE__ */ jsx16("input", { "data-mk-quantity-input": true, type: "number", "aria-label": label, name, defaultValue: value ?? min ?? 1, disabled }),
928
+ /* @__PURE__ */ jsx16("button", { type: "button", "data-mk-quantity-increase": true, "aria-label": increaseLabel, children: "+" })
929
+ ] });
930
+ }
931
+
932
+ // src/components/pagination/react.tsx
933
+ import { useRef as useRef15 } from "react";
934
+ import { jsx as jsx17, jsxs as jsxs7 } from "react/jsx-runtime";
935
+ function Pagination({ totalPages, page, siblings, pageLabel, onChange, previousLabel = "P\xE1gina anterior", nextLabel = "P\xE1gina siguiente", className, ...props }) {
936
+ const ref = useRef15(null);
937
+ const selected = useRef15(void 0);
938
+ const change = useLatest(onChange);
939
+ const label = useLatest(pageLabel);
940
+ useIsomorphicLayoutEffect(() => {
941
+ const instance = createPagination(ref.current, { totalPages, page: page ?? selected.current, siblings, pageLabel: (n) => label.current?.(n) ?? `P\xE1gina ${n}`, onChange: (n) => change.current?.(n) });
942
+ return () => {
943
+ selected.current = instance.page;
944
+ instance.destroy();
945
+ };
946
+ }, [totalPages, page, siblings, pageLabel]);
947
+ return /* @__PURE__ */ jsxs7("nav", { "aria-label": "Paginaci\xF3n", ...props, ref, className: ["mk-pagination", className].filter(Boolean).join(" "), children: [
948
+ /* @__PURE__ */ jsx17("button", { type: "button", "data-mk-pagination-previous": true, "aria-label": previousLabel, children: "\u2190" }),
949
+ /* @__PURE__ */ jsx17("span", { "data-mk-pagination-pages": true }),
950
+ /* @__PURE__ */ jsx17("button", { type: "button", "data-mk-pagination-next": true, "aria-label": nextLabel, children: "\u2192" })
951
+ ] });
952
+ }
953
+
954
+ // src/components/hover-card/react.tsx
955
+ import { useRef as useRef16 } from "react";
956
+ import { jsx as jsx18, jsxs as jsxs8 } from "react/jsx-runtime";
957
+ function HoverCard({ trigger, children, triggerLabel, panelLabel = "Vista previa", openDelay, closeDelay, placement, onOpenChange, className, ...props }) {
958
+ const ref = useRef16(null);
959
+ const change = useLatest(onOpenChange);
960
+ useIsomorphicLayoutEffect(() => {
961
+ const instance = createHoverCard(ref.current, { openDelay, closeDelay, placement, onOpenChange: (n) => change.current?.(n) });
962
+ return () => instance.destroy();
963
+ }, [openDelay, closeDelay, placement]);
964
+ return /* @__PURE__ */ jsxs8("div", { ...props, ref, className: ["mk-hover-card", className].filter(Boolean).join(" "), children: [
965
+ /* @__PURE__ */ jsx18("button", { type: "button", className: "mk-button mk-button--tonal", "data-mk-hover-trigger": true, "aria-label": triggerLabel, "aria-expanded": "false", children: trigger }),
966
+ /* @__PURE__ */ jsx18("div", { "data-mk-hover-panel": true, role: "region", "aria-label": panelLabel, hidden: true, children })
967
+ ] });
968
+ }
969
+
970
+ // src/components/input-otp/react.tsx
971
+ import { useRef as useRef17 } from "react";
972
+ import { jsx as jsx19, jsxs as jsxs9 } from "react/jsx-runtime";
973
+ function InputOtp({ length, value, defaultValue, mask, onChange, onComplete, label = "C\xF3digo de verificaci\xF3n", name, disabled, required, invalid, className, ...props }) {
974
+ const ref = useRef17(null);
975
+ const edited = useRef17(void 0);
976
+ const change = useLatest(onChange);
977
+ const complete = useLatest(onComplete);
978
+ useIsomorphicLayoutEffect(() => {
979
+ const instance = createInputOtp(ref.current, { length, value: value ?? edited.current, mask, onChange: (n) => change.current?.(n), onComplete: (n) => complete.current?.(n) });
980
+ return () => {
981
+ edited.current = instance.value;
982
+ instance.destroy();
983
+ };
984
+ }, [length, value, mask]);
985
+ return /* @__PURE__ */ jsxs9("div", { ...props, ref, className: ["mk-input-otp", className].filter(Boolean).join(" "), children: [
986
+ /* @__PURE__ */ jsx19("span", { "data-mk-otp-slots": true, "aria-hidden": "true" }),
987
+ /* @__PURE__ */ jsx19("input", { "data-mk-otp-input": true, type: "text", "aria-label": label, name, defaultValue: value ?? defaultValue ?? "", disabled, required, "aria-invalid": invalid || void 0 })
988
+ ] });
989
+ }
990
+
991
+ // src/react/use-joined-cta.ts
992
+ var useJoinedCta = (ref, options, deps) => useRecipe(ref, createJoinedCta, options, deps);
993
+
994
+ // src/react/use-image-zoom.ts
995
+ var useImageZoom = (ref, options, deps) => useRecipe(ref, createImageZoom, options, deps);
996
+
997
+ // src/react/use-font-cycle.ts
998
+ var useFontCycle = (ref, options, deps) => useRecipe(ref, createFontCycle, options, deps);
999
+
1000
+ // src/react/use-thumbnail-nav.ts
1001
+ var useThumbnailNav = (ref, options, deps) => useRecipe(ref, createThumbnailNav, options, deps);
1002
+
1003
+ // src/react/use-action-button.ts
1004
+ var useActionButton = (ref, options, deps) => useRecipe(ref, createActionButton, options, deps);
1005
+
1006
+ // src/react/use-film-hero.ts
1007
+ var useFilmHero = (ref, options, deps) => useRecipe(ref, createFilmHero, options, deps);
1008
+
1009
+ // src/react/use-editorial-reveal.ts
1010
+ function useEditorialReveal(ref, options = {}, deps) {
1011
+ return useRecipe(ref, createEditorialReveal, options, deps);
1012
+ }
1013
+
1014
+ // src/react/use-studio-dock.ts
1015
+ function useStudioDock(ref, options = {}, deps) {
1016
+ const change = useLatest(options.onChange);
1017
+ return useRecipe(ref, createStudioDock, { ...options, onChange: (state) => change.current?.(state) }, deps);
1018
+ }
1019
+
1020
+ // src/react/use-trailer.ts
1021
+ var useTrailer = (ref, options, deps) => useRecipe(ref, createTrailer, options, deps);
1022
+
1023
+ // src/components/studio-dock/react.tsx
1024
+ import { useRef as useRef18 } from "react";
1025
+ import { jsx as jsx20 } from "react/jsx-runtime";
1026
+ function StudioDock({ duration, ease, focusOnOpen, trapFocus, onChange, fixed = false, instanceRef, className, children, ...props }) {
1027
+ const ref = useRef18(null);
1028
+ const change = useLatest(onChange);
1029
+ useIsomorphicLayoutEffect(() => {
1030
+ const instance = createStudioDock(ref.current, { duration, ease, focusOnOpen, trapFocus, onChange: (state) => change.current?.(state) });
1031
+ if (instanceRef) instanceRef.current = instance;
1032
+ return () => {
1033
+ instance.destroy();
1034
+ if (instanceRef) instanceRef.current = null;
1035
+ };
1036
+ }, [duration, ease, focusOnOpen, trapFocus]);
1037
+ return /* @__PURE__ */ jsx20("div", { ...props, ref, className: ["mk-studio-dock", fixed && "mk-studio-dock--fixed", className].filter(Boolean).join(" "), children });
1038
+ }
1039
+
1040
+ // src/components/trailer/react.tsx
1041
+ import { useRef as useRef19 } from "react";
1042
+ import { jsx as jsx21 } from "react/jsx-runtime";
1043
+ function Trailer({ options, className, children, ...props }) {
1044
+ const ref = useRef19(null);
1045
+ useRecipe(ref, createTrailer, options);
1046
+ return /* @__PURE__ */ jsx21("dialog", { ...props, ref, className: ["mk-trailer", className].filter(Boolean).join(" "), children });
1047
+ }
1048
+
1049
+ // src/components/calendar/react.tsx
1050
+ import { useRef as useRef20 } from "react";
1051
+ import { jsx as jsx22, jsxs as jsxs10 } from "react/jsx-runtime";
1052
+ function Calendar({
1053
+ date,
1054
+ view,
1055
+ firstDay,
1056
+ locale,
1057
+ events,
1058
+ maxEvents,
1059
+ selected,
1060
+ today,
1061
+ labels,
1062
+ onSelect,
1063
+ onEventClick,
1064
+ onNavigate,
1065
+ hideViews,
1066
+ className,
1067
+ ...props
1068
+ }) {
1069
+ const ref = useRef20(null);
1070
+ const instance = useRef20(null);
1071
+ const kept = useRef20({});
1072
+ const select = useLatest(onSelect);
1073
+ const eventClick = useLatest(onEventClick);
1074
+ const navigate = useLatest(onNavigate);
1075
+ useIsomorphicLayoutEffect(() => {
1076
+ const created = createCalendar(ref.current, {
1077
+ date: date ?? kept.current.date,
1078
+ view: view ?? kept.current.view,
1079
+ selected: selected !== void 0 ? selected : kept.current.selected,
1080
+ firstDay,
1081
+ locale,
1082
+ events,
1083
+ maxEvents,
1084
+ today,
1085
+ labels,
1086
+ onSelect: (d) => select.current?.(d),
1087
+ onEventClick: (e) => eventClick.current?.(e),
1088
+ onNavigate: (r) => navigate.current?.(r)
1089
+ });
1090
+ instance.current = created;
1091
+ return () => {
1092
+ kept.current = { date: created.date, view: created.view, selected: created.selected };
1093
+ created.destroy();
1094
+ instance.current = null;
1095
+ };
1096
+ }, [date, view, firstDay, locale, maxEvents, today]);
1097
+ const eventsKey = JSON.stringify(events ?? []);
1098
+ const firstEvents = useRef20(true);
1099
+ useIsomorphicLayoutEffect(() => {
1100
+ if (firstEvents.current) {
1101
+ firstEvents.current = false;
1102
+ return;
1103
+ }
1104
+ instance.current?.setEvents(events ?? []);
1105
+ }, [eventsKey]);
1106
+ useIsomorphicLayoutEffect(() => {
1107
+ if (selected !== void 0) instance.current?.select(selected, false);
1108
+ }, [selected]);
1109
+ return /* @__PURE__ */ jsxs10("div", { ...props, ref, className: ["mk-calendar", className].filter(Boolean).join(" "), children: [
1110
+ /* @__PURE__ */ jsxs10("div", { className: "mk-calendar__header", children: [
1111
+ /* @__PURE__ */ jsx22("h3", { className: "mk-calendar__title", "data-mk-calendar-title": true }),
1112
+ !hideViews && /* @__PURE__ */ jsxs10("div", { className: "mk-calendar__views", role: "group", "aria-label": "Vista", children: [
1113
+ /* @__PURE__ */ jsx22("button", { type: "button", "data-mk-calendar-view": "month", children: labels?.month ?? "Mes" }),
1114
+ /* @__PURE__ */ jsx22("button", { type: "button", "data-mk-calendar-view": "week", children: labels?.week ?? "Semana" })
1115
+ ] }),
1116
+ /* @__PURE__ */ jsx22("button", { type: "button", className: "mk-calendar__nav", "data-mk-calendar-prev": true, "aria-label": labels?.previous ?? "Anterior", children: "\u2190" }),
1117
+ /* @__PURE__ */ jsx22("button", { type: "button", className: "mk-calendar__nav", "data-mk-calendar-today": true, children: labels?.today ?? "Hoy" }),
1118
+ /* @__PURE__ */ jsx22("button", { type: "button", className: "mk-calendar__nav", "data-mk-calendar-next": true, "aria-label": labels?.next ?? "Siguiente", children: "\u2192" })
1119
+ ] }),
1120
+ /* @__PURE__ */ jsx22("div", { "data-mk-calendar-grid": true })
1121
+ ] });
1122
+ }
1123
+
1124
+ // src/components/slot-picker/react.tsx
1125
+ import { useRef as useRef21 } from "react";
1126
+ import { jsx as jsx23, jsxs as jsxs11 } from "react/jsx-runtime";
1127
+ function SlotPicker({
1128
+ date,
1129
+ value,
1130
+ slots,
1131
+ min,
1132
+ max,
1133
+ closedDays,
1134
+ isDisabled,
1135
+ firstDay,
1136
+ locale,
1137
+ labels,
1138
+ onChange,
1139
+ onDateChange,
1140
+ name,
1141
+ actions,
1142
+ className,
1143
+ ...props
1144
+ }) {
1145
+ const ref = useRef21(null);
1146
+ const instance = useRef21(null);
1147
+ const kept = useRef21(null);
1148
+ const change = useLatest(onChange);
1149
+ const dateChange = useLatest(onDateChange);
1150
+ const disabledFn = useLatest(isDisabled);
1151
+ const source = useLatest(slots);
1152
+ const slotsKey = typeof slots === "function" ? "function" : JSON.stringify(slots ?? []);
1153
+ const stable = () => {
1154
+ const current = source.current;
1155
+ return typeof current === "function" ? (d) => source.current(d) : current ?? [];
1156
+ };
1157
+ useIsomorphicLayoutEffect(() => {
1158
+ const keep = kept.current;
1159
+ const created = createSlotPicker(ref.current, {
1160
+ date: date ?? (keep instanceof Date ? keep : void 0),
1161
+ value: value !== void 0 ? value : typeof keep === "string" ? keep : void 0,
1162
+ slots: stable(),
1163
+ min,
1164
+ max,
1165
+ closedDays,
1166
+ firstDay,
1167
+ locale,
1168
+ labels,
1169
+ isDisabled: (d) => disabledFn.current?.(d) ?? false,
1170
+ onChange: (v) => change.current?.(v),
1171
+ onDateChange: (d) => dateChange.current?.(d)
1172
+ });
1173
+ instance.current = created;
1174
+ return () => {
1175
+ kept.current = created.value ?? created.date;
1176
+ created.destroy();
1177
+ instance.current = null;
1178
+ };
1179
+ }, [date, value, min, max, firstDay, locale, JSON.stringify(closedDays ?? [])]);
1180
+ const firstSlots = useRef21(true);
1181
+ useIsomorphicLayoutEffect(() => {
1182
+ if (firstSlots.current) {
1183
+ firstSlots.current = false;
1184
+ return;
1185
+ }
1186
+ instance.current?.setSlots(stable());
1187
+ }, [slotsKey]);
1188
+ return /* @__PURE__ */ jsxs11("div", { ...props, ref, className: ["mk-slot-picker", className].filter(Boolean).join(" "), children: [
1189
+ /* @__PURE__ */ jsxs11("div", { className: "mk-slot-picker__calendar", children: [
1190
+ /* @__PURE__ */ jsxs11("div", { className: "mk-slot-picker__month", children: [
1191
+ /* @__PURE__ */ jsx23("h3", { className: "mk-slot-picker__title", "data-mk-slot-title": true }),
1192
+ /* @__PURE__ */ jsx23("button", { type: "button", className: "mk-slot-picker__nav", "data-mk-slot-prev": true, "aria-label": labels?.previous ?? "Mes anterior", children: "\u2190" }),
1193
+ /* @__PURE__ */ jsx23("button", { type: "button", className: "mk-slot-picker__nav", "data-mk-slot-next": true, "aria-label": labels?.next ?? "Mes siguiente", children: "\u2192" })
1194
+ ] }),
1195
+ /* @__PURE__ */ jsx23("div", { "data-mk-slot-days": true })
1196
+ ] }),
1197
+ /* @__PURE__ */ jsxs11("div", { className: "mk-slot-picker__panel", children: [
1198
+ /* @__PURE__ */ jsx23("p", { className: "mk-slot-picker__heading", "data-mk-slot-heading": true }),
1199
+ /* @__PURE__ */ jsx23("div", { "data-mk-slot-times": true }),
1200
+ name && /* @__PURE__ */ jsx23("input", { type: "hidden", name, "data-mk-slot-value": true }),
1201
+ actions && /* @__PURE__ */ jsx23("div", { className: "mk-slot-picker__actions", children: actions })
1202
+ ] })
1203
+ ] });
1204
+ }
1205
+
1206
+ // src/react/use-weight-hover.ts
1207
+ var useWeightHover = (ref, options, deps) => useRecipe(ref, createWeightHover, options, deps);
1208
+
1209
+ // src/react/use-sticker.ts
1210
+ var useSticker = (ref, options, deps) => useRecipe(ref, createSticker, options, deps);
1211
+
1212
+ // src/react/use-scroll-dock.ts
1213
+ var useScrollDock = (ref, options, deps) => useRecipe(ref, createScrollDock, options, deps);
1214
+
1215
+ // src/react/use-local-clock.ts
1216
+ var useLocalClock = (ref, options, deps) => useRecipe(ref, createLocalClock, options, deps);
891
1217
  export {
892
1218
  ANIMATIONS,
893
1219
  AnimatedNumber,
1220
+ Calendar,
894
1221
  Chat,
895
1222
  ChatBackground,
896
1223
  Cursor,
897
1224
  Dialog,
898
1225
  FlipGroup,
899
1226
  Frost,
1227
+ HoverCard,
1228
+ InputOtp,
900
1229
  Island,
901
1230
  IslandDots,
902
1231
  MK_HEAD_SCRIPT,
@@ -905,11 +1234,16 @@ export {
905
1234
  MkIcon,
906
1235
  NAV_STYLES,
907
1236
  Nav,
1237
+ Pagination,
1238
+ Quantity,
1239
+ SlotPicker,
908
1240
  SlotText,
909
1241
  Steps,
1242
+ StudioDock,
910
1243
  ThemePicker,
911
1244
  ThemeProvider,
912
1245
  Toaster,
1246
+ Trailer,
913
1247
  animate,
914
1248
  clearToasts,
915
1249
  confetti,
@@ -920,6 +1254,7 @@ export {
920
1254
  pileStyle,
921
1255
  themeHeadScript,
922
1256
  toast,
1257
+ useActionButton,
923
1258
  useCardDock,
924
1259
  useCascade,
925
1260
  useChat,
@@ -931,15 +1266,21 @@ export {
931
1266
  useDialog,
932
1267
  useDockPill,
933
1268
  useDragRuler,
1269
+ useEditorialReveal,
934
1270
  useFillText,
1271
+ useFilmHero,
935
1272
  useFitText,
936
1273
  useFlow,
1274
+ useFontCycle,
937
1275
  useFrameZoom,
1276
+ useImageZoom,
938
1277
  useInfiniteReel,
939
1278
  useIsomorphicLayoutEffect,
1279
+ useJoinedCta,
940
1280
  useLatest,
941
1281
  useLetters,
942
1282
  useLiquidBlend,
1283
+ useLocalClock,
943
1284
  useMarquee,
944
1285
  useMaskText,
945
1286
  useMatcap,
@@ -953,17 +1294,23 @@ export {
953
1294
  useRepelBento,
954
1295
  useReveal,
955
1296
  useRotator,
1297
+ useScrollDock,
956
1298
  useShaderBlur,
957
1299
  useShaderGrain,
958
1300
  useSlotText,
959
1301
  useSnapStrip,
960
1302
  useSortable,
961
1303
  useSpringCards,
1304
+ useSticker,
962
1305
  useStretchFooter,
1306
+ useStudioDock,
963
1307
  useTabs,
964
1308
  useTextRoll,
965
1309
  useTheme,
1310
+ useThumbnailNav,
966
1311
  useTicketMenu,
1312
+ useTrailer,
1313
+ useWeightHover,
967
1314
  useWords
968
1315
  };
969
1316
  //# sourceMappingURL=index.js.map