@yewdiel21/motion-kit 0.17.0 → 0.18.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 (146) hide show
  1. package/README.md +23 -0
  2. package/dist/auto/index.d.ts +18 -3
  3. package/dist/auto/index.js +32 -2
  4. package/dist/auto/index.js.map +1 -1
  5. package/dist/{chunk-VJFPTLAK.js → chunk-AWDEKDEJ.js} +2 -2
  6. package/dist/{chunk-BZLMCHUD.js → chunk-EDMXWUW3.js} +2 -2
  7. package/dist/{chunk-7IQTMF7Y.js → chunk-Q7IW4FV3.js} +2580 -58
  8. package/dist/chunk-Q7IW4FV3.js.map +1 -0
  9. package/dist/css/components/badge-button.css +16 -0
  10. package/dist/css/components/bento-grid.css +13 -0
  11. package/dist/css/components/drilldown-menu.css +11 -7
  12. package/dist/css/components/equalizer-slider.css +26 -0
  13. package/dist/css/components/handwriting-text.css +15 -0
  14. package/dist/css/components/magnetize-button.css +18 -0
  15. package/dist/css/components/morphing-page-dots.css +13 -0
  16. package/dist/css/components/not-found.css +22 -0
  17. package/dist/css/components/notification-stack.css +42 -0
  18. package/dist/css/components/particle-button.css +14 -0
  19. package/dist/css/components/radio-group.css +29 -0
  20. package/dist/css/components/rating-scale.css +23 -0
  21. package/dist/css/components/scroll-preview-dock.css +18 -0
  22. package/dist/css/components/select.css +16 -0
  23. package/dist/css/components/signature-pad.css +130 -103
  24. package/dist/css/components/stepper.css +36 -0
  25. package/dist/css/components/sticky-header.css +10 -0
  26. package/dist/css/components/temperature-slider.css +29 -0
  27. package/dist/css/components/voice-message-bubble.css +62 -45
  28. package/dist/css/components/waveform-player.css +49 -34
  29. package/dist/css/components/wheel-picker.css +16 -15
  30. package/dist/css/tokens.css +4 -0
  31. package/dist/elements/index.d.ts +206 -4
  32. package/dist/elements/index.js +581 -6
  33. package/dist/elements/index.js.map +1 -1
  34. package/dist/{engine-Bn6hC87X.d.ts → engine-t8d7brjn.d.ts} +341 -1
  35. package/dist/index.css +578 -170
  36. package/dist/index.d.ts +23 -23
  37. package/dist/index.js +33 -3
  38. package/dist/index.js.map +1 -1
  39. package/dist/react/index.d.ts +113 -7
  40. package/dist/react/index.js +669 -3
  41. package/dist/react/index.js.map +1 -1
  42. package/dist/{reduced-YS6TZjpa.d.ts → reduced-dPsZYqtI.d.ts} +1 -1
  43. package/dist/{store-CZ6vdtIE.d.ts → store-6hZNKiee.d.ts} +1 -1
  44. package/package.json +1 -1
  45. package/registry.json +180 -0
  46. package/src/auto/auto-init.ts +31 -0
  47. package/src/components/badge-button/README.md +28 -0
  48. package/src/components/badge-button/badge-button.css +15 -0
  49. package/src/components/badge-button/element.ts +16 -0
  50. package/src/components/badge-button/engine.ts +85 -0
  51. package/src/components/badge-button/react.tsx +31 -0
  52. package/src/components/bento-grid/README.md +26 -0
  53. package/src/components/bento-grid/bento-grid.css +12 -0
  54. package/src/components/bento-grid/element.ts +22 -0
  55. package/src/components/bento-grid/engine.ts +153 -0
  56. package/src/components/bento-grid/react.tsx +25 -0
  57. package/src/components/drilldown-menu/drilldown-menu.css +11 -7
  58. package/src/components/drilldown-menu/engine.ts +44 -4
  59. package/src/components/equalizer-slider/README.md +43 -0
  60. package/src/components/equalizer-slider/element.ts +41 -0
  61. package/src/components/equalizer-slider/engine.ts +32 -0
  62. package/src/components/equalizer-slider/equalizer-slider.css +26 -0
  63. package/src/components/equalizer-slider/react.tsx +60 -0
  64. package/src/components/equalizer-slider/shared.ts +161 -0
  65. package/src/components/handwriting-text/README.md +29 -0
  66. package/src/components/handwriting-text/element.ts +14 -0
  67. package/src/components/handwriting-text/engine.ts +108 -0
  68. package/src/components/handwriting-text/glyphs.ts +71 -0
  69. package/src/components/handwriting-text/handwriting-text.css +14 -0
  70. package/src/components/handwriting-text/react.tsx +23 -0
  71. package/src/components/magnetize-button/README.md +26 -0
  72. package/src/components/magnetize-button/element.ts +13 -0
  73. package/src/components/magnetize-button/engine.ts +84 -0
  74. package/src/components/magnetize-button/magnetize-button.css +17 -0
  75. package/src/components/magnetize-button/react.tsx +22 -0
  76. package/src/components/morphing-page-dots/README.md +28 -0
  77. package/src/components/morphing-page-dots/element.ts +16 -0
  78. package/src/components/morphing-page-dots/engine.ts +89 -0
  79. package/src/components/morphing-page-dots/morphing-page-dots.css +12 -0
  80. package/src/components/morphing-page-dots/react.tsx +32 -0
  81. package/src/components/not-found/README.md +26 -0
  82. package/src/components/not-found/element.ts +15 -0
  83. package/src/components/not-found/engine.ts +57 -0
  84. package/src/components/not-found/not-found.css +21 -0
  85. package/src/components/not-found/react.tsx +23 -0
  86. package/src/components/notification-stack/README.md +24 -0
  87. package/src/components/notification-stack/element.ts +26 -0
  88. package/src/components/notification-stack/engine.ts +329 -0
  89. package/src/components/notification-stack/notification-stack.css +41 -0
  90. package/src/components/notification-stack/react.tsx +28 -0
  91. package/src/components/particle-button/README.md +26 -0
  92. package/src/components/particle-button/element.ts +13 -0
  93. package/src/components/particle-button/engine.ts +52 -0
  94. package/src/components/particle-button/particle-button.css +13 -0
  95. package/src/components/particle-button/react.tsx +22 -0
  96. package/src/components/radio-group/README.md +43 -0
  97. package/src/components/radio-group/element.ts +41 -0
  98. package/src/components/radio-group/engine.ts +11 -0
  99. package/src/components/radio-group/radio-group.css +28 -0
  100. package/src/components/radio-group/react.tsx +60 -0
  101. package/src/components/radio-group/shared.ts +118 -0
  102. package/src/components/rating-scale/README.md +43 -0
  103. package/src/components/rating-scale/element.ts +41 -0
  104. package/src/components/rating-scale/engine.ts +63 -0
  105. package/src/components/rating-scale/rating-scale.css +22 -0
  106. package/src/components/rating-scale/react.tsx +60 -0
  107. package/src/components/scroll-preview-dock/README.md +24 -0
  108. package/src/components/scroll-preview-dock/element.ts +20 -0
  109. package/src/components/scroll-preview-dock/engine.ts +228 -0
  110. package/src/components/scroll-preview-dock/react.tsx +26 -0
  111. package/src/components/scroll-preview-dock/scroll-preview-dock.css +17 -0
  112. package/src/components/select/README.md +23 -9
  113. package/src/components/select/select.css +16 -0
  114. package/src/components/signature-pad/engine.ts +550 -437
  115. package/src/components/signature-pad/signature-pad.css +130 -103
  116. package/src/components/stepper/README.md +46 -0
  117. package/src/components/stepper/element.ts +42 -0
  118. package/src/components/stepper/engine.ts +103 -0
  119. package/src/components/stepper/react.tsx +60 -0
  120. package/src/components/stepper/stepper.css +35 -0
  121. package/src/components/sticky-header/README.md +30 -0
  122. package/src/components/sticky-header/element.ts +19 -0
  123. package/src/components/sticky-header/engine.ts +95 -0
  124. package/src/components/sticky-header/react.tsx +25 -0
  125. package/src/components/sticky-header/sticky-header.css +9 -0
  126. package/src/components/temperature-slider/README.md +42 -0
  127. package/src/components/temperature-slider/element.ts +53 -0
  128. package/src/components/temperature-slider/engine.ts +44 -0
  129. package/src/components/temperature-slider/react.tsx +66 -0
  130. package/src/components/temperature-slider/temperature-slider.css +29 -0
  131. package/src/components/voice-message-bubble/engine.ts +11 -0
  132. package/src/components/voice-message-bubble/voice-message-bubble.css +14 -12
  133. package/src/components/waveform-player/README.md +1 -1
  134. package/src/components/waveform-player/engine.ts +344 -261
  135. package/src/components/waveform-player/waveform-player.css +50 -35
  136. package/src/components/wheel-picker/README.md +3 -1
  137. package/src/components/wheel-picker/element.ts +12 -5
  138. package/src/components/wheel-picker/engine.ts +37 -8
  139. package/src/components/wheel-picker/wheel-picker.css +17 -16
  140. package/src/css/tokens.css +4 -0
  141. package/src/elements/index.ts +45 -0
  142. package/src/index.ts +311 -295
  143. package/src/react/index.ts +16 -0
  144. package/dist/chunk-7IQTMF7Y.js.map +0 -1
  145. /package/dist/{chunk-VJFPTLAK.js.map → chunk-AWDEKDEJ.js.map} +0 -0
  146. /package/dist/{chunk-BZLMCHUD.js.map → chunk-EDMXWUW3.js.map} +0 -0
@@ -55,7 +55,7 @@ import {
55
55
  pileLayers,
56
56
  pileStyle,
57
57
  reflowLayout
58
- } from "../chunk-BZLMCHUD.js";
58
+ } from "../chunk-EDMXWUW3.js";
59
59
  import {
60
60
  ICON_PATHS,
61
61
  NAV_STYLES,
@@ -84,12 +84,14 @@ import {
84
84
  revealShell,
85
85
  toNavStyle,
86
86
  toast
87
- } from "../chunk-VJFPTLAK.js";
87
+ } from "../chunk-AWDEKDEJ.js";
88
88
  import {
89
89
  confetti,
90
90
  createActivityFeed,
91
91
  createAddToCart,
92
92
  createAttachment,
93
+ createBadgeButton,
94
+ createBentoGrid,
93
95
  createBreadcrumb,
94
96
  createCalendar,
95
97
  createChart,
@@ -111,8 +113,10 @@ import {
111
113
  createDrilldownMenu,
112
114
  createEditableTable,
113
115
  createEmptyState,
116
+ createEqualizerSlider,
114
117
  createFileExplorer,
115
118
  createFilterBuilder,
119
+ createHandwritingText,
116
120
  createHoldConfirm,
117
121
  createHoverCard,
118
122
  createImagePreview,
@@ -120,21 +124,29 @@ import {
120
124
  createJsonViewer,
121
125
  createLikeButton,
122
126
  createLoadingButton,
127
+ createMagnetizeButton,
123
128
  createMenu,
129
+ createMorphingPageDots,
124
130
  createMultiSelect,
131
+ createNotFound,
125
132
  createNotificationBell,
133
+ createNotificationStack,
126
134
  createPagination,
135
+ createParticleButton,
127
136
  createPasswordStrength,
128
137
  createPopover,
129
138
  createProgress,
130
139
  createQuantity,
131
140
  createQuestionnaire,
141
+ createRadioGroup,
132
142
  createRangeCalendar,
133
143
  createRangeSlider,
144
+ createRatingScale,
134
145
  createResizablePanel,
135
146
  createRichTextEditor,
136
147
  createScratchCard,
137
148
  createScrollIsland,
149
+ createScrollPreviewDock,
138
150
  createSelect,
139
151
  createSignaturePad,
140
152
  createSkeleton,
@@ -142,10 +154,13 @@ import {
142
154
  createSplitView,
143
155
  createStarRating,
144
156
  createStatCard,
157
+ createStepper,
145
158
  createSteps,
159
+ createStickyHeader,
146
160
  createStudioDock,
147
161
  createSwipeActions,
148
162
  createTagInput,
163
+ createTemperatureSlider,
149
164
  createTimeField,
150
165
  createTimeline,
151
166
  createTooltip,
@@ -170,7 +185,7 @@ import {
170
185
  tokenLines,
171
186
  tokenize,
172
187
  tweenNumber
173
- } from "../chunk-7IQTMF7Y.js";
188
+ } from "../chunk-Q7IW4FV3.js";
174
189
  import {
175
190
  DEFAULT_THEME,
176
191
  MK_THEME_HEAD_SCRIPT,
@@ -3710,12 +3725,650 @@ function WheelPicker({ items, value, defaultValue, name, label, disabled, visibl
3710
3725
  delete domProps.dangerouslySetInnerHTML;
3711
3726
  return /* @__PURE__ */ jsx89("div", { ...domProps, ref, className: ["mk-wheel-picker", className].filter(Boolean).join(" ") });
3712
3727
  }
3728
+
3729
+ // src/components/stepper/react.tsx
3730
+ import { useRef as useRef84 } from "react";
3731
+ import { jsx as jsx90 } from "react/jsx-runtime";
3732
+ function Stepper({ value, defaultValue, items, label, name, variant, linear, disabled, onChange, instanceRef, className, children: _children, dangerouslySetInnerHTML: _html, ...props }) {
3733
+ const root = useRef84(null);
3734
+ const engine = useRef84(null);
3735
+ const latestValue = useLatest(value);
3736
+ const change = useLatest(onChange);
3737
+ const baseline = useRef84(value !== void 0 ? value : defaultValue);
3738
+ const current = useRef84(baseline.current);
3739
+ const reconcile = () => queueMicrotask(() => {
3740
+ if (latestValue.current !== void 0) engine.current?.setValue(latestValue.current, false);
3741
+ });
3742
+ useIsomorphicLayoutEffect(() => {
3743
+ const created = createStepper(root.current, {
3744
+ items,
3745
+ label,
3746
+ name,
3747
+ variant,
3748
+ linear,
3749
+ disabled,
3750
+ value: latestValue.current !== void 0 ? latestValue.current : current.current,
3751
+ defaultValue: baseline.current,
3752
+ onChange: (next) => {
3753
+ change.current?.(next);
3754
+ reconcile();
3755
+ }
3756
+ });
3757
+ engine.current = created;
3758
+ const form = root.current?.closest("form");
3759
+ const pending = /* @__PURE__ */ new Set();
3760
+ const reset = (event) => {
3761
+ const timer = setTimeout(() => {
3762
+ pending.delete(timer);
3763
+ if (!event.defaultPrevented && latestValue.current !== void 0) created.setValue(latestValue.current, false);
3764
+ }, 0);
3765
+ pending.add(timer);
3766
+ };
3767
+ form?.addEventListener("reset", reset);
3768
+ return () => {
3769
+ form?.removeEventListener("reset", reset);
3770
+ pending.forEach((timer) => clearTimeout(timer));
3771
+ current.current = created.value;
3772
+ created.destroy();
3773
+ engine.current = null;
3774
+ };
3775
+ }, [items, label, name, variant, linear, disabled]);
3776
+ useIsomorphicLayoutEffect(() => {
3777
+ if (value !== void 0) engine.current?.setValue(value, false);
3778
+ });
3779
+ useIsomorphicLayoutEffect(() => {
3780
+ if (!instanceRef) return;
3781
+ instanceRef.current = engine.current;
3782
+ return () => {
3783
+ instanceRef.current = null;
3784
+ };
3785
+ }, [instanceRef, items, label, name, variant, linear, disabled]);
3786
+ return /* @__PURE__ */ jsx90("div", { ...props, ref: root, className: ["mk-stepper", className].filter(Boolean).join(" ") });
3787
+ }
3788
+
3789
+ // src/components/radio-group/react.tsx
3790
+ import { useRef as useRef85 } from "react";
3791
+ import { jsx as jsx91 } from "react/jsx-runtime";
3792
+ function RadioGroup({ value, defaultValue, items, name, label, disabled, required, error, variant, onChange, instanceRef, className, children: _children, dangerouslySetInnerHTML: _html, ...props }) {
3793
+ const root = useRef85(null);
3794
+ const engine = useRef85(null);
3795
+ const latestValue = useLatest(value);
3796
+ const change = useLatest(onChange);
3797
+ const baseline = useRef85(value !== void 0 ? value : defaultValue);
3798
+ const current = useRef85(baseline.current);
3799
+ const reconcile = () => queueMicrotask(() => {
3800
+ if (latestValue.current !== void 0) engine.current?.setValue(latestValue.current, false);
3801
+ });
3802
+ useIsomorphicLayoutEffect(() => {
3803
+ const created = createRadioGroup(root.current, {
3804
+ items,
3805
+ name,
3806
+ label,
3807
+ disabled,
3808
+ required,
3809
+ error,
3810
+ variant,
3811
+ value: latestValue.current !== void 0 ? latestValue.current : current.current,
3812
+ defaultValue: baseline.current,
3813
+ onChange: (next) => {
3814
+ change.current?.(next);
3815
+ reconcile();
3816
+ }
3817
+ });
3818
+ engine.current = created;
3819
+ const form = root.current?.closest("form");
3820
+ const pending = /* @__PURE__ */ new Set();
3821
+ const reset = (event) => {
3822
+ const timer = setTimeout(() => {
3823
+ pending.delete(timer);
3824
+ if (!event.defaultPrevented && latestValue.current !== void 0) created.setValue(latestValue.current, false);
3825
+ }, 0);
3826
+ pending.add(timer);
3827
+ };
3828
+ form?.addEventListener("reset", reset);
3829
+ return () => {
3830
+ form?.removeEventListener("reset", reset);
3831
+ pending.forEach((timer) => clearTimeout(timer));
3832
+ current.current = created.value;
3833
+ created.destroy();
3834
+ engine.current = null;
3835
+ };
3836
+ }, [items, name, label, disabled, required, error, variant]);
3837
+ useIsomorphicLayoutEffect(() => {
3838
+ if (value !== void 0) engine.current?.setValue(value, false);
3839
+ });
3840
+ useIsomorphicLayoutEffect(() => {
3841
+ if (!instanceRef) return;
3842
+ instanceRef.current = engine.current;
3843
+ return () => {
3844
+ instanceRef.current = null;
3845
+ };
3846
+ }, [instanceRef, items, name, label, disabled, required, error, variant]);
3847
+ return /* @__PURE__ */ jsx91("div", { ...props, ref: root, className: ["mk-radio-group", className].filter(Boolean).join(" ") });
3848
+ }
3849
+
3850
+ // src/components/equalizer-slider/react.tsx
3851
+ import { useRef as useRef86 } from "react";
3852
+ import { jsx as jsx92 } from "react/jsx-runtime";
3853
+ function EqualizerSlider({ value, defaultValue, min, max, step, label, name, disabled, error, formatValue, waveform, bars, onChange, onInput, instanceRef, className, children: _children, dangerouslySetInnerHTML: _html, ...props }) {
3854
+ const root = useRef86(null);
3855
+ const engine = useRef86(null);
3856
+ const latestValue = useLatest(value);
3857
+ const change = useLatest(onChange);
3858
+ const input = useLatest(onInput);
3859
+ const baseline = useRef86(value !== void 0 ? value : defaultValue);
3860
+ const current = useRef86(baseline.current);
3861
+ const reconcile = () => queueMicrotask(() => {
3862
+ if (latestValue.current !== void 0) engine.current?.setValue(latestValue.current, false);
3863
+ });
3864
+ useIsomorphicLayoutEffect(() => {
3865
+ const created = createEqualizerSlider(root.current, {
3866
+ min,
3867
+ max,
3868
+ step,
3869
+ label,
3870
+ name,
3871
+ disabled,
3872
+ error,
3873
+ formatValue,
3874
+ waveform,
3875
+ bars,
3876
+ value: latestValue.current !== void 0 ? latestValue.current : current.current,
3877
+ defaultValue: baseline.current,
3878
+ onChange: (next) => {
3879
+ change.current?.(next);
3880
+ reconcile();
3881
+ },
3882
+ onInput: (next) => {
3883
+ input.current?.(next);
3884
+ if (input.current || !change.current) reconcile();
3885
+ }
3886
+ });
3887
+ engine.current = created;
3888
+ const form = root.current?.closest("form");
3889
+ const pending = /* @__PURE__ */ new Set();
3890
+ const reset = (event) => {
3891
+ const timer = setTimeout(() => {
3892
+ pending.delete(timer);
3893
+ if (!event.defaultPrevented && latestValue.current !== void 0) created.setValue(latestValue.current, false);
3894
+ }, 0);
3895
+ pending.add(timer);
3896
+ };
3897
+ form?.addEventListener("reset", reset);
3898
+ return () => {
3899
+ form?.removeEventListener("reset", reset);
3900
+ pending.forEach((timer) => clearTimeout(timer));
3901
+ current.current = created.value;
3902
+ created.destroy();
3903
+ engine.current = null;
3904
+ };
3905
+ }, [min, max, step, label, name, disabled, error, formatValue, waveform, bars]);
3906
+ useIsomorphicLayoutEffect(() => {
3907
+ if (value !== void 0) engine.current?.setValue(value, false);
3908
+ });
3909
+ useIsomorphicLayoutEffect(() => {
3910
+ if (!instanceRef) return;
3911
+ instanceRef.current = engine.current;
3912
+ return () => {
3913
+ instanceRef.current = null;
3914
+ };
3915
+ }, [instanceRef, min, max, step, label, name, disabled, error, formatValue, waveform, bars]);
3916
+ return /* @__PURE__ */ jsx92("div", { ...props, ref: root, className: ["mk-equalizer-slider", className].filter(Boolean).join(" ") });
3917
+ }
3918
+
3919
+ // src/components/temperature-slider/react.tsx
3920
+ import { useRef as useRef87 } from "react";
3921
+ import { jsx as jsx93 } from "react/jsx-runtime";
3922
+ function TemperatureSlider({ value, defaultValue, min, max, step, label, name, disabled, error, formatValue, unit, onChange, onInput, instanceRef, className, children: _children, dangerouslySetInnerHTML: _html, ...props }) {
3923
+ const root = useRef87(null);
3924
+ const engine = useRef87(null);
3925
+ const latestValue = useLatest(value);
3926
+ const change = useLatest(onChange);
3927
+ const input = useLatest(onInput);
3928
+ const baseline = useRef87(value !== void 0 ? value : defaultValue);
3929
+ const current = useRef87(baseline.current);
3930
+ const reconcile = () => queueMicrotask(() => {
3931
+ if (latestValue.current !== void 0) engine.current?.setValue(latestValue.current, false);
3932
+ });
3933
+ useIsomorphicLayoutEffect(() => {
3934
+ const created = createTemperatureSlider(root.current, {
3935
+ min,
3936
+ max,
3937
+ step,
3938
+ label,
3939
+ name,
3940
+ disabled,
3941
+ error,
3942
+ formatValue,
3943
+ unit,
3944
+ value: latestValue.current !== void 0 ? latestValue.current : current.current,
3945
+ defaultValue: baseline.current,
3946
+ onChange: (next) => {
3947
+ change.current?.(next);
3948
+ reconcile();
3949
+ },
3950
+ onInput: (next) => {
3951
+ input.current?.(next);
3952
+ if (input.current || !change.current) reconcile();
3953
+ }
3954
+ });
3955
+ engine.current = created;
3956
+ const form = root.current?.closest("form");
3957
+ const pending = /* @__PURE__ */ new Set();
3958
+ const reset = (event) => {
3959
+ const timer = setTimeout(() => {
3960
+ pending.delete(timer);
3961
+ if (!event.defaultPrevented && latestValue.current !== void 0) created.setValue(latestValue.current, false);
3962
+ }, 0);
3963
+ pending.add(timer);
3964
+ };
3965
+ form?.addEventListener("reset", reset);
3966
+ return () => {
3967
+ form?.removeEventListener("reset", reset);
3968
+ pending.forEach((timer) => clearTimeout(timer));
3969
+ current.current = created.value;
3970
+ created.destroy();
3971
+ engine.current = null;
3972
+ };
3973
+ }, [min, max, step, label, name, disabled, error, formatValue]);
3974
+ useIsomorphicLayoutEffect(() => {
3975
+ const next = unit === "F" ? "F" : "C";
3976
+ if (engine.current && engine.current.unit !== next) engine.current.setUnit(next, { min, max, step });
3977
+ }, [unit]);
3978
+ useIsomorphicLayoutEffect(() => {
3979
+ if (value !== void 0) engine.current?.setValue(value, false);
3980
+ });
3981
+ useIsomorphicLayoutEffect(() => {
3982
+ if (!instanceRef) return;
3983
+ instanceRef.current = engine.current;
3984
+ return () => {
3985
+ instanceRef.current = null;
3986
+ };
3987
+ }, [instanceRef, min, max, step, label, name, disabled, error, formatValue]);
3988
+ return /* @__PURE__ */ jsx93("div", { ...props, ref: root, className: ["mk-temperature-slider", className].filter(Boolean).join(" ") });
3989
+ }
3990
+
3991
+ // src/components/rating-scale/react.tsx
3992
+ import { useRef as useRef88 } from "react";
3993
+ import { jsx as jsx94 } from "react/jsx-runtime";
3994
+ function RatingScale({ value, defaultValue, min, max, variant, labels, label, name, disabled, required, error, onChange, instanceRef, className, children: _children, dangerouslySetInnerHTML: _html, ...props }) {
3995
+ const root = useRef88(null);
3996
+ const engine = useRef88(null);
3997
+ const latestValue = useLatest(value);
3998
+ const change = useLatest(onChange);
3999
+ const baseline = useRef88(value !== void 0 ? value : defaultValue);
4000
+ const current = useRef88(baseline.current);
4001
+ const reconcile = () => queueMicrotask(() => {
4002
+ if (latestValue.current !== void 0) engine.current?.setValue(latestValue.current, false);
4003
+ });
4004
+ useIsomorphicLayoutEffect(() => {
4005
+ const created = createRatingScale(root.current, {
4006
+ min,
4007
+ max,
4008
+ variant,
4009
+ labels,
4010
+ label,
4011
+ name,
4012
+ disabled,
4013
+ required,
4014
+ error,
4015
+ value: latestValue.current !== void 0 ? latestValue.current : current.current,
4016
+ defaultValue: baseline.current,
4017
+ onChange: (next) => {
4018
+ change.current?.(next);
4019
+ reconcile();
4020
+ }
4021
+ });
4022
+ engine.current = created;
4023
+ const form = root.current?.closest("form");
4024
+ const pending = /* @__PURE__ */ new Set();
4025
+ const reset = (event) => {
4026
+ const timer = setTimeout(() => {
4027
+ pending.delete(timer);
4028
+ if (!event.defaultPrevented && latestValue.current !== void 0) created.setValue(latestValue.current, false);
4029
+ }, 0);
4030
+ pending.add(timer);
4031
+ };
4032
+ form?.addEventListener("reset", reset);
4033
+ return () => {
4034
+ form?.removeEventListener("reset", reset);
4035
+ pending.forEach((timer) => clearTimeout(timer));
4036
+ current.current = created.value;
4037
+ created.destroy();
4038
+ engine.current = null;
4039
+ };
4040
+ }, [min, max, variant, labels, label, name, disabled, required, error]);
4041
+ useIsomorphicLayoutEffect(() => {
4042
+ if (value !== void 0) engine.current?.setValue(value, false);
4043
+ });
4044
+ useIsomorphicLayoutEffect(() => {
4045
+ if (!instanceRef) return;
4046
+ instanceRef.current = engine.current;
4047
+ return () => {
4048
+ instanceRef.current = null;
4049
+ };
4050
+ }, [instanceRef, min, max, variant, labels, label, name, disabled, required, error]);
4051
+ return /* @__PURE__ */ jsx94("div", { ...props, ref: root, className: ["mk-rating-scale", className].filter(Boolean).join(" ") });
4052
+ }
4053
+
4054
+ // src/components/notification-stack/react.tsx
4055
+ import { useRef as useRef89 } from "react";
4056
+ import { jsx as jsx95 } from "react/jsx-runtime";
4057
+ function NotificationStack({ items, expanded, direction, duration, disabled, label, labels, onDismiss, onAction, onExpandedChange, instanceRef, className, children, dangerouslySetInnerHTML: _html, ...props }) {
4058
+ const root = useRef89(null);
4059
+ const instance = useRef89(null);
4060
+ const onDismissRef = useLatest(onDismiss);
4061
+ const onActionRef = useLatest(onAction);
4062
+ const onExpandedChangeRef = useLatest(onExpandedChange);
4063
+ useIsomorphicLayoutEffect(() => {
4064
+ const created = createNotificationStack(root.current, { items, expanded, direction, duration, disabled, label, labels, onDismiss: (...args) => onDismissRef.current?.(...args), onAction: (...args) => onActionRef.current?.(...args), onExpandedChange: (...args) => onExpandedChangeRef.current?.(...args) });
4065
+ instance.current = created;
4066
+ return () => {
4067
+ created.destroy();
4068
+ instance.current = null;
4069
+ };
4070
+ }, []);
4071
+ useIsomorphicLayoutEffect(() => {
4072
+ instance.current?.setOptions({ items, expanded, direction, duration, disabled, label, labels });
4073
+ }, [items, expanded, direction, duration, disabled, label, labels]);
4074
+ useIsomorphicLayoutEffect(() => {
4075
+ if (instanceRef) instanceRef.current = instance.current;
4076
+ return () => {
4077
+ if (instanceRef) instanceRef.current = null;
4078
+ };
4079
+ }, [instanceRef]);
4080
+ return /* @__PURE__ */ jsx95("div", { ...props, ref: root, className: ["mk-notification-stack", className].filter(Boolean).join(" ") });
4081
+ }
4082
+
4083
+ // src/components/bento-grid/react.tsx
4084
+ import { useRef as useRef90 } from "react";
4085
+ import { jsx as jsx96 } from "react/jsx-runtime";
4086
+ function BentoGrid({ columns, gap, filter, duration, onChange, instanceRef, className, children, ...props }) {
4087
+ const root = useRef90(null);
4088
+ const instance = useRef90(null);
4089
+ const onChangeRef = useLatest(onChange);
4090
+ useIsomorphicLayoutEffect(() => {
4091
+ const created = createBentoGrid(root.current, { columns, gap, filter, duration, onChange: (...args) => onChangeRef.current?.(...args) });
4092
+ instance.current = created;
4093
+ return () => {
4094
+ created.destroy();
4095
+ instance.current = null;
4096
+ };
4097
+ }, []);
4098
+ useIsomorphicLayoutEffect(() => {
4099
+ instance.current?.setOptions({ columns, gap, filter, duration });
4100
+ }, [columns, gap, filter, duration]);
4101
+ useIsomorphicLayoutEffect(() => {
4102
+ if (instanceRef) instanceRef.current = instance.current;
4103
+ return () => {
4104
+ if (instanceRef) instanceRef.current = null;
4105
+ };
4106
+ }, [instanceRef]);
4107
+ return /* @__PURE__ */ jsx96("div", { ...props, ref: root, className: ["mk-bento-grid", className].filter(Boolean).join(" "), children });
4108
+ }
4109
+
4110
+ // src/components/scroll-preview-dock/react.tsx
4111
+ import { useRef as useRef91 } from "react";
4112
+ import { jsx as jsx97 } from "react/jsx-runtime";
4113
+ function ScrollPreviewDock({ items, scroller, offset, label, disabled, onChange, instanceRef, className, children, dangerouslySetInnerHTML: _html, ...props }) {
4114
+ const root = useRef91(null);
4115
+ const instance = useRef91(null);
4116
+ const onChangeRef = useLatest(onChange);
4117
+ useIsomorphicLayoutEffect(() => {
4118
+ const created = createScrollPreviewDock(root.current, { items, scroller, offset, label, disabled, onChange: (...args) => onChangeRef.current?.(...args) });
4119
+ instance.current = created;
4120
+ return () => {
4121
+ created.destroy();
4122
+ instance.current = null;
4123
+ };
4124
+ }, []);
4125
+ useIsomorphicLayoutEffect(() => {
4126
+ instance.current?.setOptions({ items, scroller, offset, label, disabled });
4127
+ }, [items, scroller, offset, label, disabled]);
4128
+ useIsomorphicLayoutEffect(() => {
4129
+ if (instanceRef) instanceRef.current = instance.current;
4130
+ return () => {
4131
+ if (instanceRef) instanceRef.current = null;
4132
+ };
4133
+ }, [instanceRef]);
4134
+ return /* @__PURE__ */ jsx97("div", { ...props, ref: root, className: ["mk-scroll-preview-dock", className].filter(Boolean).join(" ") });
4135
+ }
4136
+
4137
+ // src/components/sticky-header/react.tsx
4138
+ import { useRef as useRef92 } from "react";
4139
+ import { jsx as jsx98 } from "react/jsx-runtime";
4140
+ function StickyHeader({ scroller, expandedHeight, compactHeight, threshold, range, top, disabled, onChange, instanceRef, className, children, ...props }) {
4141
+ const root = useRef92(null);
4142
+ const instance = useRef92(null);
4143
+ const onChangeRef = useLatest(onChange);
4144
+ useIsomorphicLayoutEffect(() => {
4145
+ const created = createStickyHeader(root.current, { scroller, expandedHeight, compactHeight, threshold, range, top, disabled, onChange: (...args) => onChangeRef.current?.(...args) });
4146
+ instance.current = created;
4147
+ return () => {
4148
+ created.destroy();
4149
+ instance.current = null;
4150
+ };
4151
+ }, []);
4152
+ useIsomorphicLayoutEffect(() => {
4153
+ instance.current?.setOptions({ scroller, expandedHeight, compactHeight, threshold, range, top, disabled });
4154
+ }, [scroller, expandedHeight, compactHeight, threshold, range, top, disabled]);
4155
+ useIsomorphicLayoutEffect(() => {
4156
+ if (instanceRef) instanceRef.current = instance.current;
4157
+ return () => {
4158
+ if (instanceRef) instanceRef.current = null;
4159
+ };
4160
+ }, [instanceRef]);
4161
+ return /* @__PURE__ */ jsx98("div", { ...props, ref: root, className: ["mk-sticky-header", className].filter(Boolean).join(" "), children: /* @__PURE__ */ jsx98("div", { "data-mk-sticky-surface": "", className: "mk-sticky-header__surface", children }) });
4162
+ }
4163
+
4164
+ // src/components/handwriting-text/react.tsx
4165
+ import { useRef as useRef93 } from "react";
4166
+ import { jsx as jsx99 } from "react/jsx-runtime";
4167
+ function HandwritingText({ text = "make it move.", duration, autoplay, onComplete, instanceRef, className, ...props }) {
4168
+ const { children: _children, dangerouslySetInnerHTML: _html, ...safe } = props;
4169
+ const root = useRef93(null);
4170
+ const instance = useRef93(null);
4171
+ const latest = useLatest({ text, onComplete });
4172
+ useIsomorphicLayoutEffect(() => {
4173
+ const created = createHandwritingText(root.current, { text: latest.current.text, duration, autoplay, onComplete: () => latest.current.onComplete?.() });
4174
+ instance.current = created;
4175
+ return () => {
4176
+ created.destroy();
4177
+ instance.current = null;
4178
+ };
4179
+ }, [duration, autoplay]);
4180
+ useIsomorphicLayoutEffect(() => {
4181
+ instance.current?.setText(text, autoplay !== false);
4182
+ }, [text, autoplay]);
4183
+ useIsomorphicLayoutEffect(() => {
4184
+ if (typeof instanceRef === "function") instanceRef(instance.current);
4185
+ else if (instanceRef) instanceRef.current = instance.current;
4186
+ return () => {
4187
+ if (typeof instanceRef === "function") instanceRef(null);
4188
+ else if (instanceRef) instanceRef.current = null;
4189
+ };
4190
+ }, [instanceRef, duration, autoplay]);
4191
+ return /* @__PURE__ */ jsx99("span", { ...safe, ref: root, role: "img", "aria-label": text, className: ["mk-handwriting-text", className].filter(Boolean).join(" ") });
4192
+ }
4193
+
4194
+ // src/components/particle-button/react.tsx
4195
+ import { useRef as useRef94 } from "react";
4196
+ import { jsx as jsx100 } from "react/jsx-runtime";
4197
+ function ParticleButton({ label = "Celebrar", count, distance, onAction, instanceRef, type = "button", className, ...props }) {
4198
+ const { children: _children, dangerouslySetInnerHTML: _html, ...safe } = props;
4199
+ const root = useRef94(null);
4200
+ const instance = useRef94(null);
4201
+ const action = useLatest(onAction);
4202
+ useIsomorphicLayoutEffect(() => {
4203
+ const created = createParticleButton(root.current, { label, count, distance, onAction: () => action.current?.() });
4204
+ instance.current = created;
4205
+ return () => {
4206
+ created.destroy();
4207
+ instance.current = null;
4208
+ };
4209
+ }, [label, count, distance]);
4210
+ useIsomorphicLayoutEffect(() => {
4211
+ if (typeof instanceRef === "function") instanceRef(instance.current);
4212
+ else if (instanceRef) instanceRef.current = instance.current;
4213
+ return () => {
4214
+ if (typeof instanceRef === "function") instanceRef(null);
4215
+ else if (instanceRef) instanceRef.current = null;
4216
+ };
4217
+ }, [instanceRef, label, count, distance]);
4218
+ return /* @__PURE__ */ jsx100("button", { ...safe, type, ref: root, className: ["mk-particle-button", className].filter(Boolean).join(" ") });
4219
+ }
4220
+
4221
+ // src/components/magnetize-button/react.tsx
4222
+ import { useRef as useRef95 } from "react";
4223
+ import { jsx as jsx101 } from "react/jsx-runtime";
4224
+ function MagnetizeButton({ label = "Reunir ideas", count, reach, onAction, instanceRef, type = "button", className, ...props }) {
4225
+ const { children: _children, dangerouslySetInnerHTML: _html, ...safe } = props;
4226
+ const root = useRef95(null);
4227
+ const instance = useRef95(null);
4228
+ const action = useLatest(onAction);
4229
+ useIsomorphicLayoutEffect(() => {
4230
+ const created = createMagnetizeButton(root.current, { label, count, reach, onAction: () => action.current?.() });
4231
+ instance.current = created;
4232
+ return () => {
4233
+ created.destroy();
4234
+ instance.current = null;
4235
+ };
4236
+ }, [label, count, reach]);
4237
+ useIsomorphicLayoutEffect(() => {
4238
+ if (typeof instanceRef === "function") instanceRef(instance.current);
4239
+ else if (instanceRef) instanceRef.current = instance.current;
4240
+ return () => {
4241
+ if (typeof instanceRef === "function") instanceRef(null);
4242
+ else if (instanceRef) instanceRef.current = null;
4243
+ };
4244
+ }, [instanceRef, label, count, reach]);
4245
+ return /* @__PURE__ */ jsx101("button", { ...safe, type, ref: root, className: ["mk-magnetize-button", className].filter(Boolean).join(" ") });
4246
+ }
4247
+
4248
+ // src/components/badge-button/react.tsx
4249
+ import { useRef as useRef96 } from "react";
4250
+ import { jsx as jsx102 } from "react/jsx-runtime";
4251
+ function BadgeButton({ label = "Guardar", count, defaultCount = 0, step, hideZero, max, onChange, instanceRef, type = "button", className, ...props }) {
4252
+ const { children: _children, dangerouslySetInnerHTML: _html, ...safe } = props;
4253
+ const root = useRef96(null);
4254
+ const instance = useRef96(null);
4255
+ const current = useLatest({ count, onChange });
4256
+ const retained = useRef96(defaultCount);
4257
+ useIsomorphicLayoutEffect(() => {
4258
+ let created;
4259
+ created = createBadgeButton(root.current, {
4260
+ label,
4261
+ count: current.current.count ?? retained.current,
4262
+ step,
4263
+ hideZero,
4264
+ max,
4265
+ onChange: (next) => {
4266
+ current.current.onChange?.(next);
4267
+ if (current.current.count !== void 0) created.setCount(current.current.count);
4268
+ }
4269
+ });
4270
+ instance.current = created;
4271
+ return () => {
4272
+ retained.current = created.count;
4273
+ created.destroy();
4274
+ instance.current = null;
4275
+ };
4276
+ }, [label, step, hideZero, max]);
4277
+ useIsomorphicLayoutEffect(() => {
4278
+ if (count !== void 0) instance.current?.setCount(count);
4279
+ }, [count]);
4280
+ useIsomorphicLayoutEffect(() => {
4281
+ if (typeof instanceRef === "function") instanceRef(instance.current);
4282
+ else if (instanceRef) instanceRef.current = instance.current;
4283
+ return () => {
4284
+ if (typeof instanceRef === "function") instanceRef(null);
4285
+ else if (instanceRef) instanceRef.current = null;
4286
+ };
4287
+ }, [instanceRef, label, step, hideZero, max]);
4288
+ return /* @__PURE__ */ jsx102("button", { ...safe, type, ref: root, className: ["mk-badge-button", className].filter(Boolean).join(" ") });
4289
+ }
4290
+
4291
+ // src/components/morphing-page-dots/react.tsx
4292
+ import { useRef as useRef97 } from "react";
4293
+ import { jsx as jsx103 } from "react/jsx-runtime";
4294
+ function MorphingPageDots({ count, value, defaultValue = 0, label, labels, pageIds, disabled, onChange, instanceRef, className, ...props }) {
4295
+ const { children: _children, dangerouslySetInnerHTML: _html, ...safe } = props;
4296
+ const root = useRef97(null);
4297
+ const instance = useRef97(null);
4298
+ const current = useLatest({ value, onChange });
4299
+ const retained = useRef97(defaultValue);
4300
+ const labelsKey = JSON.stringify(labels);
4301
+ const pagesKey = JSON.stringify(pageIds);
4302
+ useIsomorphicLayoutEffect(() => {
4303
+ let created;
4304
+ created = createMorphingPageDots(root.current, {
4305
+ count,
4306
+ value: current.current.value ?? retained.current,
4307
+ label,
4308
+ labels,
4309
+ pageIds,
4310
+ disabled,
4311
+ onChange: (next) => {
4312
+ current.current.onChange?.(next);
4313
+ if (current.current.value !== void 0) created.setValue(current.current.value);
4314
+ }
4315
+ });
4316
+ instance.current = created;
4317
+ return () => {
4318
+ retained.current = created.value;
4319
+ created.destroy();
4320
+ instance.current = null;
4321
+ };
4322
+ }, [count, label, labelsKey, pagesKey, disabled]);
4323
+ useIsomorphicLayoutEffect(() => {
4324
+ if (value !== void 0) instance.current?.setValue(value);
4325
+ }, [value]);
4326
+ useIsomorphicLayoutEffect(() => {
4327
+ if (typeof instanceRef === "function") instanceRef(instance.current);
4328
+ else if (instanceRef) instanceRef.current = instance.current;
4329
+ return () => {
4330
+ if (typeof instanceRef === "function") instanceRef(null);
4331
+ else if (instanceRef) instanceRef.current = null;
4332
+ };
4333
+ }, [instanceRef, count, label, labelsKey, pagesKey, disabled]);
4334
+ return /* @__PURE__ */ jsx103("div", { ...safe, ref: root, className: ["mk-morphing-page-dots", className].filter(Boolean).join(" ") });
4335
+ }
4336
+
4337
+ // src/components/not-found/react.tsx
4338
+ import { useRef as useRef98 } from "react";
4339
+ import { jsx as jsx104 } from "react/jsx-runtime";
4340
+ function NotFound({ brand, title, description, homeHref, homeLabel, backLabel, showBack, onBack, instanceRef, className, ...props }) {
4341
+ const { children: _children, dangerouslySetInnerHTML: _html, ...safe } = props;
4342
+ const root = useRef98(null);
4343
+ const instance = useRef98(null);
4344
+ const current = useLatest(onBack);
4345
+ const hasBack = Boolean(onBack);
4346
+ useIsomorphicLayoutEffect(() => {
4347
+ const created = createNotFound(root.current, { brand, title, description, homeHref, homeLabel, backLabel, showBack, onBack: hasBack ? () => current.current?.() : void 0 });
4348
+ instance.current = created;
4349
+ return () => {
4350
+ created.destroy();
4351
+ instance.current = null;
4352
+ };
4353
+ }, [brand, title, description, homeHref, homeLabel, backLabel, showBack, hasBack]);
4354
+ useIsomorphicLayoutEffect(() => {
4355
+ if (typeof instanceRef === "function") instanceRef(instance.current);
4356
+ else if (instanceRef) instanceRef.current = instance.current;
4357
+ return () => {
4358
+ if (typeof instanceRef === "function") instanceRef(null);
4359
+ else if (instanceRef) instanceRef.current = null;
4360
+ };
4361
+ }, [instanceRef, brand, title, description, homeHref, homeLabel, backLabel, showBack, hasBack]);
4362
+ return /* @__PURE__ */ jsx104("div", { ...safe, ref: root, className: ["mk-not-found", className].filter(Boolean).join(" ") });
4363
+ }
3713
4364
  export {
3714
4365
  ANIMATIONS,
3715
4366
  ActivityFeed,
3716
4367
  AddToCart,
3717
4368
  AnimatedNumber,
3718
4369
  Attachment,
4370
+ BadgeButton,
4371
+ BentoGrid,
3719
4372
  BidirectionalSlider,
3720
4373
  Breadcrumb,
3721
4374
  Calendar,
@@ -3740,10 +4393,12 @@ export {
3740
4393
  DrilldownMenu,
3741
4394
  EditableTable,
3742
4395
  EmptyState,
4396
+ EqualizerSlider,
3743
4397
  FileExplorer,
3744
4398
  FilterBuilder,
3745
4399
  FlipGroup,
3746
4400
  Frost,
4401
+ HandwritingText,
3747
4402
  HeatmapChart,
3748
4403
  HoldConfirm,
3749
4404
  HoverCard,
@@ -3757,15 +4412,20 @@ export {
3757
4412
  LoadingButton,
3758
4413
  MK_HEAD_SCRIPT,
3759
4414
  MK_THEME_HEAD_SCRIPT,
4415
+ MagnetizeButton,
3760
4416
  Menu,
3761
4417
  MkIcon,
4418
+ MorphingPageDots,
3762
4419
  MultiSelect,
3763
4420
  NAV_STYLES,
3764
4421
  NAV_STYLE_ALIASES,
3765
4422
  Nav,
4423
+ NotFound,
3766
4424
  NotificationBell,
4425
+ NotificationStack,
3767
4426
  OrbitMenu,
3768
4427
  Pagination,
4428
+ ParticleButton,
3769
4429
  PasswordStrength,
3770
4430
  PieChart,
3771
4431
  PillButton,
@@ -3775,13 +4435,16 @@ export {
3775
4435
  Questionnaire,
3776
4436
  RadarChart,
3777
4437
  RadialChart,
4438
+ RadioGroup,
3778
4439
  RangeCalendar,
3779
4440
  RangeSlider,
4441
+ RatingScale,
3780
4442
  ResizablePanel,
3781
4443
  RichTextEditor,
3782
4444
  SankeyChart,
3783
4445
  ScratchCard,
3784
4446
  ScrollIsland,
4447
+ ScrollPreviewDock,
3785
4448
  Select,
3786
4449
  SignaturePad,
3787
4450
  Skeleton,
@@ -3790,10 +4453,13 @@ export {
3790
4453
  SplitView,
3791
4454
  StarRating,
3792
4455
  StatCard,
4456
+ Stepper,
3793
4457
  Steps,
4458
+ StickyHeader,
3794
4459
  StudioDock,
3795
4460
  SwipeActions,
3796
4461
  TagInput,
4462
+ TemperatureSlider,
3797
4463
  ThemePicker,
3798
4464
  ThemeProvider,
3799
4465
  TimeField,