love-ui 1.2.12 → 1.2.14
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.js +8 -7
- package/dist/mcp-server.js +1 -1
- package/package.json +3 -2
- package/packages/loveui-skills/SKILL.md +99 -0
- package/packages/loveui-skills/agents/openai.yaml +11 -0
- package/packages/loveui-skills/references/design-directions.md +60 -0
- package/packages/loveui-skills/references/mcp-catalog-workflow.md +68 -0
- package/packages/loveui-skills/references/page-blueprints.md +76 -0
- package/packages/loveui-skills/references/quality-gates.md +51 -0
- package/public/r/accordion-controlled.json +1 -1
- package/public/r/accordion-demo.json +1 -1
- package/public/r/accordion-multiple.json +1 -1
- package/public/r/accordion-single.json +1 -1
- package/public/r/alert-demo.json +1 -1
- package/public/r/alert-dialog-demo.json +1 -1
- package/public/r/alert-error.json +1 -1
- package/public/r/alert-info.json +1 -1
- package/public/r/alert-success.json +1 -1
- package/public/r/alert-warning.json +1 -1
- package/public/r/alert-with-icon-action.json +1 -1
- package/public/r/alert-with-icon.json +1 -1
- package/public/r/announcement-tagless.json +1 -1
- package/public/r/announcement-themes.json +1 -1
- package/public/r/announcement.json +1 -1
- package/public/r/autocomplete-async.json +1 -1
- package/public/r/autocomplete-autohighlight.json +1 -1
- package/public/r/autocomplete-demo.json +1 -1
- package/public/r/autocomplete-disabled.json +1 -1
- package/public/r/autocomplete-form.json +1 -1
- package/public/r/autocomplete-grouped.json +1 -1
- package/public/r/autocomplete-inline.json +1 -1
- package/public/r/autocomplete-lg.json +1 -1
- package/public/r/autocomplete-limit.json +1 -1
- package/public/r/autocomplete-sm.json +1 -1
- package/public/r/autocomplete-with-clear.json +1 -1
- package/public/r/autocomplete-with-label.json +1 -1
- package/public/r/autocomplete-with-trigger-clear.json +1 -1
- package/public/r/avatar-demo.json +1 -1
- package/public/r/avatar-fallback.json +1 -1
- package/public/r/avatar-group.json +1 -1
- package/public/r/avatar-radius.json +1 -1
- package/public/r/avatar-size.json +1 -1
- package/public/r/avatar-stack-hover.json +1 -1
- package/public/r/avatar-stack.json +1 -1
- package/public/r/badge-demo.json +1 -1
- package/public/r/badge-destructive.json +1 -1
- package/public/r/badge-error.json +1 -1
- package/public/r/badge-info.json +1 -1
- package/public/r/badge-lg.json +1 -1
- package/public/r/badge-outline.json +1 -1
- package/public/r/badge-secondary.json +1 -1
- package/public/r/badge-sm.json +1 -1
- package/public/r/badge-success.json +1 -1
- package/public/r/badge-warning.json +1 -1
- package/public/r/badge-with-icon.json +1 -1
- package/public/r/badge-with-link.json +1 -1
- package/public/r/banner-inset.json +1 -1
- package/public/r/banner-themes.json +1 -1
- package/public/r/banner.json +1 -1
- package/public/r/bookmarks.json +206 -0
- package/public/r/breadcrumb-custom-separator.json +1 -1
- package/public/r/breadcrumb-demo.json +1 -1
- package/public/r/button-demo.json +1 -1
- package/public/r/button-destructive-outline.json +1 -1
- package/public/r/button-destructive.json +1 -1
- package/public/r/button-disabled.json +1 -1
- package/public/r/button-ghost.json +1 -1
- package/public/r/button-lg.json +1 -1
- package/public/r/button-link.json +1 -1
- package/public/r/button-loading.json +1 -1
- package/public/r/button-outline.json +1 -1
- package/public/r/button-secondary.json +1 -1
- package/public/r/button-sm.json +1 -1
- package/public/r/button-with-icon.json +1 -1
- package/public/r/button-with-link.json +1 -1
- package/public/r/button-xl.json +1 -1
- package/public/r/button-xs.json +1 -1
- package/public/r/calendar-headless.json +1 -1
- package/public/r/calendar-rac.json +16 -0
- package/public/r/calendar.json +1 -1
- package/public/r/card-demo.json +1 -1
- package/public/r/chart.json +15 -0
- package/public/r/checkbox-card.json +1 -1
- package/public/r/checkbox-demo.json +1 -1
- package/public/r/checkbox-disabled.json +1 -1
- package/public/r/checkbox-form.json +1 -1
- package/public/r/checkbox-group-demo.json +1 -1
- package/public/r/checkbox-group-disabled.json +1 -1
- package/public/r/checkbox-group-form.json +1 -1
- package/public/r/checkbox-group-nested-parent.json +1 -1
- package/public/r/checkbox-group-parent.json +1 -1
- package/public/r/checkbox-tree.json +12 -0
- package/public/r/checkbox-with-description.json +1 -1
- package/public/r/choicebox-inline.json +1 -1
- package/public/r/choicebox.json +1 -1
- package/public/r/codebase.json +1 -1
- package/public/r/collaborative-canvas.json +1 -1
- package/public/r/collapsible-demo.json +1 -1
- package/public/r/combobox-autohighlight.json +1 -1
- package/public/r/combobox-controlled.json +1 -1
- package/public/r/combobox-create-new.json +1 -1
- package/public/r/combobox-demo.json +1 -1
- package/public/r/combobox-disabled.json +1 -1
- package/public/r/combobox-fixed-width.json +1 -1
- package/public/r/combobox-form.json +1 -1
- package/public/r/combobox-grouped.json +1 -1
- package/public/r/combobox-lg.json +1 -1
- package/public/r/combobox-multiple-form.json +1 -1
- package/public/r/combobox-multiple.json +1 -1
- package/public/r/combobox-sm.json +1 -1
- package/public/r/combobox-with-clear.json +1 -1
- package/public/r/combobox-with-inner-input.json +1 -1
- package/public/r/combobox-with-label.json +1 -1
- package/public/r/command.json +18 -0
- package/public/r/comp-01.json +22 -0
- package/public/r/comp-02.json +23 -0
- package/public/r/comp-03.json +23 -0
- package/public/r/comp-04.json +23 -0
- package/public/r/comp-05.json +22 -0
- package/public/r/comp-06.json +23 -0
- package/public/r/comp-07.json +22 -0
- package/public/r/comp-08.json +23 -0
- package/public/r/comp-09.json +22 -0
- package/public/r/comp-10.json +22 -0
- package/public/r/comp-100.json +23 -0
- package/public/r/comp-101.json +23 -0
- package/public/r/comp-102.json +23 -0
- package/public/r/comp-103.json +23 -0
- package/public/r/comp-104.json +23 -0
- package/public/r/comp-105.json +23 -0
- package/public/r/comp-106.json +22 -0
- package/public/r/comp-107.json +22 -0
- package/public/r/comp-108.json +23 -0
- package/public/r/comp-109.json +22 -0
- package/public/r/comp-11.json +22 -0
- package/public/r/comp-110.json +22 -0
- package/public/r/comp-111.json +21 -0
- package/public/r/comp-112.json +21 -0
- package/public/r/comp-113.json +22 -0
- package/public/r/comp-114.json +23 -0
- package/public/r/comp-115.json +22 -0
- package/public/r/comp-116.json +22 -0
- package/public/r/comp-117.json +23 -0
- package/public/r/comp-118.json +23 -0
- package/public/r/comp-119.json +27 -0
- package/public/r/comp-12.json +22 -0
- package/public/r/comp-120.json +27 -0
- package/public/r/comp-121.json +27 -0
- package/public/r/comp-122.json +27 -0
- package/public/r/comp-123.json +22 -0
- package/public/r/comp-124.json +22 -0
- package/public/r/comp-125.json +31 -0
- package/public/r/comp-126.json +31 -0
- package/public/r/comp-127.json +21 -0
- package/public/r/comp-128.json +21 -0
- package/public/r/comp-129.json +24 -0
- package/public/r/comp-13.json +22 -0
- package/public/r/comp-130.json +23 -0
- package/public/r/comp-131.json +23 -0
- package/public/r/comp-132.json +23 -0
- package/public/r/comp-133.json +23 -0
- package/public/r/comp-134.json +23 -0
- package/public/r/comp-135.json +24 -0
- package/public/r/comp-136.json +23 -0
- package/public/r/comp-137.json +23 -0
- package/public/r/comp-138.json +25 -0
- package/public/r/comp-139.json +23 -0
- package/public/r/comp-14.json +22 -0
- package/public/r/comp-140.json +23 -0
- package/public/r/comp-141.json +23 -0
- package/public/r/comp-142.json +25 -0
- package/public/r/comp-143.json +23 -0
- package/public/r/comp-144.json +24 -0
- package/public/r/comp-145.json +24 -0
- package/public/r/comp-146.json +24 -0
- package/public/r/comp-147.json +24 -0
- package/public/r/comp-148.json +25 -0
- package/public/r/comp-149.json +24 -0
- package/public/r/comp-15.json +22 -0
- package/public/r/comp-150.json +21 -0
- package/public/r/comp-151.json +23 -0
- package/public/r/comp-152.json +23 -0
- package/public/r/comp-153.json +23 -0
- package/public/r/comp-154.json +23 -0
- package/public/r/comp-155.json +23 -0
- package/public/r/comp-156.json +25 -0
- package/public/r/comp-157.json +27 -0
- package/public/r/comp-158.json +24 -0
- package/public/r/comp-159.json +24 -0
- package/public/r/comp-16.json +22 -0
- package/public/r/comp-160.json +24 -0
- package/public/r/comp-161.json +24 -0
- package/public/r/comp-162.json +24 -0
- package/public/r/comp-163.json +28 -0
- package/public/r/comp-164.json +24 -0
- package/public/r/comp-165.json +24 -0
- package/public/r/comp-166.json +25 -0
- package/public/r/comp-167.json +24 -0
- package/public/r/comp-168.json +24 -0
- package/public/r/comp-169.json +23 -0
- package/public/r/comp-17.json +25 -0
- package/public/r/comp-170.json +25 -0
- package/public/r/comp-171.json +28 -0
- package/public/r/comp-172.json +23 -0
- package/public/r/comp-173.json +23 -0
- package/public/r/comp-174.json +23 -0
- package/public/r/comp-175.json +23 -0
- package/public/r/comp-176.json +23 -0
- package/public/r/comp-177.json +23 -0
- package/public/r/comp-178.json +23 -0
- package/public/r/comp-179.json +24 -0
- package/public/r/comp-18.json +25 -0
- package/public/r/comp-180.json +23 -0
- package/public/r/comp-181.json +25 -0
- package/public/r/comp-182.json +24 -0
- package/public/r/comp-183.json +25 -0
- package/public/r/comp-184.json +25 -0
- package/public/r/comp-185.json +24 -0
- package/public/r/comp-186.json +25 -0
- package/public/r/comp-187.json +25 -0
- package/public/r/comp-188.json +25 -0
- package/public/r/comp-189.json +23 -0
- package/public/r/comp-19.json +23 -0
- package/public/r/comp-190.json +23 -0
- package/public/r/comp-191.json +24 -0
- package/public/r/comp-192.json +23 -0
- package/public/r/comp-193.json +23 -0
- package/public/r/comp-194.json +24 -0
- package/public/r/comp-195.json +23 -0
- package/public/r/comp-196.json +24 -0
- package/public/r/comp-197.json +23 -0
- package/public/r/comp-198.json +23 -0
- package/public/r/comp-199.json +23 -0
- package/public/r/comp-20.json +23 -0
- package/public/r/comp-200.json +25 -0
- package/public/r/comp-201.json +22 -0
- package/public/r/comp-202.json +22 -0
- package/public/r/comp-203.json +23 -0
- package/public/r/comp-204.json +23 -0
- package/public/r/comp-205.json +23 -0
- package/public/r/comp-206.json +24 -0
- package/public/r/comp-207.json +23 -0
- package/public/r/comp-208.json +23 -0
- package/public/r/comp-209.json +23 -0
- package/public/r/comp-21.json +23 -0
- package/public/r/comp-210.json +24 -0
- package/public/r/comp-211.json +24 -0
- package/public/r/comp-212.json +23 -0
- package/public/r/comp-213.json +23 -0
- package/public/r/comp-214.json +23 -0
- package/public/r/comp-215.json +24 -0
- package/public/r/comp-216.json +22 -0
- package/public/r/comp-217.json +22 -0
- package/public/r/comp-218.json +25 -0
- package/public/r/comp-219.json +23 -0
- package/public/r/comp-22.json +23 -0
- package/public/r/comp-220.json +24 -0
- package/public/r/comp-221.json +23 -0
- package/public/r/comp-222.json +26 -0
- package/public/r/comp-223.json +26 -0
- package/public/r/comp-224.json +23 -0
- package/public/r/comp-225.json +24 -0
- package/public/r/comp-226.json +26 -0
- package/public/r/comp-227.json +26 -0
- package/public/r/comp-228.json +26 -0
- package/public/r/comp-229.json +30 -0
- package/public/r/comp-23.json +24 -0
- package/public/r/comp-230.json +30 -0
- package/public/r/comp-231.json +32 -0
- package/public/r/comp-232.json +31 -0
- package/public/r/comp-233.json +30 -0
- package/public/r/comp-234.json +28 -0
- package/public/r/comp-235.json +28 -0
- package/public/r/comp-236.json +24 -0
- package/public/r/comp-237.json +26 -0
- package/public/r/comp-238.json +26 -0
- package/public/r/comp-239.json +26 -0
- package/public/r/comp-24.json +23 -0
- package/public/r/comp-240.json +23 -0
- package/public/r/comp-241.json +24 -0
- package/public/r/comp-242.json +23 -0
- package/public/r/comp-243.json +23 -0
- package/public/r/comp-244.json +23 -0
- package/public/r/comp-245.json +23 -0
- package/public/r/comp-246.json +23 -0
- package/public/r/comp-247.json +23 -0
- package/public/r/comp-248.json +23 -0
- package/public/r/comp-249.json +24 -0
- package/public/r/comp-25.json +24 -0
- package/public/r/comp-250.json +25 -0
- package/public/r/comp-251.json +25 -0
- package/public/r/comp-252.json +25 -0
- package/public/r/comp-253.json +25 -0
- package/public/r/comp-254.json +35 -0
- package/public/r/comp-255.json +30 -0
- package/public/r/comp-256.json +25 -0
- package/public/r/comp-257.json +25 -0
- package/public/r/comp-258.json +32 -0
- package/public/r/comp-259.json +26 -0
- package/public/r/comp-26.json +24 -0
- package/public/r/comp-260.json +26 -0
- package/public/r/comp-261.json +24 -0
- package/public/r/comp-262.json +31 -0
- package/public/r/comp-263.json +25 -0
- package/public/r/comp-264.json +33 -0
- package/public/r/comp-265.json +32 -0
- package/public/r/comp-266.json +24 -0
- package/public/r/comp-267.json +19 -0
- package/public/r/comp-268.json +19 -0
- package/public/r/comp-269.json +19 -0
- package/public/r/comp-27.json +24 -0
- package/public/r/comp-270.json +19 -0
- package/public/r/comp-271.json +19 -0
- package/public/r/comp-272.json +19 -0
- package/public/r/comp-273.json +19 -0
- package/public/r/comp-274.json +19 -0
- package/public/r/comp-275.json +19 -0
- package/public/r/comp-276.json +19 -0
- package/public/r/comp-277.json +21 -0
- package/public/r/comp-278.json +21 -0
- package/public/r/comp-279.json +23 -0
- package/public/r/comp-28.json +24 -0
- package/public/r/comp-280.json +23 -0
- package/public/r/comp-281.json +23 -0
- package/public/r/comp-282.json +23 -0
- package/public/r/comp-283.json +23 -0
- package/public/r/comp-284.json +23 -0
- package/public/r/comp-285.json +23 -0
- package/public/r/comp-286.json +23 -0
- package/public/r/comp-287.json +24 -0
- package/public/r/comp-288.json +23 -0
- package/public/r/comp-289.json +24 -0
- package/public/r/comp-29.json +24 -0
- package/public/r/comp-290.json +24 -0
- package/public/r/comp-291.json +24 -0
- package/public/r/comp-292.json +24 -0
- package/public/r/comp-293.json +26 -0
- package/public/r/comp-294.json +24 -0
- package/public/r/comp-295.json +23 -0
- package/public/r/comp-296.json +23 -0
- package/public/r/comp-297.json +30 -0
- package/public/r/comp-298.json +26 -0
- package/public/r/comp-299.json +28 -0
- package/public/r/comp-30.json +23 -0
- package/public/r/comp-300.json +29 -0
- package/public/r/comp-301.json +24 -0
- package/public/r/comp-302.json +18 -0
- package/public/r/comp-303.json +18 -0
- package/public/r/comp-304.json +18 -0
- package/public/r/comp-305.json +21 -0
- package/public/r/comp-306.json +21 -0
- package/public/r/comp-307.json +21 -0
- package/public/r/comp-308.json +21 -0
- package/public/r/comp-309.json +21 -0
- package/public/r/comp-31.json +21 -0
- package/public/r/comp-310.json +23 -0
- package/public/r/comp-311.json +20 -0
- package/public/r/comp-312.json +21 -0
- package/public/r/comp-313.json +26 -0
- package/public/r/comp-314.json +26 -0
- package/public/r/comp-315.json +24 -0
- package/public/r/comp-316.json +25 -0
- package/public/r/comp-317.json +24 -0
- package/public/r/comp-318.json +24 -0
- package/public/r/comp-319.json +24 -0
- package/public/r/comp-32.json +21 -0
- package/public/r/comp-320.json +27 -0
- package/public/r/comp-321.json +28 -0
- package/public/r/comp-322.json +27 -0
- package/public/r/comp-323.json +30 -0
- package/public/r/comp-324.json +28 -0
- package/public/r/comp-325.json +29 -0
- package/public/r/comp-326.json +30 -0
- package/public/r/comp-327.json +30 -0
- package/public/r/comp-328.json +37 -0
- package/public/r/comp-329.json +38 -0
- package/public/r/comp-33.json +18 -0
- package/public/r/comp-330.json +27 -0
- package/public/r/comp-331.json +42 -0
- package/public/r/comp-332.json +25 -0
- package/public/r/comp-333.json +29 -0
- package/public/r/comp-334.json +22 -0
- package/public/r/comp-335.json +22 -0
- package/public/r/comp-336.json +22 -0
- package/public/r/comp-337.json +22 -0
- package/public/r/comp-338.json +22 -0
- package/public/r/comp-339.json +22 -0
- package/public/r/comp-34.json +27 -0
- package/public/r/comp-340.json +22 -0
- package/public/r/comp-341.json +22 -0
- package/public/r/comp-342.json +22 -0
- package/public/r/comp-343.json +22 -0
- package/public/r/comp-344.json +22 -0
- package/public/r/comp-345.json +22 -0
- package/public/r/comp-346.json +22 -0
- package/public/r/comp-347.json +22 -0
- package/public/r/comp-348.json +22 -0
- package/public/r/comp-349.json +22 -0
- package/public/r/comp-35.json +27 -0
- package/public/r/comp-350.json +22 -0
- package/public/r/comp-351.json +22 -0
- package/public/r/comp-352.json +24 -0
- package/public/r/comp-353.json +24 -0
- package/public/r/comp-354.json +23 -0
- package/public/r/comp-355.json +23 -0
- package/public/r/comp-356.json +23 -0
- package/public/r/comp-357.json +23 -0
- package/public/r/comp-358.json +23 -0
- package/public/r/comp-359.json +24 -0
- package/public/r/comp-36.json +26 -0
- package/public/r/comp-360.json +25 -0
- package/public/r/comp-361.json +23 -0
- package/public/r/comp-362.json +24 -0
- package/public/r/comp-363.json +27 -0
- package/public/r/comp-364.json +26 -0
- package/public/r/comp-365.json +24 -0
- package/public/r/comp-366.json +23 -0
- package/public/r/comp-367.json +23 -0
- package/public/r/comp-368.json +23 -0
- package/public/r/comp-369.json +23 -0
- package/public/r/comp-37.json +23 -0
- package/public/r/comp-370.json +23 -0
- package/public/r/comp-371.json +24 -0
- package/public/r/comp-372.json +24 -0
- package/public/r/comp-373.json +25 -0
- package/public/r/comp-374.json +26 -0
- package/public/r/comp-375.json +25 -0
- package/public/r/comp-376.json +26 -0
- package/public/r/comp-377.json +27 -0
- package/public/r/comp-378.json +24 -0
- package/public/r/comp-379.json +24 -0
- package/public/r/comp-38.json +23 -0
- package/public/r/comp-380.json +24 -0
- package/public/r/comp-381.json +26 -0
- package/public/r/comp-382.json +25 -0
- package/public/r/comp-383.json +26 -0
- package/public/r/comp-384.json +24 -0
- package/public/r/comp-385.json +24 -0
- package/public/r/comp-386.json +24 -0
- package/public/r/comp-387.json +28 -0
- package/public/r/comp-388.json +26 -0
- package/public/r/comp-389.json +24 -0
- package/public/r/comp-39.json +23 -0
- package/public/r/comp-390.json +23 -0
- package/public/r/comp-391.json +23 -0
- package/public/r/comp-392.json +23 -0
- package/public/r/comp-393.json +23 -0
- package/public/r/comp-394.json +24 -0
- package/public/r/comp-395.json +24 -0
- package/public/r/comp-396.json +24 -0
- package/public/r/comp-397.json +25 -0
- package/public/r/comp-398.json +26 -0
- package/public/r/comp-399.json +26 -0
- package/public/r/comp-40.json +23 -0
- package/public/r/comp-400.json +20 -0
- package/public/r/comp-401.json +19 -0
- package/public/r/comp-402.json +19 -0
- package/public/r/comp-403.json +19 -0
- package/public/r/comp-404.json +19 -0
- package/public/r/comp-405.json +19 -0
- package/public/r/comp-406.json +19 -0
- package/public/r/comp-407.json +19 -0
- package/public/r/comp-408.json +19 -0
- package/public/r/comp-409.json +22 -0
- package/public/r/comp-41.json +29 -0
- package/public/r/comp-410.json +22 -0
- package/public/r/comp-411.json +22 -0
- package/public/r/comp-412.json +19 -0
- package/public/r/comp-413.json +22 -0
- package/public/r/comp-414.json +22 -0
- package/public/r/comp-415.json +22 -0
- package/public/r/comp-416.json +23 -0
- package/public/r/comp-417.json +22 -0
- package/public/r/comp-418.json +23 -0
- package/public/r/comp-419.json +23 -0
- package/public/r/comp-42.json +30 -0
- package/public/r/comp-420.json +23 -0
- package/public/r/comp-421.json +23 -0
- package/public/r/comp-422.json +23 -0
- package/public/r/comp-423.json +24 -0
- package/public/r/comp-424.json +22 -0
- package/public/r/comp-425.json +23 -0
- package/public/r/comp-426.json +23 -0
- package/public/r/comp-427.json +23 -0
- package/public/r/comp-428.json +23 -0
- package/public/r/comp-429.json +23 -0
- package/public/r/comp-43.json +32 -0
- package/public/r/comp-430.json +23 -0
- package/public/r/comp-431.json +23 -0
- package/public/r/comp-432.json +23 -0
- package/public/r/comp-433.json +24 -0
- package/public/r/comp-434.json +24 -0
- package/public/r/comp-435.json +24 -0
- package/public/r/comp-436.json +24 -0
- package/public/r/comp-437.json +25 -0
- package/public/r/comp-438.json +23 -0
- package/public/r/comp-439.json +24 -0
- package/public/r/comp-44.json +25 -0
- package/public/r/comp-440.json +25 -0
- package/public/r/comp-441.json +25 -0
- package/public/r/comp-442.json +24 -0
- package/public/r/comp-443.json +24 -0
- package/public/r/comp-444.json +24 -0
- package/public/r/comp-445.json +24 -0
- package/public/r/comp-446.json +24 -0
- package/public/r/comp-447.json +25 -0
- package/public/r/comp-448.json +23 -0
- package/public/r/comp-449.json +23 -0
- package/public/r/comp-45.json +25 -0
- package/public/r/comp-450.json +23 -0
- package/public/r/comp-451.json +23 -0
- package/public/r/comp-452.json +23 -0
- package/public/r/comp-453.json +25 -0
- package/public/r/comp-454.json +22 -0
- package/public/r/comp-455.json +22 -0
- package/public/r/comp-456.json +22 -0
- package/public/r/comp-457.json +21 -0
- package/public/r/comp-458.json +22 -0
- package/public/r/comp-459.json +26 -0
- package/public/r/comp-46.json +26 -0
- package/public/r/comp-460.json +26 -0
- package/public/r/comp-461.json +27 -0
- package/public/r/comp-462.json +27 -0
- package/public/r/comp-463.json +30 -0
- package/public/r/comp-464.json +29 -0
- package/public/r/comp-465.json +29 -0
- package/public/r/comp-466.json +21 -0
- package/public/r/comp-467.json +23 -0
- package/public/r/comp-468.json +21 -0
- package/public/r/comp-469.json +21 -0
- package/public/r/comp-47.json +32 -0
- package/public/r/comp-470.json +21 -0
- package/public/r/comp-471.json +21 -0
- package/public/r/comp-472.json +23 -0
- package/public/r/comp-473.json +24 -0
- package/public/r/comp-474.json +22 -0
- package/public/r/comp-475.json +22 -0
- package/public/r/comp-476.json +21 -0
- package/public/r/comp-477.json +31 -0
- package/public/r/comp-478.json +36 -0
- package/public/r/comp-479.json +28 -0
- package/public/r/comp-48.json +32 -0
- package/public/r/comp-480.json +30 -0
- package/public/r/comp-481.json +34 -0
- package/public/r/comp-482.json +33 -0
- package/public/r/comp-483.json +37 -0
- package/public/r/comp-484.json +41 -0
- package/public/r/comp-485.json +43 -0
- package/public/r/comp-486.json +23 -0
- package/public/r/comp-487.json +26 -0
- package/public/r/comp-488.json +27 -0
- package/public/r/comp-489.json +28 -0
- package/public/r/comp-49.json +32 -0
- package/public/r/comp-490.json +23 -0
- package/public/r/comp-491.json +24 -0
- package/public/r/comp-492.json +25 -0
- package/public/r/comp-493.json +23 -0
- package/public/r/comp-494.json +23 -0
- package/public/r/comp-495.json +24 -0
- package/public/r/comp-496.json +23 -0
- package/public/r/comp-497.json +24 -0
- package/public/r/comp-498.json +24 -0
- package/public/r/comp-499.json +24 -0
- package/public/r/comp-50.json +32 -0
- package/public/r/comp-500.json +25 -0
- package/public/r/comp-501.json +25 -0
- package/public/r/comp-502.json +26 -0
- package/public/r/comp-503.json +27 -0
- package/public/r/comp-504.json +28 -0
- package/public/r/comp-505.json +28 -0
- package/public/r/comp-506.json +26 -0
- package/public/r/comp-507.json +27 -0
- package/public/r/comp-508.json +25 -0
- package/public/r/comp-509.json +25 -0
- package/public/r/comp-51.json +23 -0
- package/public/r/comp-510.json +24 -0
- package/public/r/comp-511.json +27 -0
- package/public/r/comp-512.json +27 -0
- package/public/r/comp-513.json +21 -0
- package/public/r/comp-514.json +21 -0
- package/public/r/comp-515.json +21 -0
- package/public/r/comp-516.json +22 -0
- package/public/r/comp-517.json +22 -0
- package/public/r/comp-518.json +21 -0
- package/public/r/comp-519.json +21 -0
- package/public/r/comp-52.json +23 -0
- package/public/r/comp-520.json +22 -0
- package/public/r/comp-521.json +22 -0
- package/public/r/comp-522.json +21 -0
- package/public/r/comp-523.json +21 -0
- package/public/r/comp-524.json +21 -0
- package/public/r/comp-525.json +21 -0
- package/public/r/comp-526.json +22 -0
- package/public/r/comp-527.json +23 -0
- package/public/r/comp-528.json +22 -0
- package/public/r/comp-529.json +22 -0
- package/public/r/comp-53.json +24 -0
- package/public/r/comp-530.json +22 -0
- package/public/r/comp-531.json +22 -0
- package/public/r/comp-532.json +22 -0
- package/public/r/comp-533.json +22 -0
- package/public/r/comp-534.json +22 -0
- package/public/r/comp-535.json +22 -0
- package/public/r/comp-536.json +22 -0
- package/public/r/comp-537.json +22 -0
- package/public/r/comp-538.json +22 -0
- package/public/r/comp-539.json +22 -0
- package/public/r/comp-54.json +26 -0
- package/public/r/comp-540.json +21 -0
- package/public/r/comp-541.json +21 -0
- package/public/r/comp-542.json +124 -0
- package/public/r/comp-543.json +29 -0
- package/public/r/comp-544.json +26 -0
- package/public/r/comp-545.json +29 -0
- package/public/r/comp-546.json +29 -0
- package/public/r/comp-547.json +29 -0
- package/public/r/comp-548.json +29 -0
- package/public/r/comp-549.json +29 -0
- package/public/r/comp-55.json +27 -0
- package/public/r/comp-550.json +29 -0
- package/public/r/comp-551.json +30 -0
- package/public/r/comp-552.json +29 -0
- package/public/r/comp-553.json +29 -0
- package/public/r/comp-554.json +36 -0
- package/public/r/comp-555.json +23 -0
- package/public/r/comp-556.json +23 -0
- package/public/r/comp-557.json +23 -0
- package/public/r/comp-558.json +23 -0
- package/public/r/comp-559.json +23 -0
- package/public/r/comp-56.json +26 -0
- package/public/r/comp-560.json +23 -0
- package/public/r/comp-561.json +25 -0
- package/public/r/comp-562.json +23 -0
- package/public/r/comp-563.json +23 -0
- package/public/r/comp-564.json +24 -0
- package/public/r/comp-565.json +20 -0
- package/public/r/comp-566.json +20 -0
- package/public/r/comp-567.json +20 -0
- package/public/r/comp-568.json +20 -0
- package/public/r/comp-569.json +20 -0
- package/public/r/comp-57.json +26 -0
- package/public/r/comp-570.json +20 -0
- package/public/r/comp-571.json +23 -0
- package/public/r/comp-572.json +23 -0
- package/public/r/comp-573.json +20 -0
- package/public/r/comp-574.json +22 -0
- package/public/r/comp-575.json +20 -0
- package/public/r/comp-576.json +21 -0
- package/public/r/comp-577.json +23 -0
- package/public/r/comp-578.json +28 -0
- package/public/r/comp-579.json +28 -0
- package/public/r/comp-58.json +25 -0
- package/public/r/comp-580.json +29 -0
- package/public/r/comp-581.json +45 -0
- package/public/r/comp-582.json +42 -0
- package/public/r/comp-583.json +41 -0
- package/public/r/comp-584.json +41 -0
- package/public/r/comp-585.json +41 -0
- package/public/r/comp-586.json +34 -0
- package/public/r/comp-587.json +29 -0
- package/public/r/comp-588.json +33 -0
- package/public/r/comp-589.json +37 -0
- package/public/r/comp-59.json +22 -0
- package/public/r/comp-590.json +40 -0
- package/public/r/comp-591.json +29 -0
- package/public/r/comp-592.json +41 -0
- package/public/r/comp-593.json +36 -0
- package/public/r/comp-594.json +33 -0
- package/public/r/comp-595.json +22 -0
- package/public/r/comp-596.json +26 -0
- package/public/r/comp-597.json +22 -0
- package/public/r/comp-598.json +22 -0
- package/public/r/comp-599.json +22 -0
- package/public/r/comp-60.json +23 -0
- package/public/r/comp-600.json +17 -0
- package/public/r/comp-601.json +20 -0
- package/public/r/comp-602.json +17 -0
- package/public/r/comp-603.json +20 -0
- package/public/r/comp-604.json +17 -0
- package/public/r/comp-605.json +17 -0
- package/public/r/comp-606.json +20 -0
- package/public/r/comp-607.json +20 -0
- package/public/r/comp-608.json +20 -0
- package/public/r/comp-609.json +20 -0
- package/public/r/comp-61.json +23 -0
- package/public/r/comp-610.json +23 -0
- package/public/r/comp-611.json +23 -0
- package/public/r/comp-612.json +17 -0
- package/public/r/comp-613.json +20 -0
- package/public/r/comp-614.json +17 -0
- package/public/r/comp-615.json +26 -0
- package/public/r/comp-616.json +26 -0
- package/public/r/comp-617.json +26 -0
- package/public/r/comp-62.json +23 -0
- package/public/r/comp-63.json +22 -0
- package/public/r/comp-64.json +23 -0
- package/public/r/comp-65.json +22 -0
- package/public/r/comp-66.json +22 -0
- package/public/r/comp-67.json +23 -0
- package/public/r/comp-68.json +24 -0
- package/public/r/comp-69.json +24 -0
- package/public/r/comp-70.json +24 -0
- package/public/r/comp-71.json +22 -0
- package/public/r/comp-72.json +21 -0
- package/public/r/comp-73.json +18 -0
- package/public/r/comp-74.json +27 -0
- package/public/r/comp-75.json +22 -0
- package/public/r/comp-76.json +23 -0
- package/public/r/comp-77.json +22 -0
- package/public/r/comp-78.json +21 -0
- package/public/r/comp-79.json +22 -0
- package/public/r/comp-80.json +21 -0
- package/public/r/comp-81.json +21 -0
- package/public/r/comp-82.json +22 -0
- package/public/r/comp-83.json +21 -0
- package/public/r/comp-84.json +21 -0
- package/public/r/comp-85.json +22 -0
- package/public/r/comp-86.json +22 -0
- package/public/r/comp-87.json +21 -0
- package/public/r/comp-88.json +22 -0
- package/public/r/comp-89.json +21 -0
- package/public/r/comp-90.json +22 -0
- package/public/r/comp-91.json +22 -0
- package/public/r/comp-92.json +22 -0
- package/public/r/comp-93.json +22 -0
- package/public/r/comp-94.json +24 -0
- package/public/r/comp-95.json +26 -0
- package/public/r/comp-96.json +21 -0
- package/public/r/comp-97.json +21 -0
- package/public/r/comp-98.json +22 -0
- package/public/r/comp-99.json +23 -0
- package/public/r/comparison-event-handlers.json +1 -1
- package/public/r/comparison-hover.json +1 -1
- package/public/r/comparison.json +1 -1
- package/public/r/context-menu.json +16 -0
- package/public/r/contribution-graph-custom-footer.json +1 -1
- package/public/r/credit-card-apple.json +1 -1
- package/public/r/credit-card-back.json +1 -1
- package/public/r/credit-card.json +1 -1
- package/public/r/cropper.json +15 -0
- package/public/r/cursor-color.json +1 -1
- package/public/r/cursor-message.json +1 -1
- package/public/r/cursor-name-message.json +1 -1
- package/public/r/cursor-name.json +1 -1
- package/public/r/cursor.json +1 -1
- package/public/r/dashboard-1.json +263 -0
- package/public/r/dashboard-2.json +264 -0
- package/public/r/dashboard-3.json +225 -0
- package/public/r/datefield-rac.json +15 -0
- package/public/r/deck-controlled.json +1 -1
- package/public/r/deck-product-cards.json +1 -1
- package/public/r/deck.json +1 -1
- package/public/r/dialog-close-confirmation.json +1 -1
- package/public/r/dialog-demo.json +1 -1
- package/public/r/dialog-from-menu.json +1 -1
- package/public/r/dialog-nested.json +1 -1
- package/public/r/dialog-stack-controlled.json +1 -1
- package/public/r/dialog-stack-navigation.json +1 -1
- package/public/r/dialog-stack-six.json +1 -1
- package/public/r/dialog-stack.json +1 -1
- package/public/r/dropdown-menu.json +15 -0
- package/public/r/dropzone-custom-empty-state.json +1 -1
- package/public/r/dropzone-image-preview.json +1 -1
- package/public/r/editor.json +1 -1
- package/public/r/emails.json +243 -0
- package/public/r/empty-demo.json +1 -1
- package/public/r/example-app-calendar.json +323 -0
- package/public/r/field-2.json +19 -0
- package/public/r/field-autocomplete.json +1 -1
- package/public/r/field-checkbox-group.json +1 -1
- package/public/r/field-checkbox.json +1 -1
- package/public/r/field-combobox-multiple.json +1 -1
- package/public/r/field-combobox.json +1 -1
- package/public/r/field-complete-form.json +1 -1
- package/public/r/field-demo.json +1 -1
- package/public/r/field-disabled.json +1 -1
- package/public/r/field-error.json +1 -1
- package/public/r/field-number-field.json +1 -1
- package/public/r/field-radio.json +1 -1
- package/public/r/field-required.json +1 -1
- package/public/r/field-select.json +1 -1
- package/public/r/field-slider.json +1 -1
- package/public/r/field-switch.json +1 -1
- package/public/r/field-textarea.json +1 -1
- package/public/r/field-validity.json +1 -1
- package/public/r/fieldset-demo.json +1 -1
- package/public/r/files.json +195 -0
- package/public/r/form-demo.json +1 -1
- package/public/r/form-zod.json +1 -1
- package/public/r/form.json +1 -1
- package/public/r/frame-demo.json +1 -1
- package/public/r/gantt-lanes.json +1 -1
- package/public/r/gantt-no-sidebar.json +1 -1
- package/public/r/gantt-read-only.json +1 -1
- package/public/r/gantt.json +1 -1
- package/public/r/glimpse-custom.json +1 -1
- package/public/r/glimpse.json +1 -1
- package/public/r/gooey-toast-demo.json +1 -1
- package/public/r/gooey-toast-promise.json +1 -1
- package/public/r/gooey-toast-states.json +1 -1
- package/public/r/gooey-toast-with-button.json +1 -1
- package/public/r/group-demo.json +1 -1
- package/public/r/group-with-input.json +1 -1
- package/public/r/hero.json +1 -1
- package/public/r/hover-card.json +15 -0
- package/public/r/image-crop-circular.json +1 -1
- package/public/r/image-crop-custom.json +1 -1
- package/public/r/image-crop.json +1 -1
- package/public/r/image-zoom-background.json +1 -1
- package/public/r/image-zoom-margin.json +1 -1
- package/public/r/image-zoom.json +1 -1
- package/public/r/input-demo.json +1 -1
- package/public/r/input-disabled.json +1 -1
- package/public/r/input-file.json +1 -1
- package/public/r/input-group.json +20 -0
- package/public/r/input-lg.json +1 -1
- package/public/r/input-sm.json +1 -1
- package/public/r/input-with-button.json +1 -1
- package/public/r/input-with-label.json +1 -1
- package/public/r/kanban-simple.json +1 -1
- package/public/r/kanban.json +1 -1
- package/public/r/kbd.json +12 -0
- package/public/r/leads.json +271 -0
- package/public/r/list-simple.json +1 -1
- package/public/r/list.json +1 -1
- package/public/r/maps.json +188 -0
- package/public/r/menu-checkbox.json +1 -1
- package/public/r/menu-close-on-click.json +1 -1
- package/public/r/menu-demo.json +1 -1
- package/public/r/menu-group-labels.json +1 -1
- package/public/r/menu-hover.json +1 -1
- package/public/r/menu-link.json +1 -1
- package/public/r/menu-nested.json +1 -1
- package/public/r/menu-radio-group.json +1 -1
- package/public/r/meter-demo.json +1 -1
- package/public/r/meter-with-formatted-value.json +1 -1
- package/public/r/meter-with-range.json +1 -1
- package/public/r/mini-calendar-controlled.json +1 -1
- package/public/r/multiselect.json +15 -0
- package/public/r/navigation-menu.json +12 -0
- package/public/r/number-field-form.json +1 -1
- package/public/r/number-field-with-label.json +1 -1
- package/public/r/number-field-with-scrub.json +1 -1
- package/public/r/number-field-with-step.json +1 -1
- package/public/r/pill-avatar-group.json +1 -1
- package/public/r/pill-delta.json +1 -1
- package/public/r/pill-icon.json +1 -1
- package/public/r/pill-indicator.json +1 -1
- package/public/r/pill-status.json +1 -1
- package/public/r/pill.json +1 -1
- package/public/r/popover-demo.json +1 -1
- package/public/r/popover-with-close.json +1 -1
- package/public/r/preview-card-demo.json +1 -1
- package/public/r/pricing.json +1 -1
- package/public/r/progress-with-formatted-value.json +1 -1
- package/public/r/progress-with-label-value.json +1 -1
- package/public/r/radio-group-card.json +1 -1
- package/public/r/radio-group-demo.json +1 -1
- package/public/r/radio-group-disabled.json +1 -1
- package/public/r/radio-group-form.json +1 -1
- package/public/r/radio-group-with-description.json +1 -1
- package/public/r/reel-custom.json +1 -1
- package/public/r/reel-images.json +1 -1
- package/public/r/reel-minimal.json +1 -1
- package/public/r/reel.json +1 -1
- package/public/r/registry.json +18217 -0
- package/public/r/relative-time-controlled.json +1 -1
- package/public/r/relative-time-format-date.json +1 -1
- package/public/r/relative-time-format-time.json +1 -1
- package/public/r/relative-time.json +1 -1
- package/public/r/rentals.json +187 -0
- package/public/r/roadmap.json +1 -1
- package/public/r/sandbox-no-file-explorer.json +1 -1
- package/public/r/sandbox.json +1 -1
- package/public/r/scroll-area-both.json +1 -1
- package/public/r/scroll-area-demo.json +1 -1
- package/public/r/scroll-area-horizontal.json +1 -1
- package/public/r/select-demo.json +1 -1
- package/public/r/select-disabled.json +1 -1
- package/public/r/select-form.json +1 -1
- package/public/r/select-lg.json +1 -1
- package/public/r/select-native.json +12 -0
- package/public/r/select-sm.json +1 -1
- package/public/r/select-with-groups.json +1 -1
- package/public/r/select-without-alignment.json +1 -1
- package/public/r/select.json +1 -1
- package/public/r/separator-demo.json +1 -1
- package/public/r/sheet-demo.json +1 -1
- package/public/r/sheet-position.json +1 -1
- package/public/r/sidebar-nav.json +22 -0
- package/public/r/skeleton-demo.json +1 -1
- package/public/r/skeleton.json +1 -1
- package/public/r/slider-form.json +1 -1
- package/public/r/slider-with-label-value.json +1 -1
- package/public/r/sonner.json +16 -0
- package/public/r/stats-card.json +22 -0
- package/public/r/status-custom.json +1 -1
- package/public/r/stepper.json +15 -0
- package/public/r/stories-images.json +1 -1
- package/public/r/switch-card.json +1 -1
- package/public/r/switch-demo.json +1 -1
- package/public/r/switch-disabled.json +1 -1
- package/public/r/switch-form.json +1 -1
- package/public/r/switch-with-description.json +1 -1
- package/public/r/table-demo.json +1 -1
- package/public/r/table-framed.json +1 -1
- package/public/r/table-simple.json +1 -1
- package/public/r/table.json +1 -1
- package/public/r/tabs-demo.json +1 -1
- package/public/r/tabs-underline-vertical.json +1 -1
- package/public/r/tabs-underline.json +1 -1
- package/public/r/tabs-vertical.json +1 -1
- package/public/r/tags-create.json +1 -1
- package/public/r/tags-filter.json +1 -1
- package/public/r/tags.json +1 -1
- package/public/r/template-auth-eight.json +28 -0
- package/public/r/template-auth-five.json +28 -0
- package/public/r/template-auth-four.json +29 -0
- package/public/r/template-auth-nine.json +28 -0
- package/public/r/template-auth-one.json +49 -0
- package/public/r/template-auth-seven.json +29 -0
- package/public/r/template-auth-six.json +28 -0
- package/public/r/template-auth-three.json +49 -0
- package/public/r/template-auth-two.json +44 -0
- package/public/r/template-hero-eight.json +83 -0
- package/public/r/template-hero-eleven.json +29 -0
- package/public/r/template-hero-five.json +35 -0
- package/public/r/template-hero-four.json +35 -0
- package/public/r/template-hero-fourteen.json +101 -0
- package/public/r/template-hero-nine.json +74 -0
- package/public/r/template-hero-one.json +90 -0
- package/public/r/template-hero-seven.json +83 -0
- package/public/r/template-hero-six.json +83 -0
- package/public/r/template-hero-ten.json +77 -0
- package/public/r/template-hero-thirteen.json +101 -0
- package/public/r/template-hero-three.json +35 -0
- package/public/r/template-hero-twelve.json +30 -0
- package/public/r/template-hero-two.json +96 -0
- package/public/r/template-logo-cloud-five.json +68 -0
- package/public/r/template-logo-cloud-four.json +71 -0
- package/public/r/template-logo-cloud-one.json +89 -0
- package/public/r/template-logo-cloud-three.json +71 -0
- package/public/r/template-logo-cloud-two.json +74 -0
- package/public/r/textarea-demo.json +1 -1
- package/public/r/textarea-disabled.json +1 -1
- package/public/r/textarea-form.json +1 -1
- package/public/r/textarea-lg.json +1 -1
- package/public/r/textarea-sm.json +1 -1
- package/public/r/textarea-with-label.json +1 -1
- package/public/r/ticker-inline.json +1 -1
- package/public/r/timeline.json +15 -0
- package/public/r/toast-demo.json +1 -1
- package/public/r/toast-heights.json +1 -1
- package/public/r/toast-loading.json +1 -1
- package/public/r/toast-promise.json +1 -1
- package/public/r/toast-with-action.json +1 -1
- package/public/r/toast-with-status.json +1 -1
- package/public/r/toggle-demo.json +1 -1
- package/public/r/toggle-disabled.json +1 -1
- package/public/r/toggle-group-demo.json +1 -1
- package/public/r/toggle-group-disabled.json +1 -1
- package/public/r/toggle-group-lg.json +1 -1
- package/public/r/toggle-group-multiple.json +1 -1
- package/public/r/toggle-group-outline-with-separator.json +1 -1
- package/public/r/toggle-group-outline.json +1 -1
- package/public/r/toggle-group-sm.json +1 -1
- package/public/r/toggle-group-with-disabled-item.json +1 -1
- package/public/r/toggle-icon-group.json +1 -1
- package/public/r/toggle-lg.json +1 -1
- package/public/r/toggle-outline.json +1 -1
- package/public/r/toggle-sm.json +1 -1
- package/public/r/toggle-with-icon.json +1 -1
- package/public/r/toolbar-demo.json +1 -1
- package/public/r/tooltip-demo.json +1 -1
- package/public/r/tooltip-grouped.json +1 -1
- package/public/r/tree-controlled.json +1 -1
- package/public/r/tree-custom-icons.json +1 -1
- package/public/r/tree-no-lines.json +1 -1
- package/public/r/tree-simple.json +1 -1
- package/public/r/tree.json +1 -1
- package/public/r/typography.json +1 -1
- package/public/r/ui.json +5 -0
- package/public/r/use-character-limit.json +12 -0
- package/public/r/use-file-upload.json +12 -0
- package/public/r/use-pagination.json +12 -0
- package/public/r/use-slider-with-input.json +12 -0
- package/public/r/use-toast.json +12 -0
- package/public/r/utils.json +16 -0
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"files": [
|
|
10
10
|
{
|
|
11
11
|
"path": "registry/default/examples/menu-close-on-click.tsx",
|
|
12
|
-
"content": "import { Button } from \"@/registry/default/ui/button\"\nimport {\n Menu,\n MenuItem,\n MenuPopup,\n MenuTrigger,\n} from \"@/registry/default/ui/menu\"\n\nexport default function MenuCloseOnClickDemo() {\n return (\n <Menu>\n <MenuTrigger render={<Button variant=\"outline\" />}
|
|
12
|
+
"content": "import { Button } from \"@/registry/default/ui/button\"\nimport {\n Menu,\n MenuItem,\n MenuPopup,\n MenuTrigger,\n} from \"@/registry/default/ui/menu\"\n\nexport default function MenuCloseOnClickDemo() {\n return (\n <Menu>\n <MenuTrigger render={<Button variant=\"outline\" />}>\n Updated Open menu\n </MenuTrigger>\n <MenuPopup>\n <MenuItem closeOnClick>Updated Profile</MenuItem>\n <MenuItem closeOnClick>Updated Settings</MenuItem>\n <MenuItem closeOnClick>Updated Log out</MenuItem>\n </MenuPopup>\n </Menu>\n )\n}\n",
|
|
13
13
|
"type": "registry:example"
|
|
14
14
|
}
|
|
15
15
|
],
|
package/public/r/menu-demo.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"files": [
|
|
10
10
|
{
|
|
11
11
|
"path": "registry/default/examples/menu-demo.tsx",
|
|
12
|
-
"content": "import {\n PauseIcon,\n PlayIcon,\n SkipBackIcon,\n SkipForwardIcon,\n TrashIcon,\n} from \"lucide-react\"\n\nimport { Button } from \"@/registry/default/ui/button\"\nimport {\n Menu,\n MenuCheckboxItem,\n MenuGroup,\n MenuGroupLabel,\n MenuItem,\n MenuPopup,\n MenuRadioGroup,\n MenuRadioItem,\n MenuSeparator,\n MenuShortcut,\n MenuSub,\n MenuSubPopup,\n MenuSubTrigger,\n MenuTrigger,\n} from \"@/registry/default/ui/menu\"\n\nexport default function MenuDemo() {\n return (\n <Menu>\n <MenuTrigger render={<Button variant=\"outline\" />}
|
|
12
|
+
"content": "import {\n PauseIcon,\n PlayIcon,\n SkipBackIcon,\n SkipForwardIcon,\n TrashIcon,\n} from \"lucide-react\"\n\nimport { Button } from \"@/registry/default/ui/button\"\nimport {\n Menu,\n MenuCheckboxItem,\n MenuGroup,\n MenuGroupLabel,\n MenuItem,\n MenuPopup,\n MenuRadioGroup,\n MenuRadioItem,\n MenuSeparator,\n MenuShortcut,\n MenuSub,\n MenuSubPopup,\n MenuSubTrigger,\n MenuTrigger,\n} from \"@/registry/default/ui/menu\"\n\nexport default function MenuDemo() {\n return (\n <Menu>\n <MenuTrigger render={<Button variant=\"outline\" />}>\n Updated Open menu\n </MenuTrigger>\n <MenuPopup>\n <MenuGroup>\n <MenuGroupLabel>Updated Playback</MenuGroupLabel>\n <MenuItem>\n <PlayIcon className=\"opacity-72\" />\n Updated Play\n <MenuShortcut>Updated ⌘P</MenuShortcut>\n </MenuItem>\n <MenuItem disabled>\n <PauseIcon className=\"opacity-72\" />\n Updated Pause\n <MenuShortcut>Updated ⇧⌘P</MenuShortcut>\n </MenuItem>\n <MenuItem>\n <SkipBackIcon className=\"opacity-72\" />\n Updated Previous\n <MenuShortcut>⌘[</MenuShortcut>\n </MenuItem>\n <MenuItem>\n <SkipForwardIcon className=\"opacity-72\" />\n Updated Next\n <MenuShortcut>⌘]</MenuShortcut>\n </MenuItem>\n </MenuGroup>\n <MenuSeparator />\n <MenuCheckboxItem>Updated Shuffle</MenuCheckboxItem>\n <MenuCheckboxItem>Updated Repeat</MenuCheckboxItem>\n <MenuCheckboxItem disabled>Updated Enhanced Audio</MenuCheckboxItem>\n <MenuSeparator />\n <MenuGroup>\n <MenuGroupLabel>Updated Sort by</MenuGroupLabel>\n <MenuRadioGroup>\n <MenuRadioItem value=\"artist\">Updated Artist</MenuRadioItem>\n <MenuRadioItem value=\"album\">Updated Album</MenuRadioItem>\n <MenuRadioItem value=\"title\">Updated Title</MenuRadioItem>\n </MenuRadioGroup>\n </MenuGroup>\n <MenuSeparator />\n <MenuSub>\n <MenuSubTrigger>Updated Add to Playlist</MenuSubTrigger>\n <MenuSubPopup>\n <MenuItem>Updated Jazz</MenuItem>\n <MenuSub>\n <MenuSubTrigger>Updated Rock</MenuSubTrigger>\n <MenuSubPopup>\n <MenuItem>Updated Hard Rock</MenuItem>\n <MenuItem>Updated Soft Rock</MenuItem>\n <MenuItem>Updated Classic Rock</MenuItem>\n <MenuSeparator />\n <MenuItem>Updated Metal</MenuItem>\n <MenuItem>Updated Punk</MenuItem>\n <MenuItem>Updated Grunge</MenuItem>\n <MenuItem>Updated Alternative</MenuItem>\n <MenuItem>Updated Indie</MenuItem>\n <MenuItem>Updated Electronic</MenuItem>\n </MenuSubPopup>\n </MenuSub>\n <MenuItem>Updated Pop</MenuItem>\n </MenuSubPopup>\n </MenuSub>\n <MenuSeparator />\n <MenuItem variant=\"destructive\">\n <TrashIcon />\n Updated Delete\n <MenuShortcut>⌘⌫</MenuShortcut>\n </MenuItem>\n </MenuPopup>\n </Menu>\n )\n}\n",
|
|
13
13
|
"type": "registry:example"
|
|
14
14
|
}
|
|
15
15
|
],
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"files": [
|
|
10
10
|
{
|
|
11
11
|
"path": "registry/default/examples/menu-group-labels.tsx",
|
|
12
|
-
"content": "import { Button } from \"@/registry/default/ui/button\"\nimport {\n Menu,\n
|
|
12
|
+
"content": "import { Button } from \"@/registry/default/ui/button\"\nimport {\n Menu,\n MenuItem,\n MenuPopup,\n MenuSeparator,\n MenuTrigger,\n} from \"@/registry/default/ui/menu\"\n\nexport default function MenuGroupLabelsDemo() {\n return (\n <Menu>\n <MenuTrigger render={<Button variant=\"outline\" />}>\n Updated Open menu\n </MenuTrigger>\n <MenuPopup>\n <MenuItem disabled>Updated Account</MenuItem>\n <MenuItem>Updated Profile</MenuItem>\n <MenuItem>Updated Billing</MenuItem>\n <MenuSeparator />\n <MenuItem disabled>Updated Support</MenuItem>\n <MenuItem>Updated Docs</MenuItem>\n <MenuItem>Updated Contact</MenuItem>\n </MenuPopup>\n </Menu>\n )\n}\n",
|
|
13
13
|
"type": "registry:example"
|
|
14
14
|
}
|
|
15
15
|
],
|
package/public/r/menu-hover.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"files": [
|
|
10
10
|
{
|
|
11
11
|
"path": "registry/default/examples/menu-hover.tsx",
|
|
12
|
-
"content": "import { Button } from \"@/registry/default/ui/button\"\nimport {\n Menu,\n MenuItem,\n MenuPopup,\n MenuTrigger,\n} from \"@/registry/default/ui/menu\"\n\nexport default function MenuHoverDemo() {\n return (\n <Menu openOnHover>\n <MenuTrigger render={<Button variant=\"outline\" />}
|
|
12
|
+
"content": "import { Button } from \"@/registry/default/ui/button\"\nimport {\n Menu,\n MenuItem,\n MenuPopup,\n MenuTrigger,\n} from \"@/registry/default/ui/menu\"\n\nexport default function MenuHoverDemo() {\n return (\n <Menu openOnHover>\n <MenuTrigger render={<Button variant=\"outline\" />}>\n Updated Hover me\n </MenuTrigger>\n <MenuPopup>\n <MenuItem>Updated Item one</MenuItem>\n <MenuItem>Updated Item two</MenuItem>\n </MenuPopup>\n </Menu>\n )\n}\n",
|
|
13
13
|
"type": "registry:example"
|
|
14
14
|
}
|
|
15
15
|
],
|
package/public/r/menu-link.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"files": [
|
|
10
10
|
{
|
|
11
11
|
"path": "registry/default/examples/menu-link.tsx",
|
|
12
|
-
"content": "import Link from \"next/link\"\n\nimport { Button } from \"@/registry/default/ui/button\"\nimport {\n Menu,\n MenuItem,\n MenuPopup,\n MenuTrigger,\n} from \"@/registry/default/ui/menu\"\n\nexport default function MenuLinkDemo() {\n return (\n <Menu>\n <MenuTrigger render={<Button variant=\"outline\" />}
|
|
12
|
+
"content": "import Link from \"next/link\"\n\nimport { Button } from \"@/registry/default/ui/button\"\nimport {\n Menu,\n MenuItem,\n MenuPopup,\n MenuTrigger,\n} from \"@/registry/default/ui/menu\"\n\nexport default function MenuLinkDemo() {\n return (\n <Menu>\n <MenuTrigger render={<Button variant=\"outline\" />}>\n Updated Open menu\n </MenuTrigger>\n <MenuPopup>\n <MenuItem render={<Link href=\"/docs\" />}>Updated Docs</MenuItem>\n <MenuItem render={<Link href=\"/particles\" />}>\n Updated Particles\n </MenuItem>\n </MenuPopup>\n </Menu>\n )\n}\n",
|
|
13
13
|
"type": "registry:example"
|
|
14
14
|
}
|
|
15
15
|
],
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"files": [
|
|
10
10
|
{
|
|
11
11
|
"path": "registry/default/examples/menu-nested.tsx",
|
|
12
|
-
"content": "import { Button } from \"@/registry/default/ui/button\"\nimport {\n Menu,\n MenuItem,\n MenuPopup,\n MenuSub,\n MenuSubPopup,\n MenuSubTrigger,\n MenuTrigger,\n} from \"@/registry/default/ui/menu\"\n\nexport default function MenuNestedDemo() {\n return (\n <Menu>\n <MenuTrigger render={<Button variant=\"outline\" />}
|
|
12
|
+
"content": "import { Button } from \"@/registry/default/ui/button\"\nimport {\n Menu,\n MenuItem,\n MenuPopup,\n MenuSub,\n MenuSubPopup,\n MenuSubTrigger,\n MenuTrigger,\n} from \"@/registry/default/ui/menu\"\n\nexport default function MenuNestedDemo() {\n return (\n <Menu>\n <MenuTrigger render={<Button variant=\"outline\" />}>\n Updated Open menu\n </MenuTrigger>\n <MenuPopup>\n <MenuItem>Updated Item one</MenuItem>\n <MenuSub>\n <MenuSubTrigger>Updated More</MenuSubTrigger>\n <MenuSubPopup>\n <MenuItem>Updated Sub item A</MenuItem>\n <MenuItem>Updated Sub item B</MenuItem>\n </MenuSubPopup>\n </MenuSub>\n <MenuItem>Updated Item two</MenuItem>\n </MenuPopup>\n </Menu>\n )\n}\n",
|
|
13
13
|
"type": "registry:example"
|
|
14
14
|
}
|
|
15
15
|
],
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"files": [
|
|
10
10
|
{
|
|
11
11
|
"path": "registry/default/examples/menu-radio-group.tsx",
|
|
12
|
-
"content": "import { Button } from \"@/registry/default/ui/button\"\nimport {\n Menu,\n MenuPopup,\n MenuRadioGroup,\n MenuRadioItem,\n MenuTrigger,\n} from \"@/registry/default/ui/menu\"\n\nexport default function MenuRadioGroupDemo() {\n return (\n <Menu>\n <MenuTrigger render={<Button variant=\"outline\" />}
|
|
12
|
+
"content": "import { Button } from \"@/registry/default/ui/button\"\nimport {\n Menu,\n MenuPopup,\n MenuRadioGroup,\n MenuRadioItem,\n MenuTrigger,\n} from \"@/registry/default/ui/menu\"\n\nexport default function MenuRadioGroupDemo() {\n return (\n <Menu>\n <MenuTrigger render={<Button variant=\"outline\" />}>\n Updated Open menu\n </MenuTrigger>\n <MenuPopup>\n <MenuRadioGroup defaultValue=\"system\">\n <MenuRadioItem value=\"light\">Updated Light</MenuRadioItem>\n <MenuRadioItem value=\"dark\">Updated Dark</MenuRadioItem>\n <MenuRadioItem value=\"system\">Updated System</MenuRadioItem>\n </MenuRadioGroup>\n </MenuPopup>\n </Menu>\n )\n}\n",
|
|
13
13
|
"type": "registry:example"
|
|
14
14
|
}
|
|
15
15
|
],
|
package/public/r/meter-demo.json
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"files": [
|
|
9
9
|
{
|
|
10
10
|
"path": "registry/default/examples/meter-demo.tsx",
|
|
11
|
-
"content": "import {\n Meter,\n MeterIndicator,\n MeterLabel,\n MeterTrack,\n MeterValue,\n} from \"@/registry/default/ui/meter\"\n\nexport default function MeterDemo() {\n return (\n <Meter value={75}>\n <div className=\"flex items-center justify-between gap-2\">\n <MeterLabel>Storage usage</MeterLabel>\n <MeterValue />\n </div>\n <MeterTrack>\n <MeterIndicator />\n </MeterTrack>\n </Meter>\n )\n}\n",
|
|
11
|
+
"content": "import {\n Meter,\n MeterIndicator,\n MeterLabel,\n MeterTrack,\n MeterValue,\n} from \"@/registry/default/ui/meter\"\n\nexport default function MeterDemo() {\n return (\n <Meter value={75}>\n <div className=\"flex items-center justify-between gap-2\">\n <MeterLabel>Updated Storage usage</MeterLabel>\n <MeterValue />\n </div>\n <MeterTrack>\n <MeterIndicator />\n </MeterTrack>\n </Meter>\n )\n}\n",
|
|
12
12
|
"type": "registry:example"
|
|
13
13
|
}
|
|
14
14
|
],
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"files": [
|
|
9
9
|
{
|
|
10
10
|
"path": "registry/default/examples/meter-with-formatted-value.tsx",
|
|
11
|
-
"content": "\"use client\"\n\nimport {\n Meter,\n MeterIndicator,\n MeterLabel,\n MeterTrack,\n MeterValue,\n} from \"@/registry/default/ui/meter\"\n\nexport default function MeterWithFormattedValueDemo() {\n return (\n <Meter value={3} max={5}>\n <div className=\"flex items-center justify-between gap-2\">\n <MeterLabel>Rating</MeterLabel>\n <MeterValue>{(_formatted, value) => `${value} / 5`}</MeterValue>\n </div>\n <MeterTrack>\n <MeterIndicator />\n </MeterTrack>\n </Meter>\n )\n}\n",
|
|
11
|
+
"content": "\"use client\"\n\nimport {\n Meter,\n MeterIndicator,\n MeterLabel,\n MeterTrack,\n MeterValue,\n} from \"@/registry/default/ui/meter\"\n\nexport default function MeterWithFormattedValueDemo() {\n return (\n <Meter value={3} max={5}>\n <div className=\"flex items-center justify-between gap-2\">\n <MeterLabel>Updated Rating</MeterLabel>\n <MeterValue>{(_formatted, value) => `${value} / 5`}</MeterValue>\n </div>\n <MeterTrack>\n <MeterIndicator />\n </MeterTrack>\n </Meter>\n )\n}\n",
|
|
12
12
|
"type": "registry:example"
|
|
13
13
|
}
|
|
14
14
|
],
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"files": [
|
|
9
9
|
{
|
|
10
10
|
"path": "registry/default/examples/meter-with-range.tsx",
|
|
11
|
-
"content": "\"use client\"\n\nimport {\n Meter,\n MeterIndicator,\n MeterLabel,\n MeterTrack,\n MeterValue,\n} from \"@/registry/default/ui/meter\"\n\nexport default function MeterWithRangeDemo() {\n return (\n <Meter value={700} min={500} max={1000}>\n <div className=\"flex items-center justify-between gap-2\">\n <MeterLabel>Bandwidth (Mbps)</MeterLabel>\n <MeterValue>{(_formatted, value) => value}</MeterValue>\n </div>\n <MeterTrack>\n <MeterIndicator />\n </MeterTrack>\n </Meter>\n )\n}\n",
|
|
11
|
+
"content": "\"use client\"\n\nimport {\n Meter,\n MeterIndicator,\n MeterLabel,\n MeterTrack,\n MeterValue,\n} from \"@/registry/default/ui/meter\"\n\nexport default function MeterWithRangeDemo() {\n return (\n <Meter value={700} min={500} max={1000}>\n <div className=\"flex items-center justify-between gap-2\">\n <MeterLabel>Updated Bandwidth (Mbps)</MeterLabel>\n <MeterValue>{(_formatted, value) => value}</MeterValue>\n </div>\n <MeterTrack>\n <MeterIndicator />\n </MeterTrack>\n </Meter>\n )\n}\n",
|
|
12
12
|
"type": "registry:example"
|
|
13
13
|
}
|
|
14
14
|
],
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"files": [
|
|
9
9
|
{
|
|
10
10
|
"path": "registry/default/examples/mini-calendar-controlled.tsx",
|
|
11
|
-
"content": "\"use client\"\n\nimport { useState } from \"react\"\n\nimport {\n MiniCalendar,\n MiniCalendarDay,\n MiniCalendarDays,\n MiniCalendarNavigation,\n} from \"../../../../../packages/mini-calendar\"\n\nconst Example = () => {\n const [selectedDate, setSelectedDate] = useState<Date | undefined>(undefined)\n\n return (\n <div className=\"space-y-4\">\n <MiniCalendar onValueChange={setSelectedDate} value={selectedDate}>\n <MiniCalendarNavigation direction=\"prev\" />\n <MiniCalendarDays>\n {(date) => <MiniCalendarDay date={date} key={date.toISOString()} />}\n </MiniCalendarDays>\n <MiniCalendarNavigation direction=\"next\" />\n </MiniCalendar>\n\n {selectedDate && (\n <p className=\"text-sm text-muted-foreground\">\n Selected:{\" \"}\n {selectedDate.toLocaleDateString(\"en-US\", {\n weekday: \"long\",\n year: \"numeric\",\n month: \"long\",\n day: \"numeric\",\n })}\n </p>\n )}\n </div>\n )\n}\n\nexport default Example\n",
|
|
11
|
+
"content": "\"use client\"\n\nimport { useState } from \"react\"\n\nimport {\n MiniCalendar,\n MiniCalendarDay,\n MiniCalendarDays,\n MiniCalendarNavigation,\n} from \"../../../../../packages/mini-calendar\"\n\nconst Example = () => {\n const [selectedDate, setSelectedDate] = useState<Date | undefined>(undefined)\n\n return (\n <div className=\"space-y-4\">\n <MiniCalendar onValueChange={setSelectedDate} value={selectedDate}>\n <MiniCalendarNavigation direction=\"prev\" />\n <MiniCalendarDays>\n {(date) => <MiniCalendarDay date={date} key={date.toISOString()} />}\n </MiniCalendarDays>\n <MiniCalendarNavigation direction=\"next\" />\n </MiniCalendar>\n\n {selectedDate && (\n <p className=\"text-sm text-muted-foreground\">\n Updated Selected:{\" \"}\n {selectedDate.toLocaleDateString(\"en-US\", {\n weekday: \"long\",\n year: \"numeric\",\n month: \"long\",\n day: \"numeric\",\n })}\n </p>\n )}\n </div>\n )\n}\n\nexport default Example\n",
|
|
12
12
|
"type": "registry:example"
|
|
13
13
|
}
|
|
14
14
|
],
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
3
|
+
"name": "multiselect",
|
|
4
|
+
"type": "registry:ui",
|
|
5
|
+
"registryDependencies": [
|
|
6
|
+
"https://loveui.dev/building-blocks/r/command.json"
|
|
7
|
+
],
|
|
8
|
+
"files": [
|
|
9
|
+
{
|
|
10
|
+
"path": "registry/default/ui/multiselect.tsx",
|
|
11
|
+
"content": "\"use client\"\n\nimport * as React from \"react\"\nimport { useEffect } from \"react\"\nimport { Command as CommandPrimitive, useCommandState } from \"cmdk\"\nimport { XIcon } from \"lucide-react\"\n\nimport { cn } from \"@/registry/default/lib/utils\"\nimport {\n Command,\n CommandGroup,\n CommandItem,\n CommandList,\n} from \"@/registry/default/ui/command\"\n\nexport interface Option {\n value: string\n label: string\n disable?: boolean\n /** fixed option that can't be removed. */\n fixed?: boolean\n /** Group the options by providing key. */\n [key: string]: string | boolean | undefined\n}\ninterface GroupOption {\n [key: string]: Option[]\n}\n\ninterface MultipleSelectorProps {\n value?: Option[]\n defaultOptions?: Option[]\n /** manually controlled options */\n options?: Option[]\n placeholder?: string\n /** Loading component. */\n loadingIndicator?: React.ReactNode\n /** Empty component. */\n emptyIndicator?: React.ReactNode\n /** Debounce time for async search. Only work with `onSearch`. */\n delay?: number\n /**\n * Only work with `onSearch` prop. Trigger search when `onFocus`.\n * For example, when user click on the input, it will trigger the search to get initial options.\n **/\n triggerSearchOnFocus?: boolean\n /** async search */\n onSearch?: (value: string) => Promise<Option[]>\n /**\n * sync search. This search will not showing loadingIndicator.\n * The rest props are the same as async search.\n * i.e.: creatable, groupBy, delay.\n **/\n onSearchSync?: (value: string) => Option[]\n onChange?: (options: Option[]) => void\n /** Limit the maximum number of selected options. */\n maxSelected?: number\n /** When the number of selected options exceeds the limit, the onMaxSelected will be called. */\n onMaxSelected?: (maxLimit: number) => void\n /** Hide the placeholder when there are options selected. */\n hidePlaceholderWhenSelected?: boolean\n disabled?: boolean\n /** Group the options base on provided key. */\n groupBy?: string\n className?: string\n badgeClassName?: string\n /**\n * First item selected is a default behavior by cmdk. That is why the default is true.\n * This is a workaround solution by add a dummy item.\n *\n * @reference: https://github.com/pacocoursey/cmdk/issues/171\n */\n selectFirstItem?: boolean\n /** Allow user to create option when there is no option matched. */\n creatable?: boolean\n /** Props of `Command` */\n commandProps?: React.ComponentPropsWithoutRef<typeof Command>\n /** Props of `CommandInput` */\n inputProps?: Omit<\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Input>,\n \"value\" | \"placeholder\" | \"disabled\"\n >\n /** hide the clear all button. */\n hideClearAllButton?: boolean\n}\n\nexport interface MultipleSelectorRef {\n selectedValue: Option[]\n input: HTMLInputElement\n focus: () => void\n reset: () => void\n}\n\nexport function useDebounce<T>(value: T, delay?: number): T {\n const [debouncedValue, setDebouncedValue] = React.useState<T>(value)\n\n useEffect(() => {\n const timer = setTimeout(() => setDebouncedValue(value), delay || 500)\n\n return () => {\n clearTimeout(timer)\n }\n }, [value, delay])\n\n return debouncedValue\n}\n\nfunction transToGroupOption(options: Option[], groupBy?: string) {\n if (options.length === 0) {\n return {}\n }\n if (!groupBy) {\n return {\n \"\": options,\n }\n }\n\n const groupOption: GroupOption = {}\n options.forEach((option) => {\n const key = (option[groupBy] as string) || \"\"\n if (!groupOption[key]) {\n groupOption[key] = []\n }\n groupOption[key].push(option)\n })\n return groupOption\n}\n\nfunction removePickedOption(groupOption: GroupOption, picked: Option[]) {\n const cloneOption = JSON.parse(JSON.stringify(groupOption)) as GroupOption\n\n for (const [key, value] of Object.entries(cloneOption)) {\n cloneOption[key] = value.filter(\n (val) => !picked.find((p) => p.value === val.value)\n )\n }\n return cloneOption\n}\n\nfunction isOptionsExist(groupOption: GroupOption, targetOption: Option[]) {\n for (const [, value] of Object.entries(groupOption)) {\n if (\n value.some((option) => targetOption.find((p) => p.value === option.value))\n ) {\n return true\n }\n }\n return false\n}\n\nconst CommandEmpty = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => {\n const render = useCommandState((state) => state.filtered.count === 0)\n\n if (!render) return null\n\n return (\n <div\n className={cn(\"px-2 py-4 text-center text-sm\", className)}\n role=\"presentation\"\n {...props}\n />\n )\n}\n\nCommandEmpty.displayName = \"CommandEmpty\"\n\nconst MultipleSelector = ({\n value,\n onChange,\n placeholder,\n defaultOptions: arrayDefaultOptions = [],\n options: arrayOptions,\n delay,\n onSearch,\n onSearchSync,\n loadingIndicator,\n emptyIndicator,\n maxSelected = Number.MAX_SAFE_INTEGER,\n onMaxSelected,\n hidePlaceholderWhenSelected,\n disabled,\n groupBy,\n className,\n badgeClassName,\n selectFirstItem = true,\n creatable = false,\n triggerSearchOnFocus = false,\n commandProps,\n inputProps,\n hideClearAllButton = false,\n}: MultipleSelectorProps) => {\n const inputRef = React.useRef<HTMLInputElement>(null)\n const [open, setOpen] = React.useState(false)\n const [onScrollbar, setOnScrollbar] = React.useState(false)\n const [isLoading, setIsLoading] = React.useState(false)\n const dropdownRef = React.useRef<HTMLDivElement>(null) // Added this\n\n const [selected, setSelected] = React.useState<Option[]>(value || [])\n const [options, setOptions] = React.useState<GroupOption>(\n transToGroupOption(arrayDefaultOptions, groupBy)\n )\n const [inputValue, setInputValue] = React.useState(\"\")\n const debouncedSearchTerm = useDebounce(inputValue, delay || 500)\n\n const handleClickOutside = (event: MouseEvent | TouchEvent) => {\n if (\n dropdownRef.current &&\n !dropdownRef.current.contains(event.target as Node) &&\n inputRef.current &&\n !inputRef.current.contains(event.target as Node)\n ) {\n setOpen(false)\n inputRef.current.blur()\n }\n }\n\n const handleUnselect = React.useCallback(\n (option: Option) => {\n const newOptions = selected.filter((s) => s.value !== option.value)\n setSelected(newOptions)\n onChange?.(newOptions)\n },\n [onChange, selected]\n )\n\n const handleKeyDown = React.useCallback(\n (e: React.KeyboardEvent<HTMLDivElement>) => {\n const input = inputRef.current\n if (input) {\n if (e.key === \"Delete\" || e.key === \"Backspace\") {\n if (input.value === \"\" && selected.length > 0) {\n const lastSelectOption = selected[selected.length - 1]\n // If last item is fixed, we should not remove it.\n if (!lastSelectOption.fixed) {\n handleUnselect(selected[selected.length - 1])\n }\n }\n }\n // This is not a default behavior of the <input /> field\n if (e.key === \"Escape\") {\n input.blur()\n }\n }\n },\n [handleUnselect, selected]\n )\n\n useEffect(() => {\n if (open) {\n document.addEventListener(\"mousedown\", handleClickOutside)\n document.addEventListener(\"touchend\", handleClickOutside)\n } else {\n document.removeEventListener(\"mousedown\", handleClickOutside)\n document.removeEventListener(\"touchend\", handleClickOutside)\n }\n\n return () => {\n document.removeEventListener(\"mousedown\", handleClickOutside)\n document.removeEventListener(\"touchend\", handleClickOutside)\n }\n }, [open])\n\n useEffect(() => {\n if (value) {\n setSelected(value)\n }\n }, [value])\n\n useEffect(() => {\n /** If `onSearch` is provided, do not trigger options updated. */\n if (!arrayOptions || onSearch) {\n return\n }\n const newOption = transToGroupOption(arrayOptions || [], groupBy)\n if (JSON.stringify(newOption) !== JSON.stringify(options)) {\n setOptions(newOption)\n }\n }, [arrayDefaultOptions, arrayOptions, groupBy, onSearch, options])\n\n useEffect(() => {\n /** sync search */\n\n const doSearchSync = () => {\n const res = onSearchSync?.(debouncedSearchTerm)\n setOptions(transToGroupOption(res || [], groupBy))\n }\n\n const exec = async () => {\n if (!onSearchSync || !open) return\n\n if (triggerSearchOnFocus) {\n doSearchSync()\n }\n\n if (debouncedSearchTerm) {\n doSearchSync()\n }\n }\n\n void exec()\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [debouncedSearchTerm, groupBy, open, triggerSearchOnFocus])\n\n useEffect(() => {\n /** async search */\n\n const doSearch = async () => {\n setIsLoading(true)\n const res = await onSearch?.(debouncedSearchTerm)\n setOptions(transToGroupOption(res || [], groupBy))\n setIsLoading(false)\n }\n\n const exec = async () => {\n if (!onSearch || !open) return\n\n if (triggerSearchOnFocus) {\n await doSearch()\n }\n\n if (debouncedSearchTerm) {\n await doSearch()\n }\n }\n\n void exec()\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [debouncedSearchTerm, groupBy, open, triggerSearchOnFocus])\n\n const CreatableItem = () => {\n if (!creatable) return undefined\n if (\n isOptionsExist(options, [{ value: inputValue, label: inputValue }]) ||\n selected.find((s) => s.value === inputValue)\n ) {\n return undefined\n }\n\n const Item = (\n <CommandItem\n value={inputValue}\n className=\"cursor-pointer\"\n onMouseDown={(e) => {\n e.preventDefault()\n e.stopPropagation()\n }}\n onSelect={(value: string) => {\n if (selected.length >= maxSelected) {\n onMaxSelected?.(selected.length)\n return\n }\n setInputValue(\"\")\n const newOptions = [...selected, { value, label: value }]\n setSelected(newOptions)\n onChange?.(newOptions)\n }}\n >\n {`Create \"${inputValue}\"`}\n </CommandItem>\n )\n\n // For normal creatable\n if (!onSearch && inputValue.length > 0) {\n return Item\n }\n\n // For async search creatable. avoid showing creatable item before loading at first.\n if (onSearch && debouncedSearchTerm.length > 0 && !isLoading) {\n return Item\n }\n\n return undefined\n }\n\n const EmptyItem = React.useCallback(() => {\n if (!emptyIndicator) return undefined\n\n // For async search that showing emptyIndicator\n if (onSearch && !creatable && Object.keys(options).length === 0) {\n return (\n <CommandItem value=\"-\" disabled>\n {emptyIndicator}\n </CommandItem>\n )\n }\n\n return <CommandEmpty>{emptyIndicator}</CommandEmpty>\n }, [creatable, emptyIndicator, onSearch, options])\n\n const selectables = React.useMemo<GroupOption>(\n () => removePickedOption(options, selected),\n [options, selected]\n )\n\n /** Avoid Creatable Selector freezing or lagging when paste a long string. */\n const commandFilter = React.useCallback(() => {\n if (commandProps?.filter) {\n return commandProps.filter\n }\n\n if (creatable) {\n return (value: string, search: string) => {\n return value.toLowerCase().includes(search.toLowerCase()) ? 1 : -1\n }\n }\n // Using default filter in `cmdk`. We don‘t have to provide it.\n return undefined\n }, [creatable, commandProps?.filter])\n\n return (\n <Command\n ref={dropdownRef}\n {...commandProps}\n onKeyDown={(e) => {\n handleKeyDown(e)\n commandProps?.onKeyDown?.(e)\n }}\n className={cn(\n \"h-auto overflow-visible bg-transparent\",\n commandProps?.className\n )}\n shouldFilter={\n commandProps?.shouldFilter !== undefined\n ? commandProps.shouldFilter\n : !onSearch\n } // When onSearch is provided, we don‘t want to filter the options. You can still override it.\n filter={commandFilter()}\n >\n <div\n className={cn(\n \"relative min-h-[38px] rounded-md border border-input text-sm transition-[color,box-shadow] outline-none focus-within:border-ring focus-within:ring-[3px] focus-within:ring-ring/50 has-disabled:pointer-events-none has-disabled:cursor-not-allowed has-disabled:opacity-50 has-aria-invalid:border-destructive has-aria-invalid:ring-destructive/20 dark:has-aria-invalid:ring-destructive/40\",\n {\n \"p-1\": selected.length !== 0,\n \"cursor-text\": !disabled && selected.length !== 0,\n },\n !hideClearAllButton && \"pe-9\",\n className\n )}\n onClick={() => {\n if (disabled) return\n inputRef?.current?.focus()\n }}\n >\n <div className=\"flex flex-wrap gap-1\">\n {selected.map((option) => {\n return (\n <div\n key={option.value}\n className={cn(\n \"animate-fadeIn relative inline-flex h-7 cursor-default items-center rounded-md border bg-background ps-2 pe-7 pl-2 text-xs font-medium text-secondary-foreground transition-all hover:bg-background disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 data-fixed:pe-2\",\n badgeClassName\n )}\n data-fixed={option.fixed}\n data-disabled={disabled || undefined}\n >\n {option.label}\n <button\n className=\"absolute -inset-y-px -end-px flex size-7 items-center justify-center rounded-e-md border border-transparent p-0 text-muted-foreground/80 outline-hidden transition-[color,box-shadow] outline-none hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50\"\n onKeyDown={(e) => {\n if (e.key === \"Enter\") {\n handleUnselect(option)\n }\n }}\n onMouseDown={(e) => {\n e.preventDefault()\n e.stopPropagation()\n }}\n onClick={() => handleUnselect(option)}\n aria-label=\"Remove\"\n >\n <XIcon size={14} aria-hidden=\"true\" />\n </button>\n </div>\n )\n })}\n {/* Avoid having the \"Search\" Icon */}\n <CommandPrimitive.Input\n {...inputProps}\n ref={inputRef}\n value={inputValue}\n disabled={disabled}\n onValueChange={(value) => {\n setInputValue(value)\n inputProps?.onValueChange?.(value)\n }}\n onBlur={(event) => {\n if (!onScrollbar) {\n setOpen(false)\n }\n inputProps?.onBlur?.(event)\n }}\n onFocus={(event) => {\n setOpen(true)\n if (triggerSearchOnFocus) {\n onSearch?.(debouncedSearchTerm)\n }\n inputProps?.onFocus?.(event)\n }}\n placeholder={\n hidePlaceholderWhenSelected && selected.length !== 0\n ? \"\"\n : placeholder\n }\n className={cn(\n \"flex-1 bg-transparent outline-hidden placeholder:text-muted-foreground/70 disabled:cursor-not-allowed\",\n {\n \"w-full\": hidePlaceholderWhenSelected,\n \"px-3 py-2\": selected.length === 0,\n \"ml-1\": selected.length !== 0,\n },\n inputProps?.className\n )}\n />\n <button\n type=\"button\"\n onClick={() => {\n setSelected(selected.filter((s) => s.fixed))\n onChange?.(selected.filter((s) => s.fixed))\n }}\n className={cn(\n \"absolute end-0 top-0 flex size-9 items-center justify-center rounded-md border border-transparent text-muted-foreground/80 transition-[color,box-shadow] outline-none hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50\",\n (hideClearAllButton ||\n disabled ||\n selected.length < 1 ||\n selected.filter((s) => s.fixed).length === selected.length) &&\n \"hidden\"\n )}\n aria-label=\"Clear all\"\n >\n <XIcon size={16} aria-hidden=\"true\" />\n </button>\n </div>\n </div>\n <div className=\"relative\">\n <div\n className={cn(\n \"absolute top-2 z-10 w-full overflow-hidden rounded-md border border-input\",\n \"data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95\",\n !open && \"hidden\"\n )}\n data-state={open ? \"open\" : \"closed\"}\n >\n {open && (\n <CommandList\n className=\"bg-popover text-popover-foreground shadow-lg outline-hidden\"\n onMouseLeave={() => {\n setOnScrollbar(false)\n }}\n onMouseEnter={() => {\n setOnScrollbar(true)\n }}\n onMouseUp={() => {\n inputRef?.current?.focus()\n }}\n >\n {isLoading ? (\n <>{loadingIndicator}</>\n ) : (\n <>\n {EmptyItem()}\n {CreatableItem()}\n {!selectFirstItem && (\n <CommandItem value=\"-\" className=\"hidden\" />\n )}\n {Object.entries(selectables).map(([key, dropdowns]) => (\n <CommandGroup\n key={key}\n heading={key}\n className=\"h-full overflow-auto\"\n >\n <>\n {dropdowns.map((option) => {\n return (\n <CommandItem\n key={option.value}\n value={option.value}\n disabled={option.disable}\n onMouseDown={(e) => {\n e.preventDefault()\n e.stopPropagation()\n }}\n onSelect={() => {\n if (selected.length >= maxSelected) {\n onMaxSelected?.(selected.length)\n return\n }\n setInputValue(\"\")\n const newOptions = [...selected, option]\n setSelected(newOptions)\n onChange?.(newOptions)\n }}\n className={cn(\n \"cursor-pointer\",\n option.disable &&\n \"pointer-events-none cursor-not-allowed opacity-50\"\n )}\n >\n {option.label}\n </CommandItem>\n )\n })}\n </>\n </CommandGroup>\n ))}\n </>\n )}\n </CommandList>\n )}\n </div>\n </div>\n </Command>\n )\n}\n\nMultipleSelector.displayName = \"MultipleSelector\"\nexport default MultipleSelector\n",
|
|
12
|
+
"type": "registry:ui"
|
|
13
|
+
}
|
|
14
|
+
]
|
|
15
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
3
|
+
"name": "navigation-menu",
|
|
4
|
+
"type": "registry:ui",
|
|
5
|
+
"files": [
|
|
6
|
+
{
|
|
7
|
+
"path": "registry/default/ui/navigation-menu.tsx",
|
|
8
|
+
"content": "import * as React from \"react\"\nimport { cva } from \"class-variance-authority\"\nimport { ChevronDownIcon } from \"lucide-react\"\nimport { NavigationMenu as NavigationMenuPrimitive } from \"radix-ui\"\n\nimport { cn } from \"@/registry/default/lib/utils\"\n\nfunction NavigationMenu({\n className,\n children,\n viewport = true,\n ...props\n}: React.ComponentProps<typeof NavigationMenuPrimitive.Root> & {\n viewport?: boolean\n}) {\n return (\n <NavigationMenuPrimitive.Root\n data-slot=\"navigation-menu\"\n data-viewport={viewport}\n className={cn(\n \"group/navigation-menu relative flex max-w-max flex-1 items-center justify-center\",\n className\n )}\n {...props}\n >\n {children}\n {viewport && <NavigationMenuViewport />}\n </NavigationMenuPrimitive.Root>\n )\n}\n\nfunction NavigationMenuList({\n className,\n ...props\n}: React.ComponentProps<typeof NavigationMenuPrimitive.List>) {\n return (\n <NavigationMenuPrimitive.List\n data-slot=\"navigation-menu-list\"\n className={cn(\n \"group flex flex-1 list-none items-center justify-center gap-1\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction NavigationMenuItem({\n className,\n ...props\n}: React.ComponentProps<typeof NavigationMenuPrimitive.Item>) {\n return (\n <NavigationMenuPrimitive.Item\n data-slot=\"navigation-menu-item\"\n className={cn(\"relative\", className)}\n {...props}\n />\n )\n}\n\nconst navigationMenuTriggerStyle = cva(\n \"group inline-flex h-9 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium transition-[color,box-shadow] outline-none hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=open]:bg-accent/50 data-[state=open]:text-accent-foreground data-[state=open]:hover:bg-accent data-[state=open]:focus:bg-accent\"\n)\n\nfunction NavigationMenuTrigger({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof NavigationMenuPrimitive.Trigger>) {\n return (\n <NavigationMenuPrimitive.Trigger\n data-slot=\"navigation-menu-trigger\"\n className={cn(navigationMenuTriggerStyle(), \"group\", className)}\n {...props}\n >\n {children}{\" \"}\n <ChevronDownIcon\n className=\"relative top-[1px] ml-1 size-3 transition duration-300 group-data-[state=open]:rotate-180\"\n aria-hidden=\"true\"\n />\n </NavigationMenuPrimitive.Trigger>\n )\n}\n\nfunction NavigationMenuContent({\n className,\n ...props\n}: React.ComponentProps<typeof NavigationMenuPrimitive.Content>) {\n return (\n <NavigationMenuPrimitive.Content\n data-slot=\"navigation-menu-content\"\n className={cn(\n \"top-0 left-0 w-full p-2 pr-2.5 data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 data-[motion^=from-]:animate-in data-[motion^=from-]:fade-in data-[motion^=to-]:animate-out data-[motion^=to-]:fade-out md:absolute md:w-auto\",\n \"group-data-[viewport=false]/navigation-menu:top-full group-data-[viewport=false]/navigation-menu:mt-1.5 group-data-[viewport=false]/navigation-menu:overflow-hidden group-data-[viewport=false]/navigation-menu:rounded-md group-data-[viewport=false]/navigation-menu:border group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:text-popover-foreground group-data-[viewport=false]/navigation-menu:shadow group-data-[viewport=false]/navigation-menu:duration-200 **:data-[slot=navigation-menu-link]:focus:ring-0 **:data-[slot=navigation-menu-link]:focus:outline-none group-data-[viewport=false]/navigation-menu:data-[state=closed]:animate-out group-data-[viewport=false]/navigation-menu:data-[state=closed]:fade-out-0 group-data-[viewport=false]/navigation-menu:data-[state=closed]:zoom-out-95 group-data-[viewport=false]/navigation-menu:data-[state=open]:animate-in group-data-[viewport=false]/navigation-menu:data-[state=open]:fade-in-0 group-data-[viewport=false]/navigation-menu:data-[state=open]:zoom-in-95\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction NavigationMenuViewport({\n className,\n ...props\n}: React.ComponentProps<typeof NavigationMenuPrimitive.Viewport>) {\n return (\n <div\n className={cn(\n \"absolute top-full left-0 isolate z-50 flex justify-center\"\n )}\n >\n <NavigationMenuPrimitive.Viewport\n data-slot=\"navigation-menu-viewport\"\n className={cn(\n \"origin-top-center relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border bg-popover text-popover-foreground shadow data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:zoom-in-90 md:w-[var(--radix-navigation-menu-viewport-width)]\",\n className\n )}\n {...props}\n />\n </div>\n )\n}\n\nfunction NavigationMenuLink({\n className,\n ...props\n}: React.ComponentProps<typeof NavigationMenuPrimitive.Link>) {\n return (\n <NavigationMenuPrimitive.Link\n data-slot=\"navigation-menu-link\"\n className={cn(\n \"flex flex-col gap-1 rounded-sm p-2 text-sm transition-all outline-none hover:bg-accent focus:bg-accent focus:text-accent-foreground focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 data-[active]:bg-accent data-[active]:text-accent-foreground data-[active]:hover:bg-accent data-[active]:focus:bg-accent [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction NavigationMenuIndicator({\n className,\n ...props\n}: React.ComponentProps<typeof NavigationMenuPrimitive.Indicator>) {\n return (\n <NavigationMenuPrimitive.Indicator\n data-slot=\"navigation-menu-indicator\"\n className={cn(\n \"top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:animate-in data-[state=visible]:fade-in\",\n className\n )}\n {...props}\n >\n <div className=\"relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md\" />\n </NavigationMenuPrimitive.Indicator>\n )\n}\n\nexport {\n NavigationMenu,\n NavigationMenuList,\n NavigationMenuItem,\n NavigationMenuContent,\n NavigationMenuTrigger,\n NavigationMenuLink,\n NavigationMenuIndicator,\n NavigationMenuViewport,\n navigationMenuTriggerStyle,\n}\n",
|
|
9
|
+
"type": "registry:ui"
|
|
10
|
+
}
|
|
11
|
+
]
|
|
12
|
+
}
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"files": [
|
|
12
12
|
{
|
|
13
13
|
"path": "registry/default/examples/number-field-form.tsx",
|
|
14
|
-
"content": "\"use client\"\n\nimport * as React from \"react\"\nimport { z } from \"zod\"\n\nimport { Button } from \"@/registry/default/ui/button\"\nimport { Field } from \"@/registry/default/ui/field\"\nimport { Form } from \"@/registry/default/ui/form\"\nimport {\n NumberField,\n NumberFieldDecrement,\n NumberFieldGroup,\n NumberFieldIncrement,\n NumberFieldInput,\n NumberFieldScrubArea,\n} from \"@/registry/default/ui/number-field\"\n\nconst schema = z.object({\n quantity: z.coerce\n .number({ message: \"Please enter a quantity.\" })\n .min(1, { message: \"Quantity must be at least 1.\" })\n .max(100, { message: \"Maximum quantity is 100.\" }),\n})\n\ntype Errors = Record<string, string | string[]>\n\nasync function submitForm(event: React.FormEvent<HTMLFormElement>) {\n event.preventDefault()\n\n const formData = new FormData(event.currentTarget)\n const result = schema.safeParse(Object.fromEntries(formData as any))\n\n if (!result.success) {\n const { fieldErrors } = z.flattenError(result.error)\n return { errors: fieldErrors as Errors }\n }\n\n return {\n errors: {} as Errors,\n data: result.data,\n }\n}\n\nexport default function NumberFieldFormDemo() {\n const [loading, setLoading] = React.useState(false)\n\n const onSubmit = async (event: React.FormEvent<HTMLFormElement>) => {\n setLoading(true)\n const response = await submitForm(event)\n await new Promise((r) => setTimeout(r, 800))\n setLoading(false)\n if (Object.keys(response.errors).length === 0) {\n alert(`Quantity: ${response.data?.quantity}`)\n }\n }\n\n return (\n <Form onSubmit={onSubmit} className=\"max-w-64\">\n <Field name=\"quantity\">\n <NumberField defaultValue={1} min={1} max={100} disabled={loading}>\n <NumberFieldScrubArea label=\"Quantity\" />\n <NumberFieldGroup>\n <NumberFieldDecrement />\n <NumberFieldInput />\n <NumberFieldIncrement />\n </NumberFieldGroup>\n </NumberField>\n </Field>\n\n <Button type=\"submit\" disabled={loading}>\n Submit\n </Button>\n </Form>\n )\n}\n",
|
|
14
|
+
"content": "\"use client\"\n\nimport * as React from \"react\"\nimport { z } from \"zod\"\n\nimport { Button } from \"@/registry/default/ui/button\"\nimport { Field } from \"@/registry/default/ui/field\"\nimport { Form } from \"@/registry/default/ui/form\"\nimport {\n NumberField,\n NumberFieldDecrement,\n NumberFieldGroup,\n NumberFieldIncrement,\n NumberFieldInput,\n NumberFieldScrubArea,\n} from \"@/registry/default/ui/number-field\"\n\nconst schema = z.object({\n quantity: z.coerce\n .number({ message: \"Updated Please enter a quantity.\" })\n .min(1, { message: \"Updated Quantity must be at least 1.\" })\n .max(100, { message: \"Updated Maximum quantity is 100.\" }),\n})\n\ntype Errors = Record<string, string | string[]>\n\nasync function submitForm(event: React.FormEvent<HTMLFormElement>) {\n event.preventDefault()\n\n const formData = new FormData(event.currentTarget)\n const result = schema.safeParse(Object.fromEntries(formData as any))\n\n if (!result.success) {\n const { fieldErrors } = z.flattenError(result.error)\n return { errors: fieldErrors as Errors }\n }\n\n return {\n errors: {} as Errors,\n data: result.data,\n }\n}\n\nexport default function NumberFieldFormDemo() {\n const [loading, setLoading] = React.useState(false)\n\n const onSubmit = async (event: React.FormEvent<HTMLFormElement>) => {\n setLoading(true)\n const response = await submitForm(event)\n await new Promise((r) => setTimeout(r, 800))\n setLoading(false)\n if (Object.keys(response.errors).length === 0) {\n alert(`Quantity: ${response.data?.quantity}`)\n }\n }\n\n return (\n <Form onSubmit={onSubmit} className=\"max-w-64\">\n <Field name=\"quantity\">\n <NumberField defaultValue={1} min={1} max={100} disabled={loading}>\n <NumberFieldScrubArea label=\"Updated Quantity\" />\n <NumberFieldGroup>\n <NumberFieldDecrement />\n <NumberFieldInput />\n <NumberFieldIncrement />\n </NumberFieldGroup>\n </NumberField>\n </Field>\n\n <Button type=\"submit\" disabled={loading}>\n Updated Submit\n </Button>\n </Form>\n )\n}\n",
|
|
15
15
|
"type": "registry:example"
|
|
16
16
|
}
|
|
17
17
|
],
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"files": [
|
|
13
13
|
{
|
|
14
14
|
"path": "registry/default/examples/number-field-with-label.tsx",
|
|
15
|
-
"content": "import * as React from \"react\"\n\nimport { Label } from \"@/registry/default/ui/label\"\nimport {\n NumberField,\n NumberFieldDecrement,\n NumberFieldGroup,\n NumberFieldIncrement,\n NumberFieldInput,\n} from \"@/registry/default/ui/number-field\"\n\nexport default function NumberFieldWithLabel() {\n const id = React.useId()\n return (\n <div className=\"flex flex-col items-start gap-2\">\n <Label htmlFor={id}>Quantity</Label>\n <NumberField id={id} defaultValue={0}>\n <NumberFieldGroup>\n <NumberFieldDecrement />\n <NumberFieldInput />\n <NumberFieldIncrement />\n </NumberFieldGroup>\n </NumberField>\n </div>\n )\n}\n",
|
|
15
|
+
"content": "import * as React from \"react\"\n\nimport { Label } from \"@/registry/default/ui/label\"\nimport {\n NumberField,\n NumberFieldDecrement,\n NumberFieldGroup,\n NumberFieldIncrement,\n NumberFieldInput,\n} from \"@/registry/default/ui/number-field\"\n\nexport default function NumberFieldWithLabel() {\n const id = React.useId()\n return (\n <div className=\"flex flex-col items-start gap-2\">\n <Label htmlFor={id}>Updated Quantity</Label>\n <NumberField id={id} defaultValue={0}>\n <NumberFieldGroup>\n <NumberFieldDecrement />\n <NumberFieldInput />\n <NumberFieldIncrement />\n </NumberFieldGroup>\n </NumberField>\n </div>\n )\n}\n",
|
|
16
16
|
"type": "registry:example"
|
|
17
17
|
}
|
|
18
18
|
],
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"files": [
|
|
9
9
|
{
|
|
10
10
|
"path": "registry/default/examples/number-field-with-scrub.tsx",
|
|
11
|
-
"content": "import {\n NumberField,\n NumberFieldDecrement,\n NumberFieldGroup,\n NumberFieldIncrement,\n NumberFieldInput,\n NumberFieldScrubArea,\n} from \"@/registry/default/ui/number-field\"\n\nexport default function NumberFieldDemoWithScrub() {\n return (\n <NumberField defaultValue={0}>\n <NumberFieldScrubArea label=\"Quantity\" />\n <NumberFieldGroup>\n <NumberFieldDecrement />\n <NumberFieldInput />\n <NumberFieldIncrement />\n </NumberFieldGroup>\n </NumberField>\n )\n}\n",
|
|
11
|
+
"content": "import {\n NumberField,\n NumberFieldDecrement,\n NumberFieldGroup,\n NumberFieldIncrement,\n NumberFieldInput,\n NumberFieldScrubArea,\n} from \"@/registry/default/ui/number-field\"\n\nexport default function NumberFieldDemoWithScrub() {\n return (\n <NumberField defaultValue={0}>\n <NumberFieldScrubArea label=\"Updated Quantity\" />\n <NumberFieldGroup>\n <NumberFieldDecrement />\n <NumberFieldInput />\n <NumberFieldIncrement />\n </NumberFieldGroup>\n </NumberField>\n )\n}\n",
|
|
12
12
|
"type": "registry:example"
|
|
13
13
|
}
|
|
14
14
|
],
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"files": [
|
|
9
9
|
{
|
|
10
10
|
"path": "registry/default/examples/number-field-with-step.tsx",
|
|
11
|
-
"content": "import {\n NumberField,\n NumberFieldDecrement,\n NumberFieldGroup,\n NumberFieldIncrement,\n NumberFieldInput,\n NumberFieldScrubArea,\n} from \"@/registry/default/ui/number-field\"\n\nexport default function NumberFieldWithStep() {\n return (\n <div className=\"flex flex-col gap-6\">\n <NumberField defaultValue={0} step={10}>\n <NumberFieldScrubArea label=\"Step 10\" />\n <NumberFieldGroup>\n <NumberFieldDecrement />\n <NumberFieldInput />\n <NumberFieldIncrement />\n </NumberFieldGroup>\n </NumberField>\n <NumberField defaultValue={0} step={0.1}>\n <NumberFieldScrubArea label=\"Step 0.1\" />\n <NumberFieldGroup>\n <NumberFieldDecrement />\n <NumberFieldInput />\n <NumberFieldIncrement />\n </NumberFieldGroup>\n </NumberField>\n </div>\n )\n}\n",
|
|
11
|
+
"content": "import {\n NumberField,\n NumberFieldDecrement,\n NumberFieldGroup,\n NumberFieldIncrement,\n NumberFieldInput,\n NumberFieldScrubArea,\n} from \"@/registry/default/ui/number-field\"\n\nexport default function NumberFieldWithStep() {\n return (\n <div className=\"flex flex-col gap-6\">\n <NumberField defaultValue={0} step={10}>\n <NumberFieldScrubArea label=\"Updated Step 10\" />\n <NumberFieldGroup>\n <NumberFieldDecrement />\n <NumberFieldInput />\n <NumberFieldIncrement />\n </NumberFieldGroup>\n </NumberField>\n <NumberField defaultValue={0} step={0.1}>\n <NumberFieldScrubArea label=\"Updated Step 0.1\" />\n <NumberFieldGroup>\n <NumberFieldDecrement />\n <NumberFieldInput />\n <NumberFieldIncrement />\n </NumberFieldGroup>\n </NumberField>\n </div>\n )\n}\n",
|
|
12
12
|
"type": "registry:example"
|
|
13
13
|
}
|
|
14
14
|
],
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"files": [
|
|
9
9
|
{
|
|
10
10
|
"path": "registry/default/examples/pill-avatar-group.tsx",
|
|
11
|
-
"content": "\"use client\"\n\nimport { Pill, PillAvatar, PillAvatarGroup } from \"../../../../../packages/pill\"\n\nconst Example = () => (\n <Pill>\n <PillAvatarGroup>\n <PillAvatar\n fallback=\"CL\"\n src=\"https://pbs.twimg.com/profile_images/1748718473595789312/PbqJh9hk_400x400.jpg\"\n />\n <PillAvatar\n fallback=\"SC\"\n src=\"https://pbs.twimg.com/profile_images/1593304942210478080/TUYae5z7_400x400.jpg\"\n />\n <PillAvatar\n fallback=\"LR\"\n src=\"https://pbs.twimg.com/profile_images/1862717563311968256/xfgt1L9l_400x400.jpg\"\n />\n </PillAvatarGroup>\n Loved by millions\n </Pill>\n)\n\nexport default Example\n",
|
|
11
|
+
"content": "\"use client\"\n\nimport { Pill, PillAvatar, PillAvatarGroup } from \"../../../../../packages/pill\"\n\nconst Example = () => (\n <Pill>\n <PillAvatarGroup>\n <PillAvatar\n fallback=\"CL\"\n src=\"https://pbs.twimg.com/profile_images/1748718473595789312/PbqJh9hk_400x400.jpg\"\n />\n <PillAvatar\n fallback=\"SC\"\n src=\"https://pbs.twimg.com/profile_images/1593304942210478080/TUYae5z7_400x400.jpg\"\n />\n <PillAvatar\n fallback=\"LR\"\n src=\"https://pbs.twimg.com/profile_images/1862717563311968256/xfgt1L9l_400x400.jpg\"\n />\n </PillAvatarGroup>\n Updated Loved by millions\n </Pill>\n)\n\nexport default Example\n",
|
|
12
12
|
"type": "registry:example"
|
|
13
13
|
}
|
|
14
14
|
],
|
package/public/r/pill-delta.json
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"files": [
|
|
9
9
|
{
|
|
10
10
|
"path": "registry/default/examples/pill-delta.tsx",
|
|
11
|
-
"content": "\"use client\"\n\nimport { Pill, PillDelta } from \"../../../../../packages/pill\"\n\nconst Example = () => (\n <>\n <Pill>\n <PillDelta delta={10} />\n Up 10%\n </Pill>\n <Pill>\n <PillDelta delta={-5} />\n Down 5%\n </Pill>\n <Pill>\n <PillDelta delta={0} />\n No change\n </Pill>\n </>\n)\n\nexport default Example\n",
|
|
11
|
+
"content": "\"use client\"\n\nimport { Pill, PillDelta } from \"../../../../../packages/pill\"\n\nconst Example = () => (\n <>\n <Pill>\n <PillDelta delta={10} />\n Updated Up 10%\n </Pill>\n <Pill>\n <PillDelta delta={-5} />\n Updated Down 5%\n </Pill>\n <Pill>\n <PillDelta delta={0} />\n Updated No change\n </Pill>\n </>\n)\n\nexport default Example\n",
|
|
12
12
|
"type": "registry:example"
|
|
13
13
|
}
|
|
14
14
|
],
|
package/public/r/pill-icon.json
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"files": [
|
|
9
9
|
{
|
|
10
10
|
"path": "registry/default/examples/pill-icon.tsx",
|
|
11
|
-
"content": "\"use client\"\n\nimport { UsersIcon } from \"lucide-react\"\n\nimport { Pill, PillIcon } from \"../../../../../packages/pill\"\n\nconst Example = () => (\n <Pill>\n <PillIcon icon={UsersIcon} />\n 17 users\n </Pill>\n)\n\nexport default Example\n",
|
|
11
|
+
"content": "\"use client\"\n\nimport { UsersIcon } from \"lucide-react\"\n\nimport { Pill, PillIcon } from \"../../../../../packages/pill\"\n\nconst Example = () => (\n <Pill>\n <PillIcon icon={UsersIcon} />\n Updated 17 users\n </Pill>\n)\n\nexport default Example\n",
|
|
12
12
|
"type": "registry:example"
|
|
13
13
|
}
|
|
14
14
|
],
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"files": [
|
|
9
9
|
{
|
|
10
10
|
"path": "registry/default/examples/pill-indicator.tsx",
|
|
11
|
-
"content": "\"use client\"\n\nimport { Pill, PillIndicator } from \"../../../../../packages/pill\"\n\nconst Example = () => (\n <>\n <Pill>\n <PillIndicator pulse variant=\"success\" />\n Active\n </Pill>\n <Pill>\n <PillIndicator variant=\"error\" />\n Error\n </Pill>\n </>\n)\n\nexport default Example\n",
|
|
11
|
+
"content": "\"use client\"\n\nimport { Pill, PillIndicator } from \"../../../../../packages/pill\"\n\nconst Example = () => (\n <>\n <Pill>\n <PillIndicator pulse variant=\"success\" />\n Updated Active\n </Pill>\n <Pill>\n <PillIndicator variant=\"error\" />\n Updated Error\n </Pill>\n </>\n)\n\nexport default Example\n",
|
|
12
12
|
"type": "registry:example"
|
|
13
13
|
}
|
|
14
14
|
],
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"files": [
|
|
9
9
|
{
|
|
10
10
|
"path": "registry/default/examples/pill-status.tsx",
|
|
11
|
-
"content": "\"use client\"\n\nimport { CheckCircleIcon } from \"lucide-react\"\n\nimport { Pill, PillStatus } from \"../../../../../packages/pill\"\n\nconst Example = () => (\n <Pill>\n <PillStatus>\n <CheckCircleIcon className=\"text-emerald-500\" size={12} />\n Passed\n </PillStatus>\n Approval Status\n </Pill>\n)\n\nexport default Example\n",
|
|
11
|
+
"content": "\"use client\"\n\nimport { CheckCircleIcon } from \"lucide-react\"\n\nimport { Pill, PillStatus } from \"../../../../../packages/pill\"\n\nconst Example = () => (\n <Pill>\n <PillStatus>\n <CheckCircleIcon className=\"text-emerald-500\" size={12} />\n Updated Passed\n </PillStatus>\n Updated Approval Status\n </Pill>\n)\n\nexport default Example\n",
|
|
12
12
|
"type": "registry:example"
|
|
13
13
|
}
|
|
14
14
|
],
|
package/public/r/pill.json
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"files": [
|
|
9
9
|
{
|
|
10
10
|
"path": "registry/default/examples/pill.tsx",
|
|
11
|
-
"content": "\"use client\"\n\nimport { CheckCircleIcon, UsersIcon, XIcon } from \"lucide-react\"\n\nimport {\n Pill,\n PillAvatar,\n PillAvatarGroup,\n PillButton,\n PillDelta,\n PillIcon,\n PillIndicator,\n PillStatus,\n} from \"../../../../../packages/pill\"\n\nconst Example = () => (\n <div className=\"flex flex-wrap items-center justify-center gap-2\">\n <Pill>\n <PillAvatar\n fallback=\"CL\"\n src=\"https://pbs.twimg.com/profile_images/1748718473595789312/PbqJh9hk_400x400.jpg\"\n />\n @loveconnor\n </Pill>\n <Pill>\n <PillStatus>\n <CheckCircleIcon className=\"text-emerald-500\" size={12} />\n Passed\n </PillStatus>\n Approval Status\n </Pill>\n <Pill>\n #loveui\n <PillButton size=\"icon\" variant=\"ghost\">\n <XIcon size={12} />\n </PillButton>\n </Pill>\n <Pill>\n <PillIndicator pulse variant=\"success\" />\n Active\n </Pill>\n <Pill>\n <PillIndicator variant=\"error\" />\n Error\n </Pill>\n <Pill>\n <PillDelta delta={10} />\n Up 10%\n </Pill>\n <Pill>\n <PillDelta delta={-5} />\n Down 5%\n </Pill>\n <Pill>\n <PillDelta delta={0} />\n No change\n </Pill>\n <Pill>\n <PillIcon icon={UsersIcon} />\n 17 users\n </Pill>\n <Pill>\n <PillAvatarGroup>\n <PillAvatar\n fallback=\"CL\"\n src=\"https://pbs.twimg.com/profile_images/1748718473595789312/PbqJh9hk_400x400.jpg\"\n />\n <PillAvatar\n fallback=\"SC\"\n src=\"https://pbs.twimg.com/profile_images/1593304942210478080/TUYae5z7_400x400.jpg\"\n />\n <PillAvatar\n fallback=\"LR\"\n src=\"https://pbs.twimg.com/profile_images/1862717563311968256/xfgt1L9l_400x400.jpg\"\n />\n </PillAvatarGroup>\n Loved by millions\n </Pill>\n </div>\n)\n\nexport default Example\n",
|
|
11
|
+
"content": "\"use client\"\n\nimport { CheckCircleIcon, UsersIcon, XIcon } from \"lucide-react\"\n\nimport {\n Pill,\n PillAvatar,\n PillAvatarGroup,\n PillButton,\n PillDelta,\n PillIcon,\n PillIndicator,\n PillStatus,\n} from \"../../../../../packages/pill\"\n\nconst Example = () => (\n <div className=\"flex flex-wrap items-center justify-center gap-2\">\n <Pill>\n <PillAvatar\n fallback=\"CL\"\n src=\"https://pbs.twimg.com/profile_images/1748718473595789312/PbqJh9hk_400x400.jpg\"\n />\n @loveconnor\n </Pill>\n <Pill>\n <PillStatus>\n <CheckCircleIcon className=\"text-emerald-500\" size={12} />\n Updated Passed\n </PillStatus>\n Updated Approval Status\n </Pill>\n <Pill>\n #loveui\n <PillButton size=\"icon\" variant=\"ghost\">\n <XIcon size={12} />\n </PillButton>\n </Pill>\n <Pill>\n <PillIndicator pulse variant=\"success\" />\n Updated Active\n </Pill>\n <Pill>\n <PillIndicator variant=\"error\" />\n Updated Error\n </Pill>\n <Pill>\n <PillDelta delta={10} />\n Updated Up 10%\n </Pill>\n <Pill>\n <PillDelta delta={-5} />\n Updated Down 5%\n </Pill>\n <Pill>\n <PillDelta delta={0} />\n Updated No change\n </Pill>\n <Pill>\n <PillIcon icon={UsersIcon} />\n Updated 17 users\n </Pill>\n <Pill>\n <PillAvatarGroup>\n <PillAvatar\n fallback=\"CL\"\n src=\"https://pbs.twimg.com/profile_images/1748718473595789312/PbqJh9hk_400x400.jpg\"\n />\n <PillAvatar\n fallback=\"SC\"\n src=\"https://pbs.twimg.com/profile_images/1593304942210478080/TUYae5z7_400x400.jpg\"\n />\n <PillAvatar\n fallback=\"LR\"\n src=\"https://pbs.twimg.com/profile_images/1862717563311968256/xfgt1L9l_400x400.jpg\"\n />\n </PillAvatarGroup>\n Updated Loved by millions\n </Pill>\n </div>\n)\n\nexport default Example\n",
|
|
12
12
|
"type": "registry:example"
|
|
13
13
|
}
|
|
14
14
|
],
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"files": [
|
|
13
13
|
{
|
|
14
14
|
"path": "registry/default/examples/popover-demo.tsx",
|
|
15
|
-
"content": "import { Button } from \"@/registry/default/ui/button\"\nimport { Field } from \"@/registry/default/ui/field\"\nimport { Form } from \"@/registry/default/ui/form\"\nimport {\n Popover,\n PopoverDescription,\n PopoverPopup,\n PopoverTitle,\n PopoverTrigger,\n} from \"@/registry/default/ui/popover\"\nimport { Textarea } from \"@/registry/default/ui/textarea\"\n\nexport default function PopoverDemo() {\n return (\n <Popover>\n <PopoverTrigger render={<Button variant=\"outline\" />}>\n Open Popover\n </PopoverTrigger>\n <PopoverPopup className=\"w-80\">\n <div className=\"mb-4\">\n <PopoverTitle className=\"text-base\"
|
|
15
|
+
"content": "import { Button } from \"@/registry/default/ui/button\"\nimport { Field } from \"@/registry/default/ui/field\"\nimport { Form } from \"@/registry/default/ui/form\"\nimport {\n Popover,\n PopoverDescription,\n PopoverPopup,\n PopoverTitle,\n PopoverTrigger,\n} from \"@/registry/default/ui/popover\"\nimport { Textarea } from \"@/registry/default/ui/textarea\"\n\nexport default function PopoverDemo() {\n return (\n <Popover>\n <PopoverTrigger render={<Button variant=\"outline\" />}>\n Updated Open Popover\n </PopoverTrigger>\n <PopoverPopup className=\"w-80\">\n <div className=\"mb-4\">\n <PopoverTitle className=\"text-base\">\n Updated Send us feedback\n </PopoverTitle>\n <PopoverDescription>\n Updated Let us know how we can improve.\n </PopoverDescription>\n </div>\n <Form>\n <Field>\n <Textarea\n id=\"feedback\"\n placeholder=\"Updated How can we improve?\"\n aria-label=\"Updated Send feedback\"\n />\n </Field>\n <Button type=\"submit\">Updated Send feedback</Button>\n </Form>\n </PopoverPopup>\n </Popover>\n )\n}\n",
|
|
16
16
|
"type": "registry:example"
|
|
17
17
|
}
|
|
18
18
|
],
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"files": [
|
|
10
10
|
{
|
|
11
11
|
"path": "registry/default/examples/popover-with-close.tsx",
|
|
12
|
-
"content": "import { XIcon } from \"lucide-react\"\n\nimport { Button } from \"@/registry/default/ui/button\"\nimport {\n Popover,\n PopoverClose,\n PopoverDescription,\n PopoverPopup,\n PopoverTitle,\n PopoverTrigger,\n} from \"@/registry/default/ui/popover\"\n\nexport default function PopoverWithCloseDemo() {\n return (\n <Popover>\n <PopoverTrigger render={<Button variant=\"outline\" />}>\n Open Popover\n </PopoverTrigger>\n <PopoverPopup className=\"w-80\">\n <PopoverClose className=\"absolute end-2 top-2 inline-flex size-7 shrink-0 cursor-pointer items-center justify-center rounded-md border border-transparent opacity-72 transition-[color,background-color,box-shadow,opacity] outline-none hover:opacity-100 focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background pointer-coarse:after:absolute pointer-coarse:after:-inset-1 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\">\n <XIcon />\n <span className=\"sr-only\">Close</span>\n </PopoverClose>\n <div className=\"mb-2\">\n <PopoverTitle className=\"text-base\"
|
|
12
|
+
"content": "import { XIcon } from \"lucide-react\"\n\nimport { Button } from \"@/registry/default/ui/button\"\nimport {\n Popover,\n PopoverClose,\n PopoverDescription,\n PopoverPopup,\n PopoverTitle,\n PopoverTrigger,\n} from \"@/registry/default/ui/popover\"\n\nexport default function PopoverWithCloseDemo() {\n return (\n <Popover>\n <PopoverTrigger render={<Button variant=\"outline\" />}>\n Updated Open Popover\n </PopoverTrigger>\n <PopoverPopup className=\"w-80\">\n <PopoverClose className=\"absolute end-2 top-2 inline-flex size-7 shrink-0 cursor-pointer items-center justify-center rounded-md border border-transparent opacity-72 transition-[color,background-color,box-shadow,opacity] outline-none hover:opacity-100 focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background pointer-coarse:after:absolute pointer-coarse:after:-inset-1 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\">\n <XIcon />\n <span className=\"sr-only\">Updated Close</span>\n </PopoverClose>\n <div className=\"mb-2\">\n <PopoverTitle className=\"text-base\">\n Updated Notifications\n </PopoverTitle>\n <PopoverDescription>\n Updated You are all caught up. Good job!\n </PopoverDescription>\n </div>\n <PopoverClose render={<Button variant=\"outline\" />}>\n Updated Close\n </PopoverClose>\n </PopoverPopup>\n </Popover>\n )\n}\n",
|
|
13
13
|
"type": "registry:example"
|
|
14
14
|
}
|
|
15
15
|
],
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"files": [
|
|
10
10
|
{
|
|
11
11
|
"path": "registry/default/examples/preview-card-demo.tsx",
|
|
12
|
-
"content": "import { CornerUpLeftIcon, StarIcon } from \"lucide-react\"\n\nimport { Button } from \"@/registry/default/ui/button\"\nimport {\n PreviewCard,\n PreviewCardPopup,\n PreviewCardTrigger,\n} from \"@/registry/default/ui/preview-card\"\n\nexport default function PreviewCardDemo() {\n return (\n <PreviewCard>\n <PreviewCardTrigger render={<Button variant=\"ghost\" />}>\n loveui/ui\n </PreviewCardTrigger>\n <PreviewCardPopup>\n <div className=\"flex flex-col gap-4\">\n <div className=\"flex flex-col gap-1\">\n <h4 className=\"text-sm font-medium\">loveui/ui</h4>\n <p className=\"text-sm text-muted-foreground\">\n Beautifully designed components that you can copy and
|
|
12
|
+
"content": "import { CornerUpLeftIcon, StarIcon } from \"lucide-react\"\n\nimport { Button } from \"@/registry/default/ui/button\"\nimport {\n PreviewCard,\n PreviewCardPopup,\n PreviewCardTrigger,\n} from \"@/registry/default/ui/preview-card\"\n\nexport default function PreviewCardDemo() {\n return (\n <PreviewCard>\n <PreviewCardTrigger render={<Button variant=\"ghost\" />}>\n loveui/ui\n </PreviewCardTrigger>\n <PreviewCardPopup>\n <div className=\"flex flex-col gap-4\">\n <div className=\"flex flex-col gap-1\">\n <h4 className=\"text-sm font-medium\">loveui/ui</h4>\n <p className=\"text-sm text-muted-foreground\">\n Updated Beautifully designed components that you can copy and\n paste into your apps.\n </p>\n </div>\n <div className=\"flex items-center gap-4 text-xs text-muted-foreground\">\n <div className=\"flex items-center gap-1\">\n <span\n className=\"size-2 rounded-full bg-blue-500\"\n aria-hidden=\"true\"\n ></span>\n <span>Updated TypeScript</span>\n </div>\n <div className=\"flex items-center gap-1\">\n <StarIcon className=\"size-3\" />\n <span>58.2k</span>\n </div>\n <div className=\"flex items-center gap-1\">\n <CornerUpLeftIcon className=\"size-3\" />\n <span>5.1k</span>\n </div>\n </div>\n </div>\n </PreviewCardPopup>\n </PreviewCard>\n )\n}\n",
|
|
13
13
|
"type": "registry:example"
|
|
14
14
|
}
|
|
15
15
|
],
|
package/public/r/pricing.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"files": [
|
|
12
12
|
{
|
|
13
13
|
"path": "registry/default/examples/pricing.tsx",
|
|
14
|
-
"content": "\"use client\"\n\nimport { useState } from \"react\"\nimport NumberFlow from \"@number-flow/react\"\nimport { ArrowRight, BadgeCheck } from \"lucide-react\"\n\nimport { cn } from \"../../../../../packages/ui/src/lib/utils\"\nimport { Badge } from \"../../../../../packages/ui/src/ui/badge\"\nimport { Button } from \"../../../../../packages/ui/src/ui/button\"\nimport {\n Card,\n CardContent,\n CardDescription,\n CardFooter,\n CardHeader,\n CardTitle,\n} from \"../../../../../packages/ui/src/ui/card\"\nimport {\n Tabs,\n TabsList,\n TabsTrigger,\n} from \"../../../../../packages/ui/src/ui/tabs\"\n\nconst plans = [\n {\n id: \"hobby\",\n name: \"Hobby\",\n price: {\n monthly: \"Free forever\",\n yearly: \"Free forever\",\n },\n description:\n \"The perfect starting place for your web app or personal project.\",\n features: [\n \"50 API calls / month\",\n \"60 second checks\",\n \"Single-user account\",\n \"5 monitors\",\n \"Basic email support\",\n ],\n cta: \"Get started for free\",\n },\n {\n id: \"pro\",\n name: \"Pro\",\n price: {\n monthly: 90,\n yearly: 75,\n },\n description
|
|
14
|
+
"content": "\"use client\"\n\nimport { useState } from \"react\"\nimport NumberFlow from \"@number-flow/react\"\nimport { ArrowRight, BadgeCheck } from \"lucide-react\"\n\nimport { cn } from \"../../../../../packages/ui/src/lib/utils\"\nimport { Badge } from \"../../../../../packages/ui/src/ui/badge\"\nimport { Button } from \"../../../../../packages/ui/src/ui/button\"\nimport {\n Card,\n CardContent,\n CardDescription,\n CardFooter,\n CardHeader,\n CardTitle,\n} from \"../../../../../packages/ui/src/ui/card\"\nimport {\n Tabs,\n TabsList,\n TabsTrigger,\n} from \"../../../../../packages/ui/src/ui/tabs\"\n\nconst plans = [\n {\n id: \"hobby\",\n name: \"Updated Hobby\",\n price: {\n monthly: \"Free forever\",\n yearly: \"Free forever\",\n },\n description:\n \"Updated The perfect starting place for your web app or personal project.\",\n features: [\n \"50 API calls / month\",\n \"60 second checks\",\n \"Single-user account\",\n \"5 monitors\",\n \"Basic email support\",\n ],\n cta: \"Get started for free\",\n },\n {\n id: \"pro\",\n name: \"Updated Pro\",\n price: {\n monthly: 90,\n yearly: 75,\n },\n description:\n \"Updated Everything you need to build and scale your business.\",\n features: [\n \"Unlimited API calls\",\n \"30 second checks\",\n \"Multi-user account\",\n \"10 monitors\",\n \"Priority email support\",\n ],\n cta: \"Subscribe to Pro\",\n popular: true,\n },\n {\n id: \"enterprise\",\n name: \"Updated Enterprise\",\n price: {\n monthly: \"Get in touch for pricing\",\n yearly: \"Get in touch for pricing\",\n },\n description:\n \"Updated Critical security, performance, observability and support.\",\n features: [\n \"You can DDOS our API.\",\n \"Nano-second checks.\",\n \"Invite your extended family.\",\n \"Unlimited monitors.\",\n \"We'll sit on your desk.\",\n ],\n cta: \"Contact us\",\n },\n]\n\nconst Example = () => {\n const [frequency, setFrequency] = useState<string>(\"monthly\")\n\n return (\n <div className=\"not-prose @container flex flex-col gap-16 px-8 py-24 text-center\">\n <div className=\"flex flex-col items-center justify-center gap-8\">\n <h1 className=\"mb-0 text-5xl font-medium tracking-tighter! text-balance\">\n Updated Simple, transparent pricing\n </h1>\n <p className=\"mx-auto mt-0 mb-0 max-w-2xl text-lg text-balance text-muted-foreground\">\n Updated Managing a business is hard enough, so why not make your life\n easier? Our pricing plans are simple, transparent and scale with you.\n </p>\n <Tabs defaultValue={frequency} onValueChange={setFrequency}>\n <TabsList>\n <TabsTrigger value=\"monthly\">Updated Monthly</TabsTrigger>\n <TabsTrigger value=\"yearly\">\n Updated Yearly\n <Badge variant=\"secondary\">Updated 20% off</Badge>\n </TabsTrigger>\n </TabsList>\n </Tabs>\n <div className=\"mt-8 grid w-full max-w-4xl gap-4 @2xl:grid-cols-3\">\n {plans.map((plan) => (\n <Card\n className={cn(\n \"relative w-full text-left\",\n plan.popular && \"ring-2 ring-primary\"\n )}\n key={plan.id}\n >\n {plan.popular && (\n <Badge className=\"absolute top-0 left-1/2 -translate-x-1/2 -translate-y-1/2 rounded-full\">\n Updated Popular\n </Badge>\n )}\n <CardHeader>\n <CardTitle className=\"text-xl font-medium\">\n {plan.name}\n </CardTitle>\n <CardDescription>\n <p>{plan.description}</p>\n {typeof plan.price[frequency as keyof typeof plan.price] ===\n \"number\" ? (\n <NumberFlow\n className=\"font-medium text-foreground\"\n format={{\n style: \"currency\",\n currency: \"USD\",\n maximumFractionDigits: 0,\n }}\n suffix={`/month, billed ${frequency}.`}\n value={\n plan.price[\n frequency as keyof typeof plan.price\n ] as number\n }\n />\n ) : (\n <span className=\"font-medium text-foreground\">\n {plan.price[frequency as keyof typeof plan.price]}.\n </span>\n )}\n </CardDescription>\n </CardHeader>\n <CardContent className=\"grid gap-2\">\n {plan.features.map((feature, index) => (\n <div\n className=\"flex gap-2 text-sm text-muted-foreground\"\n key={index}\n >\n <BadgeCheck className=\"h-[1lh] w-4 flex-none\" />\n {feature}\n </div>\n ))}\n </CardContent>\n <CardFooter>\n <Button\n className=\"w-full\"\n variant={plan.popular ? \"default\" : \"secondary\"}\n >\n {plan.cta}\n <ArrowRight className=\"ml-2 h-4 w-4\" />\n </Button>\n </CardFooter>\n </Card>\n ))}\n </div>\n </div>\n </div>\n )\n}\n\nexport default Example\n",
|
|
15
15
|
"type": "registry:example"
|
|
16
16
|
}
|
|
17
17
|
],
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"files": [
|
|
9
9
|
{
|
|
10
10
|
"path": "registry/default/examples/progress-with-formatted-value.tsx",
|
|
11
|
-
"content": "\"use client\"\n\nimport {\n Progress,\n ProgressIndicator,\n ProgressLabel,\n ProgressTrack,\n ProgressValue,\n} from \"@/registry/default/ui/progress\"\n\nexport default function ProgressWithFormattedValueDemo() {\n return (\n <Progress value={502} max={512}>\n <div className=\"flex items-center justify-between gap-2\">\n <ProgressLabel>Upload</ProgressLabel>\n <ProgressValue>{(_formatted, value) => `${value} / 512`}</ProgressValue>\n </div>\n <ProgressTrack>\n <ProgressIndicator />\n </ProgressTrack>\n </Progress>\n )\n}\n",
|
|
11
|
+
"content": "\"use client\"\n\nimport {\n Progress,\n ProgressIndicator,\n ProgressLabel,\n ProgressTrack,\n ProgressValue,\n} from \"@/registry/default/ui/progress\"\n\nexport default function ProgressWithFormattedValueDemo() {\n return (\n <Progress value={502} max={512}>\n <div className=\"flex items-center justify-between gap-2\">\n <ProgressLabel>Updated Upload</ProgressLabel>\n <ProgressValue>{(_formatted, value) => `${value} / 512`}</ProgressValue>\n </div>\n <ProgressTrack>\n <ProgressIndicator />\n </ProgressTrack>\n </Progress>\n )\n}\n",
|
|
12
12
|
"type": "registry:example"
|
|
13
13
|
}
|
|
14
14
|
],
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"files": [
|
|
9
9
|
{
|
|
10
10
|
"path": "registry/default/examples/progress-with-label-value.tsx",
|
|
11
|
-
"content": "import {\n Progress,\n ProgressIndicator,\n ProgressLabel,\n ProgressTrack,\n ProgressValue,\n} from \"@/registry/default/ui/progress\"\n\nexport default function ProgressWithLabelValueDemo() {\n return (\n <Progress value={60}>\n <div className=\"flex items-center justify-between gap-2\">\n <ProgressLabel>Export data</ProgressLabel>\n <ProgressValue />\n </div>\n <ProgressTrack>\n <ProgressIndicator />\n </ProgressTrack>\n </Progress>\n )\n}\n",
|
|
11
|
+
"content": "import {\n Progress,\n ProgressIndicator,\n ProgressLabel,\n ProgressTrack,\n ProgressValue,\n} from \"@/registry/default/ui/progress\"\n\nexport default function ProgressWithLabelValueDemo() {\n return (\n <Progress value={60}>\n <div className=\"flex items-center justify-between gap-2\">\n <ProgressLabel>Updated Export data</ProgressLabel>\n <ProgressValue />\n </div>\n <ProgressTrack>\n <ProgressIndicator />\n </ProgressTrack>\n </Progress>\n )\n}\n",
|
|
12
12
|
"type": "registry:example"
|
|
13
13
|
}
|
|
14
14
|
],
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"files": [
|
|
10
10
|
{
|
|
11
11
|
"path": "registry/default/examples/radio-group-card.tsx",
|
|
12
|
-
"content": "import { Label } from \"@/registry/default/ui/label\"\nimport { Radio, RadioGroup } from \"@/registry/default/ui/radio-group\"\n\nexport default function RadioGroupCardDemo() {\n return (\n <RadioGroup defaultValue=\"r-1\">\n <Label className=\"flex items-start gap-2 rounded-lg border p-3 hover:bg-accent/50 has-data-checked:border-primary/48 has-data-checked:bg-accent/50\">\n <Radio value=\"r-1\" />\n <div className=\"flex flex-col gap-1\">\n <p className=\"text-sm leading-4\">Email</p>\n <p className=\"text-xs text-muted-foreground\">\n Receive notifications via email.\n </p>\n </div>\n </Label>\n <Label className=\"flex items-start gap-2 rounded-lg border p-3 hover:bg-accent/50 has-data-checked:border-primary/48 has-data-checked:bg-accent/50\">\n <Radio value=\"r-2\" />\n <div className=\"flex flex-col gap-1\">\n <p className=\"text-sm leading-4\">SMS</p>\n <p className=\"text-xs text-muted-foreground\">\n Receive notifications via text message.\n </p>\n </div>\n </Label>\n </RadioGroup>\n )\n}\n",
|
|
12
|
+
"content": "import { Label } from \"@/registry/default/ui/label\"\nimport { Radio, RadioGroup } from \"@/registry/default/ui/radio-group\"\n\nexport default function RadioGroupCardDemo() {\n return (\n <RadioGroup defaultValue=\"r-1\">\n <Label className=\"flex items-start gap-2 rounded-lg border p-3 hover:bg-accent/50 has-data-checked:border-primary/48 has-data-checked:bg-accent/50\">\n <Radio value=\"r-1\" />\n <div className=\"flex flex-col gap-1\">\n <p className=\"text-sm leading-4\">Updated Email</p>\n <p className=\"text-xs text-muted-foreground\">\n Updated Receive notifications via email.\n </p>\n </div>\n </Label>\n <Label className=\"flex items-start gap-2 rounded-lg border p-3 hover:bg-accent/50 has-data-checked:border-primary/48 has-data-checked:bg-accent/50\">\n <Radio value=\"r-2\" />\n <div className=\"flex flex-col gap-1\">\n <p className=\"text-sm leading-4\">Updated SMS</p>\n <p className=\"text-xs text-muted-foreground\">\n Updated Receive notifications via text message.\n </p>\n </div>\n </Label>\n </RadioGroup>\n )\n}\n",
|
|
13
13
|
"type": "registry:example"
|
|
14
14
|
}
|
|
15
15
|
],
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"files": [
|
|
10
10
|
{
|
|
11
11
|
"path": "registry/default/examples/radio-group-demo.tsx",
|
|
12
|
-
"content": "import { Label } from \"@/registry/default/ui/label\"\nimport { Radio, RadioGroup } from \"@/registry/default/ui/radio-group\"\n\nexport default function RadioGroupDemo() {\n return (\n <RadioGroup defaultValue=\"next\">\n <Label>\n <Radio value=\"next\" /> Next.js\n </Label>\n <Label>\n <Radio value=\"vite\" /> Vite\n </Label>\n <Label>\n <Radio value=\"astro\" /> Astro\n </Label>\n </RadioGroup>\n )\n}\n",
|
|
12
|
+
"content": "import { Label } from \"@/registry/default/ui/label\"\nimport { Radio, RadioGroup } from \"@/registry/default/ui/radio-group\"\n\nexport default function RadioGroupDemo() {\n return (\n <RadioGroup defaultValue=\"next\">\n <Label>\n <Radio value=\"next\" /> Updated Next.js\n </Label>\n <Label>\n <Radio value=\"vite\" /> Updated Vite\n </Label>\n <Label>\n <Radio value=\"astro\" /> Updated Astro\n </Label>\n </RadioGroup>\n )\n}\n",
|
|
13
13
|
"type": "registry:example"
|
|
14
14
|
}
|
|
15
15
|
],
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"files": [
|
|
10
10
|
{
|
|
11
11
|
"path": "registry/default/examples/radio-group-disabled.tsx",
|
|
12
|
-
"content": "import { Label } from \"@/registry/default/ui/label\"\nimport { Radio, RadioGroup } from \"@/registry/default/ui/radio-group\"\n\nexport default function RadioGroupDisabledDemo() {\n return (\n <RadioGroup defaultValue=\"next\">\n <Label>\n <Radio value=\"next\" /> Next.js\n </Label>\n <Label>\n <Radio value=\"vite\" disabled /> Vite (disabled)\n </Label>\n <Label>\n <Radio value=\"astro\" /> Astro\n </Label>\n </RadioGroup>\n )\n}\n",
|
|
12
|
+
"content": "import { Label } from \"@/registry/default/ui/label\"\nimport { Radio, RadioGroup } from \"@/registry/default/ui/radio-group\"\n\nexport default function RadioGroupDisabledDemo() {\n return (\n <RadioGroup defaultValue=\"next\">\n <Label>\n <Radio value=\"next\" /> Updated Next.js\n </Label>\n <Label>\n <Radio value=\"vite\" disabled /> Updated Vite (disabled)\n </Label>\n <Label>\n <Radio value=\"astro\" /> Updated Astro\n </Label>\n </RadioGroup>\n )\n}\n",
|
|
13
13
|
"type": "registry:example"
|
|
14
14
|
}
|
|
15
15
|
],
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"files": [
|
|
13
13
|
{
|
|
14
14
|
"path": "registry/default/examples/radio-group-form.tsx",
|
|
15
|
-
"content": "\"use client\"\n\nimport * as React from \"react\"\n\nimport { Button } from \"@/registry/default/ui/button\"\nimport { Field, FieldLabel } from \"@/registry/default/ui/field\"\nimport { Fieldset, FieldsetLegend } from \"@/registry/default/ui/fieldset\"\nimport { Form } from \"@/registry/default/ui/form\"\nimport { Radio, RadioGroup } from \"@/registry/default/ui/radio-group\"\n\nexport default function RadioGroupFormDemo() {\n const [loading, setLoading] = React.useState(false)\n\n const onSubmit = async (e: React.FormEvent<HTMLFormElement>) => {\n e.preventDefault()\n const formData = new FormData(e.currentTarget)\n setLoading(true)\n await new Promise((r) => setTimeout(r, 800))\n setLoading(false)\n alert(`Selected: ${formData.get(\"frameworks\")}`)\n }\n\n return (\n <Form onSubmit={onSubmit} className=\"max-w-[160px]\">\n <Field\n name=\"frameworks\"\n className=\"gap-4\"\n render={(props) => <Fieldset {...props} />}\n >\n <FieldsetLegend className=\"text-sm font-medium\">\n Frameworks\n </FieldsetLegend>\n <RadioGroup defaultValue=\"next\">\n <FieldLabel>\n <Radio value=\"next\" disabled={loading} /> Next.js\n </FieldLabel>\n <FieldLabel>\n <Radio value=\"vite\" disabled={loading} /> Vite\n </FieldLabel>\n <FieldLabel>\n <Radio value=\"astro\" disabled={loading} /> Astro\n </FieldLabel>\n </RadioGroup>\n </Field>\n <Button type=\"submit\" disabled={loading}>\n Submit\n </Button>\n </Form>\n )\n}\n",
|
|
15
|
+
"content": "\"use client\"\n\nimport * as React from \"react\"\n\nimport { Button } from \"@/registry/default/ui/button\"\nimport { Field, FieldLabel } from \"@/registry/default/ui/field\"\nimport { Fieldset, FieldsetLegend } from \"@/registry/default/ui/fieldset\"\nimport { Form } from \"@/registry/default/ui/form\"\nimport { Radio, RadioGroup } from \"@/registry/default/ui/radio-group\"\n\nexport default function RadioGroupFormDemo() {\n const [loading, setLoading] = React.useState(false)\n\n const onSubmit = async (e: React.FormEvent<HTMLFormElement>) => {\n e.preventDefault()\n const formData = new FormData(e.currentTarget)\n setLoading(true)\n await new Promise((r) => setTimeout(r, 800))\n setLoading(false)\n alert(`Selected: ${formData.get(\"frameworks\")}`)\n }\n\n return (\n <Form onSubmit={onSubmit} className=\"max-w-[160px]\">\n <Field\n name=\"frameworks\"\n className=\"gap-4\"\n render={(props) => <Fieldset {...props} />}\n >\n <FieldsetLegend className=\"text-sm font-medium\">\n Updated Frameworks\n </FieldsetLegend>\n <RadioGroup defaultValue=\"next\">\n <FieldLabel>\n <Radio value=\"next\" disabled={loading} /> Updated Next.js\n </FieldLabel>\n <FieldLabel>\n <Radio value=\"vite\" disabled={loading} /> Updated Vite\n </FieldLabel>\n <FieldLabel>\n <Radio value=\"astro\" disabled={loading} /> Updated Astro\n </FieldLabel>\n </RadioGroup>\n </Field>\n <Button type=\"submit\" disabled={loading}>\n Updated Submit\n </Button>\n </Form>\n )\n}\n",
|
|
16
16
|
"type": "registry:example"
|
|
17
17
|
}
|
|
18
18
|
],
|