@codefast/ui 0.0.40 → 0.0.42
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/{chunk-EVN2IB57.js → chunk-6EAQQBWG.js} +2 -2
- package/dist/chunk-6EAQQBWG.js.map +1 -0
- package/dist/{chunk-YR36SVVG.mjs → chunk-7HJV22OF.mjs} +1 -1
- package/dist/chunk-7HJV22OF.mjs.map +1 -0
- package/dist/{chunk-5WJB3UAO.js → chunk-CERSQE5J.js} +1 -1
- package/dist/chunk-CERSQE5J.js.map +1 -0
- package/dist/{chunk-UPZHCTQV.js → chunk-ELWITZPX.js} +2 -2
- package/dist/chunk-ELWITZPX.js.map +1 -0
- package/dist/{chunk-WLMYX3C7.mjs → chunk-GDMHMSJ2.mjs} +2 -2
- package/dist/chunk-GDMHMSJ2.mjs.map +1 -0
- package/dist/{chunk-UJJZZCAC.js → chunk-HQ4AUOQM.js} +1 -1
- package/dist/{chunk-UJJZZCAC.js.map → chunk-HQ4AUOQM.js.map} +1 -1
- package/dist/{chunk-HLXU3SQI.mjs → chunk-HWEFQSTC.mjs} +1 -1
- package/dist/chunk-HWEFQSTC.mjs.map +1 -0
- package/dist/{chunk-JTAXNFUM.mjs → chunk-HX5YKP4E.mjs} +2 -2
- package/dist/chunk-HX5YKP4E.mjs.map +1 -0
- package/dist/{chunk-PLX35IKX.mjs → chunk-I6QCJDIF.mjs} +1 -1
- package/dist/chunk-I6QCJDIF.mjs.map +1 -0
- package/dist/{chunk-466PAJCA.mjs → chunk-LEUB3C3L.mjs} +1 -1
- package/dist/chunk-LEUB3C3L.mjs.map +1 -0
- package/dist/{chunk-KJ77RPJ4.mjs → chunk-M5UKNISJ.mjs} +2 -2
- package/dist/chunk-M5UKNISJ.mjs.map +1 -0
- package/dist/{chunk-EYERINEJ.js → chunk-MZJL73RI.js} +1 -1
- package/dist/chunk-MZJL73RI.js.map +1 -0
- package/dist/{chunk-JCMRDCFT.js → chunk-NH6X3FON.js} +1 -1
- package/dist/{chunk-JCMRDCFT.js.map → chunk-NH6X3FON.js.map} +1 -1
- package/dist/{chunk-UDNWQQ3I.js → chunk-NSK74YTM.js} +2 -2
- package/dist/chunk-NSK74YTM.js.map +1 -0
- package/dist/{chunk-N6QGG4WS.mjs → chunk-P5AV3QU7.mjs} +2 -2
- package/dist/chunk-P5AV3QU7.mjs.map +1 -0
- package/dist/{chunk-GRQGCS7U.mjs → chunk-PWF46YXQ.mjs} +2 -2
- package/dist/chunk-PWF46YXQ.mjs.map +1 -0
- package/dist/{chunk-ZWGC5M4G.js → chunk-SCJ3W2VO.js} +2 -2
- package/dist/chunk-SCJ3W2VO.js.map +1 -0
- package/dist/{chunk-MSHUAEXI.js → chunk-SCPFGC2X.js} +2 -2
- package/dist/chunk-SCPFGC2X.js.map +1 -0
- package/dist/{chunk-JIHHUXA5.js → chunk-VXPAGNPJ.js} +2 -2
- package/dist/chunk-VXPAGNPJ.js.map +1 -0
- package/dist/{chunk-6B2PU2GG.mjs → chunk-WL65TBKJ.mjs} +2 -2
- package/dist/chunk-WL65TBKJ.mjs.map +1 -0
- package/dist/{chunk-4TJBMO2Y.mjs → chunk-WYYOCZNI.mjs} +2 -2
- package/dist/chunk-WYYOCZNI.mjs.map +1 -0
- package/dist/{chunk-FEE6PNWV.js → chunk-XM4Y2S5E.js} +2 -2
- package/dist/chunk-XM4Y2S5E.js.map +1 -0
- package/dist/{chunk-7PJR4WFR.mjs → chunk-ZEYIBYZP.mjs} +2 -2
- package/dist/chunk-ZEYIBYZP.mjs.map +1 -0
- package/dist/{chunk-AEWLL6A2.js → chunk-ZTEJNUH6.js} +2 -2
- package/dist/chunk-ZTEJNUH6.js.map +1 -0
- package/dist/lib/utils.js +1 -1
- package/dist/lib/utils.mjs +1 -1
- package/dist/plugin/animate.plugin.js +1 -1
- package/dist/plugin/animate.plugin.mjs +1 -1
- package/dist/plugin/base.plugin.js +1 -1
- package/dist/plugin/base.plugin.mjs +1 -1
- package/dist/plugin/perspective.plugin.js +1 -1
- package/dist/plugin/perspective.plugin.mjs +1 -1
- package/dist/react/accordion.js +1 -1
- package/dist/react/accordion.js.map +1 -1
- package/dist/react/accordion.mjs +1 -1
- package/dist/react/accordion.mjs.map +1 -1
- package/dist/react/alert-dialog.js +1 -1
- package/dist/react/alert-dialog.js.map +1 -1
- package/dist/react/alert-dialog.mjs +1 -1
- package/dist/react/alert-dialog.mjs.map +1 -1
- package/dist/react/alert.js +1 -1
- package/dist/react/alert.js.map +1 -1
- package/dist/react/alert.mjs +1 -1
- package/dist/react/alert.mjs.map +1 -1
- package/dist/react/aspect-ratio.js.map +1 -1
- package/dist/react/aspect-ratio.mjs.map +1 -1
- package/dist/react/avatar.js +1 -1
- package/dist/react/avatar.js.map +1 -1
- package/dist/react/avatar.mjs +1 -1
- package/dist/react/avatar.mjs.map +1 -1
- package/dist/react/badge.js +1 -1
- package/dist/react/badge.js.map +1 -1
- package/dist/react/badge.mjs +1 -1
- package/dist/react/badge.mjs.map +1 -1
- package/dist/react/blockquote.js.map +1 -1
- package/dist/react/blockquote.mjs.map +1 -1
- package/dist/react/box.d.mts +2 -2
- package/dist/react/box.d.ts +2 -2
- package/dist/react/box.js.map +1 -1
- package/dist/react/box.mjs.map +1 -1
- package/dist/react/breadcrumb.js +1 -1
- package/dist/react/breadcrumb.js.map +1 -1
- package/dist/react/breadcrumb.mjs +1 -1
- package/dist/react/breadcrumb.mjs.map +1 -1
- package/dist/react/button.js +1 -1
- package/dist/react/button.mjs +1 -1
- package/dist/react/calendar.js +1 -1
- package/dist/react/calendar.js.map +1 -1
- package/dist/react/calendar.mjs +1 -1
- package/dist/react/calendar.mjs.map +1 -1
- package/dist/react/card.js +1 -1
- package/dist/react/card.js.map +1 -1
- package/dist/react/card.mjs +1 -1
- package/dist/react/card.mjs.map +1 -1
- package/dist/react/carousel.d.mts +1 -1
- package/dist/react/carousel.d.ts +1 -1
- package/dist/react/carousel.js +1 -1
- package/dist/react/carousel.js.map +1 -1
- package/dist/react/carousel.mjs +1 -1
- package/dist/react/carousel.mjs.map +1 -1
- package/dist/react/checkbox-cards.js +1 -1
- package/dist/react/checkbox-cards.js.map +1 -1
- package/dist/react/checkbox-cards.mjs +1 -1
- package/dist/react/checkbox-cards.mjs.map +1 -1
- package/dist/react/checkbox-group.js +1 -1
- package/dist/react/checkbox-group.js.map +1 -1
- package/dist/react/checkbox-group.mjs +1 -1
- package/dist/react/checkbox-group.mjs.map +1 -1
- package/dist/react/checkbox-group.primitive.d.mts +8 -8
- package/dist/react/checkbox-group.primitive.d.ts +8 -8
- package/dist/react/checkbox-group.primitive.js +1 -1
- package/dist/react/checkbox-group.primitive.mjs +1 -1
- package/dist/react/checkbox.js +1 -1
- package/dist/react/checkbox.js.map +1 -1
- package/dist/react/checkbox.mjs +1 -1
- package/dist/react/checkbox.mjs.map +1 -1
- package/dist/react/code.js.map +1 -1
- package/dist/react/code.mjs.map +1 -1
- package/dist/react/collapsible.js +1 -1
- package/dist/react/collapsible.js.map +1 -1
- package/dist/react/collapsible.mjs +1 -1
- package/dist/react/collapsible.mjs.map +1 -1
- package/dist/react/command.js +1 -1
- package/dist/react/command.js.map +1 -1
- package/dist/react/command.mjs +1 -1
- package/dist/react/command.mjs.map +1 -1
- package/dist/react/container.js +1 -1
- package/dist/react/container.js.map +1 -1
- package/dist/react/container.mjs +1 -1
- package/dist/react/container.mjs.map +1 -1
- package/dist/react/context-menu.js +1 -1
- package/dist/react/context-menu.js.map +1 -1
- package/dist/react/context-menu.mjs +1 -1
- package/dist/react/context-menu.mjs.map +1 -1
- package/dist/react/data-table.d.mts +1 -1
- package/dist/react/data-table.d.ts +1 -1
- package/dist/react/data-table.js +1 -1
- package/dist/react/data-table.js.map +1 -1
- package/dist/react/data-table.mjs +1 -1
- package/dist/react/data-table.mjs.map +1 -1
- package/dist/react/dialog.js +1 -1
- package/dist/react/dialog.mjs +1 -1
- package/dist/react/drawer.js +1 -1
- package/dist/react/drawer.js.map +1 -1
- package/dist/react/drawer.mjs +1 -1
- package/dist/react/drawer.mjs.map +1 -1
- package/dist/react/dropdown-menu.js +1 -1
- package/dist/react/dropdown-menu.mjs +1 -1
- package/dist/react/em.js.map +1 -1
- package/dist/react/em.mjs.map +1 -1
- package/dist/react/form.js +1 -1
- package/dist/react/form.js.map +1 -1
- package/dist/react/form.mjs +1 -1
- package/dist/react/form.mjs.map +1 -1
- package/dist/react/heading.d.mts +1 -1
- package/dist/react/heading.d.ts +1 -1
- package/dist/react/heading.js.map +1 -1
- package/dist/react/heading.mjs.map +1 -1
- package/dist/react/hover-card.js +1 -1
- package/dist/react/hover-card.js.map +1 -1
- package/dist/react/hover-card.mjs +1 -1
- package/dist/react/hover-card.mjs.map +1 -1
- package/dist/react/input-otp.js +1 -1
- package/dist/react/input-otp.js.map +1 -1
- package/dist/react/input-otp.mjs +1 -1
- package/dist/react/input-otp.mjs.map +1 -1
- package/dist/react/input.js +1 -1
- package/dist/react/input.js.map +1 -1
- package/dist/react/input.mjs +1 -1
- package/dist/react/input.mjs.map +1 -1
- package/dist/react/kbd.js +1 -1
- package/dist/react/kbd.js.map +1 -1
- package/dist/react/kbd.mjs +1 -1
- package/dist/react/kbd.mjs.map +1 -1
- package/dist/react/label.js +1 -1
- package/dist/react/label.mjs +1 -1
- package/dist/react/menubar.js +1 -1
- package/dist/react/menubar.js.map +1 -1
- package/dist/react/menubar.mjs +1 -1
- package/dist/react/menubar.mjs.map +1 -1
- package/dist/react/navigation-menu.js +1 -1
- package/dist/react/navigation-menu.js.map +1 -1
- package/dist/react/navigation-menu.mjs +1 -1
- package/dist/react/navigation-menu.mjs.map +1 -1
- package/dist/react/pagination.d.mts +1 -1
- package/dist/react/pagination.d.ts +1 -1
- package/dist/react/pagination.js +1 -1
- package/dist/react/pagination.js.map +1 -1
- package/dist/react/pagination.mjs +1 -1
- package/dist/react/pagination.mjs.map +1 -1
- package/dist/react/popover.js +1 -1
- package/dist/react/popover.js.map +1 -1
- package/dist/react/popover.mjs +1 -1
- package/dist/react/popover.mjs.map +1 -1
- package/dist/react/pre.js.map +1 -1
- package/dist/react/pre.mjs.map +1 -1
- package/dist/react/progress.js +1 -1
- package/dist/react/progress.js.map +1 -1
- package/dist/react/progress.mjs +1 -1
- package/dist/react/progress.mjs.map +1 -1
- package/dist/react/quote.js.map +1 -1
- package/dist/react/quote.mjs.map +1 -1
- package/dist/react/radio-cards.js +1 -1
- package/dist/react/radio-cards.js.map +1 -1
- package/dist/react/radio-cards.mjs +1 -1
- package/dist/react/radio-cards.mjs.map +1 -1
- package/dist/react/radio-group.js +1 -1
- package/dist/react/radio-group.js.map +1 -1
- package/dist/react/radio-group.mjs +1 -1
- package/dist/react/radio-group.mjs.map +1 -1
- package/dist/react/radio.js +1 -1
- package/dist/react/radio.js.map +1 -1
- package/dist/react/radio.mjs +1 -1
- package/dist/react/radio.mjs.map +1 -1
- package/dist/react/resizable.js +1 -1
- package/dist/react/resizable.js.map +1 -1
- package/dist/react/resizable.mjs +1 -1
- package/dist/react/resizable.mjs.map +1 -1
- package/dist/react/scroll-area.js +1 -1
- package/dist/react/scroll-area.js.map +1 -1
- package/dist/react/scroll-area.mjs +1 -1
- package/dist/react/scroll-area.mjs.map +1 -1
- package/dist/react/section.js.map +1 -1
- package/dist/react/section.mjs.map +1 -1
- package/dist/react/select.js +1 -1
- package/dist/react/select.mjs +1 -1
- package/dist/react/separator.js +1 -1
- package/dist/react/separator.js.map +1 -1
- package/dist/react/separator.mjs +1 -1
- package/dist/react/separator.mjs.map +1 -1
- package/dist/react/sheet.js +1 -1
- package/dist/react/sheet.js.map +1 -1
- package/dist/react/sheet.mjs +1 -1
- package/dist/react/sheet.mjs.map +1 -1
- package/dist/react/skeleton.js +1 -1
- package/dist/react/skeleton.js.map +1 -1
- package/dist/react/skeleton.mjs +1 -1
- package/dist/react/skeleton.mjs.map +1 -1
- package/dist/react/slider.js +1 -1
- package/dist/react/slider.js.map +1 -1
- package/dist/react/slider.mjs +1 -1
- package/dist/react/slider.mjs.map +1 -1
- package/dist/react/sonner.js.map +1 -1
- package/dist/react/sonner.mjs.map +1 -1
- package/dist/react/spinner.js +1 -1
- package/dist/react/spinner.mjs +1 -1
- package/dist/react/strong.js.map +1 -1
- package/dist/react/strong.mjs.map +1 -1
- package/dist/react/switch.js +1 -1
- package/dist/react/switch.js.map +1 -1
- package/dist/react/switch.mjs +1 -1
- package/dist/react/switch.mjs.map +1 -1
- package/dist/react/table.js +1 -1
- package/dist/react/table.js.map +1 -1
- package/dist/react/table.mjs +1 -1
- package/dist/react/table.mjs.map +1 -1
- package/dist/react/tabs.js +1 -1
- package/dist/react/tabs.js.map +1 -1
- package/dist/react/tabs.mjs +1 -1
- package/dist/react/tabs.mjs.map +1 -1
- package/dist/react/text.d.mts +2 -2
- package/dist/react/text.d.ts +2 -2
- package/dist/react/text.js.map +1 -1
- package/dist/react/text.mjs.map +1 -1
- package/dist/react/textarea.js +1 -1
- package/dist/react/textarea.js.map +1 -1
- package/dist/react/textarea.mjs +1 -1
- package/dist/react/textarea.mjs.map +1 -1
- package/dist/react/toggle-group.js +1 -1
- package/dist/react/toggle-group.js.map +1 -1
- package/dist/react/toggle-group.mjs +1 -1
- package/dist/react/toggle-group.mjs.map +1 -1
- package/dist/react/toggle.js +1 -1
- package/dist/react/toggle.mjs +1 -1
- package/dist/react/tooltip.js +1 -1
- package/dist/react/tooltip.js.map +1 -1
- package/dist/react/tooltip.mjs +1 -1
- package/dist/react/tooltip.mjs.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/styles.css.map +1 -1
- package/dist/tailwind.config.js +1 -1
- package/dist/tailwind.config.js.map +1 -1
- package/dist/tailwind.config.mjs +1 -1
- package/dist/tailwind.config.mjs.map +1 -1
- package/package.json +7 -7
- package/plugin/animate.plugin.ts +114 -111
- package/plugin/base.plugin.ts +10 -7
- package/plugin/perspective.plugin.ts +1 -1
- package/src/lib/utils.ts +2 -2
- package/src/react/accordion.tsx +65 -41
- package/src/react/alert-dialog.tsx +130 -62
- package/src/react/alert.tsx +50 -24
- package/src/react/aspect-ratio.tsx +6 -4
- package/src/react/avatar.tsx +47 -19
- package/src/react/badge.tsx +15 -10
- package/src/react/blockquote.tsx +11 -8
- package/src/react/box.tsx +11 -9
- package/src/react/breadcrumb.tsx +62 -29
- package/src/react/button.tsx +47 -31
- package/src/react/calendar.tsx +54 -37
- package/src/react/card.tsx +64 -30
- package/src/react/carousel.tsx +101 -43
- package/src/react/checkbox-cards.tsx +60 -33
- package/src/react/checkbox-group.primitive.tsx +93 -38
- package/src/react/checkbox-group.tsx +57 -34
- package/src/react/checkbox.tsx +24 -20
- package/src/react/code.tsx +9 -7
- package/src/react/collapsible.tsx +33 -23
- package/src/react/command.tsx +140 -75
- package/src/react/container.tsx +12 -8
- package/src/react/context-menu.tsx +228 -150
- package/src/react/data-table.tsx +51 -21
- package/src/react/dialog.tsx +95 -50
- package/src/react/drawer.tsx +96 -49
- package/src/react/dropdown-menu.tsx +199 -131
- package/src/react/em.tsx +9 -7
- package/src/react/form.tsx +96 -61
- package/src/react/heading.tsx +10 -8
- package/src/react/hover-card.tsx +42 -26
- package/src/react/input-otp.tsx +48 -37
- package/src/react/input.tsx +25 -15
- package/src/react/kbd.tsx +21 -19
- package/src/react/label.tsx +16 -14
- package/src/react/menubar.tsx +214 -135
- package/src/react/navigation-menu.tsx +153 -111
- package/src/react/pagination.tsx +59 -26
- package/src/react/popover.tsx +44 -29
- package/src/react/pre.tsx +9 -7
- package/src/react/progress.tsx +26 -19
- package/src/react/quote.tsx +9 -7
- package/src/react/radio-cards.tsx +32 -12
- package/src/react/radio-group.tsx +32 -12
- package/src/react/radio.tsx +24 -20
- package/src/react/resizable.tsx +13 -8
- package/src/react/scroll-area.tsx +56 -34
- package/src/react/section.tsx +9 -7
- package/src/react/select.tsx +167 -114
- package/src/react/separator.tsx +16 -7
- package/src/react/sheet.tsx +84 -34
- package/src/react/skeleton.tsx +8 -3
- package/src/react/slider.tsx +31 -24
- package/src/react/sonner.tsx +12 -10
- package/src/react/spinner.tsx +14 -9
- package/src/react/strong.tsx +9 -7
- package/src/react/switch.tsx +18 -16
- package/src/react/table.tsx +97 -52
- package/src/react/tabs.tsx +48 -38
- package/src/react/text.tsx +13 -10
- package/src/react/textarea.tsx +17 -15
- package/src/react/toggle-group.tsx +66 -23
- package/src/react/toggle.tsx +26 -18
- package/src/react/tooltip.tsx +43 -28
- package/tailwind.config.ts +62 -62
- package/dist/chunk-466PAJCA.mjs.map +0 -1
- package/dist/chunk-4TJBMO2Y.mjs.map +0 -1
- package/dist/chunk-5WJB3UAO.js.map +0 -1
- package/dist/chunk-6B2PU2GG.mjs.map +0 -1
- package/dist/chunk-7PJR4WFR.mjs.map +0 -1
- package/dist/chunk-AEWLL6A2.js.map +0 -1
- package/dist/chunk-EVN2IB57.js.map +0 -1
- package/dist/chunk-EYERINEJ.js.map +0 -1
- package/dist/chunk-FEE6PNWV.js.map +0 -1
- package/dist/chunk-GRQGCS7U.mjs.map +0 -1
- package/dist/chunk-HLXU3SQI.mjs.map +0 -1
- package/dist/chunk-JIHHUXA5.js.map +0 -1
- package/dist/chunk-JTAXNFUM.mjs.map +0 -1
- package/dist/chunk-KJ77RPJ4.mjs.map +0 -1
- package/dist/chunk-MSHUAEXI.js.map +0 -1
- package/dist/chunk-N6QGG4WS.mjs.map +0 -1
- package/dist/chunk-PLX35IKX.mjs.map +0 -1
- package/dist/chunk-UDNWQQ3I.js.map +0 -1
- package/dist/chunk-UPZHCTQV.js.map +0 -1
- package/dist/chunk-WLMYX3C7.mjs.map +0 -1
- package/dist/chunk-YR36SVVG.mjs.map +0 -1
- package/dist/chunk-ZWGC5M4G.js.map +0 -1
- package/dist/plugin/animate.plugin.d.mts +0 -9
- package/dist/plugin/animate.plugin.d.ts +0 -9
- package/dist/plugin/base.plugin.d.mts +0 -8
- package/dist/plugin/base.plugin.d.ts +0 -8
- package/dist/plugin/perspective.plugin.d.mts +0 -8
- package/dist/plugin/perspective.plugin.d.ts +0 -8
- package/dist/tailwind.config.d.mts +0 -5
- package/dist/tailwind.config.d.ts +0 -5
package/src/react/progress.tsx
CHANGED
|
@@ -1,30 +1,37 @@
|
|
|
1
|
-
|
|
1
|
+
'use client';
|
|
2
2
|
|
|
3
|
-
import * as React from
|
|
4
|
-
import * as ProgressPrimitive from
|
|
5
|
-
import { cn } from
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import * as ProgressPrimitive from '@radix-ui/react-progress';
|
|
5
|
+
import { cn } from '../lib/utils';
|
|
6
6
|
|
|
7
7
|
/* -----------------------------------------------------------------------------
|
|
8
8
|
* Component: Progress
|
|
9
9
|
* -------------------------------------------------------------------------- */
|
|
10
10
|
|
|
11
11
|
type ProgressElement = React.ElementRef<typeof ProgressPrimitive.Root>;
|
|
12
|
-
type ProgressProps = React.ComponentPropsWithoutRef<
|
|
12
|
+
type ProgressProps = React.ComponentPropsWithoutRef<
|
|
13
|
+
typeof ProgressPrimitive.Root
|
|
14
|
+
>;
|
|
13
15
|
|
|
14
|
-
const Progress = React.forwardRef<ProgressElement, ProgressProps>(
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
))
|
|
16
|
+
const Progress = React.forwardRef<ProgressElement, ProgressProps>(
|
|
17
|
+
({ className, value, ...props }, ref) => (
|
|
18
|
+
<ProgressPrimitive.Root
|
|
19
|
+
ref={ref}
|
|
20
|
+
className={cn(
|
|
21
|
+
'bg-primary/20 relative h-2 w-full overflow-hidden rounded-full',
|
|
22
|
+
className,
|
|
23
|
+
)}
|
|
24
|
+
{...props}
|
|
25
|
+
>
|
|
26
|
+
<ProgressPrimitive.Indicator
|
|
27
|
+
className="bg-primary size-full flex-1 transition"
|
|
28
|
+
style={{
|
|
29
|
+
transform: `translateX(-${String(100 - (value ?? 0))}%)`,
|
|
30
|
+
}}
|
|
31
|
+
/>
|
|
32
|
+
</ProgressPrimitive.Root>
|
|
33
|
+
),
|
|
34
|
+
);
|
|
28
35
|
|
|
29
36
|
Progress.displayName = ProgressPrimitive.Root.displayName;
|
|
30
37
|
|
package/src/react/quote.tsx
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as React from
|
|
2
|
-
import { Slot } from
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Slot } from '@radix-ui/react-slot';
|
|
3
3
|
|
|
4
4
|
/* -----------------------------------------------------------------------------
|
|
5
5
|
* Component: Quote
|
|
@@ -11,13 +11,15 @@ interface QuoteProps extends React.QuoteHTMLAttributes<HTMLQuoteElement> {
|
|
|
11
11
|
asChild?: boolean;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
const Quote = React.forwardRef<QuoteElement, QuoteProps>(
|
|
15
|
-
|
|
14
|
+
const Quote = React.forwardRef<QuoteElement, QuoteProps>(
|
|
15
|
+
({ asChild, ...props }, ref) => {
|
|
16
|
+
const Component = asChild ? Slot : 'q';
|
|
16
17
|
|
|
17
|
-
|
|
18
|
-
}
|
|
18
|
+
return <Component ref={ref} {...props} />;
|
|
19
|
+
},
|
|
20
|
+
);
|
|
19
21
|
|
|
20
|
-
Quote.displayName =
|
|
22
|
+
Quote.displayName = 'Quote';
|
|
21
23
|
|
|
22
24
|
/* -----------------------------------------------------------------------------
|
|
23
25
|
* Exports
|
|
@@ -1,19 +1,29 @@
|
|
|
1
|
-
|
|
1
|
+
'use client';
|
|
2
2
|
|
|
3
|
-
import * as React from
|
|
4
|
-
import * as RadioGroupPrimitive from
|
|
5
|
-
import { cn } from
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
|
|
5
|
+
import { cn } from '../lib/utils';
|
|
6
6
|
|
|
7
7
|
/* -----------------------------------------------------------------------------
|
|
8
8
|
* Component: RadioCards
|
|
9
9
|
* -------------------------------------------------------------------------- */
|
|
10
10
|
|
|
11
11
|
type RadioCardsElement = React.ElementRef<typeof RadioGroupPrimitive.Root>;
|
|
12
|
-
type RadioCardsProps = React.ComponentPropsWithoutRef<
|
|
12
|
+
type RadioCardsProps = React.ComponentPropsWithoutRef<
|
|
13
|
+
typeof RadioGroupPrimitive.Root
|
|
14
|
+
>;
|
|
13
15
|
|
|
14
|
-
const RadioCards = React.forwardRef<RadioCardsElement, RadioCardsProps>(
|
|
15
|
-
|
|
16
|
-
|
|
16
|
+
const RadioCards = React.forwardRef<RadioCardsElement, RadioCardsProps>(
|
|
17
|
+
({ className, ...props }, ref) => {
|
|
18
|
+
return (
|
|
19
|
+
<RadioGroupPrimitive.Root
|
|
20
|
+
className={cn('grid gap-2', className)}
|
|
21
|
+
{...props}
|
|
22
|
+
ref={ref}
|
|
23
|
+
/>
|
|
24
|
+
);
|
|
25
|
+
},
|
|
26
|
+
);
|
|
17
27
|
|
|
18
28
|
RadioCards.displayName = RadioGroupPrimitive.Root.displayName;
|
|
19
29
|
|
|
@@ -22,14 +32,19 @@ RadioCards.displayName = RadioGroupPrimitive.Root.displayName;
|
|
|
22
32
|
* -------------------------------------------------------------------------- */
|
|
23
33
|
|
|
24
34
|
type RadioCardsItemElement = React.ElementRef<typeof RadioGroupPrimitive.Item>;
|
|
25
|
-
type RadioCardsItemProps = React.ComponentPropsWithoutRef<
|
|
35
|
+
type RadioCardsItemProps = React.ComponentPropsWithoutRef<
|
|
36
|
+
typeof RadioGroupPrimitive.Item
|
|
37
|
+
>;
|
|
26
38
|
|
|
27
|
-
const RadioCardsItem = React.forwardRef<
|
|
39
|
+
const RadioCardsItem = React.forwardRef<
|
|
40
|
+
RadioCardsItemElement,
|
|
41
|
+
RadioCardsItemProps
|
|
42
|
+
>(({ className, ...props }, ref) => {
|
|
28
43
|
return (
|
|
29
44
|
<RadioGroupPrimitive.Item
|
|
30
45
|
ref={ref}
|
|
31
46
|
className={cn(
|
|
32
|
-
|
|
47
|
+
'text-compound-foreground focus-visible:bg-primary/10 group peer flex cursor-default items-center justify-center rounded-md border p-4 focus-visible:outline focus-visible:outline-2 disabled:cursor-not-allowed disabled:opacity-50 aria-checked:outline aria-checked:outline-2',
|
|
33
48
|
className,
|
|
34
49
|
)}
|
|
35
50
|
{...props}
|
|
@@ -43,4 +58,9 @@ RadioCardsItem.displayName = RadioGroupPrimitive.Item.displayName;
|
|
|
43
58
|
* Exports
|
|
44
59
|
* -------------------------------------------------------------------------- */
|
|
45
60
|
|
|
46
|
-
export {
|
|
61
|
+
export {
|
|
62
|
+
RadioCards,
|
|
63
|
+
RadioCardsItem,
|
|
64
|
+
type RadioCardsProps,
|
|
65
|
+
type RadioCardsItemProps,
|
|
66
|
+
};
|
|
@@ -1,19 +1,29 @@
|
|
|
1
|
-
|
|
1
|
+
'use client';
|
|
2
2
|
|
|
3
|
-
import * as React from
|
|
4
|
-
import * as RadioGroupPrimitive from
|
|
5
|
-
import { cn } from
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
|
|
5
|
+
import { cn } from '../lib/utils';
|
|
6
6
|
|
|
7
7
|
/* -----------------------------------------------------------------------------
|
|
8
8
|
* Component: RadioGroup
|
|
9
9
|
* -------------------------------------------------------------------------- */
|
|
10
10
|
|
|
11
11
|
type RadioGroupElement = React.ElementRef<typeof RadioGroupPrimitive.Root>;
|
|
12
|
-
type RadioGroupProps = React.ComponentPropsWithoutRef<
|
|
12
|
+
type RadioGroupProps = React.ComponentPropsWithoutRef<
|
|
13
|
+
typeof RadioGroupPrimitive.Root
|
|
14
|
+
>;
|
|
13
15
|
|
|
14
|
-
const RadioGroup = React.forwardRef<RadioGroupElement, RadioGroupProps>(
|
|
15
|
-
|
|
16
|
-
|
|
16
|
+
const RadioGroup = React.forwardRef<RadioGroupElement, RadioGroupProps>(
|
|
17
|
+
({ className, ...props }, ref) => {
|
|
18
|
+
return (
|
|
19
|
+
<RadioGroupPrimitive.Root
|
|
20
|
+
className={cn('grid gap-2', className)}
|
|
21
|
+
{...props}
|
|
22
|
+
ref={ref}
|
|
23
|
+
/>
|
|
24
|
+
);
|
|
25
|
+
},
|
|
26
|
+
);
|
|
17
27
|
|
|
18
28
|
RadioGroup.displayName = RadioGroupPrimitive.Root.displayName;
|
|
19
29
|
|
|
@@ -22,14 +32,19 @@ RadioGroup.displayName = RadioGroupPrimitive.Root.displayName;
|
|
|
22
32
|
* -------------------------------------------------------------------------- */
|
|
23
33
|
|
|
24
34
|
type RadioGroupItemElement = React.ElementRef<typeof RadioGroupPrimitive.Item>;
|
|
25
|
-
type RadioGroupItemProps = React.ComponentPropsWithoutRef<
|
|
35
|
+
type RadioGroupItemProps = React.ComponentPropsWithoutRef<
|
|
36
|
+
typeof RadioGroupPrimitive.Item
|
|
37
|
+
>;
|
|
26
38
|
|
|
27
|
-
const RadioGroupItem = React.forwardRef<
|
|
39
|
+
const RadioGroupItem = React.forwardRef<
|
|
40
|
+
RadioGroupItemElement,
|
|
41
|
+
RadioGroupItemProps
|
|
42
|
+
>(({ className, ...props }, ref) => {
|
|
28
43
|
return (
|
|
29
44
|
<RadioGroupPrimitive.Item
|
|
30
45
|
ref={ref}
|
|
31
46
|
className={cn(
|
|
32
|
-
|
|
47
|
+
'border-compound/70 hover:border-compound text-compound-foreground aria-checked:border-primary group peer aspect-square size-4 rounded-full border focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 disabled:cursor-not-allowed disabled:opacity-50',
|
|
33
48
|
className,
|
|
34
49
|
)}
|
|
35
50
|
{...props}
|
|
@@ -45,4 +60,9 @@ RadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName;
|
|
|
45
60
|
* Exports
|
|
46
61
|
* -------------------------------------------------------------------------- */
|
|
47
62
|
|
|
48
|
-
export {
|
|
63
|
+
export {
|
|
64
|
+
RadioGroup,
|
|
65
|
+
RadioGroupItem,
|
|
66
|
+
type RadioGroupProps,
|
|
67
|
+
type RadioGroupItemProps,
|
|
68
|
+
};
|
package/src/react/radio.tsx
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
'use client';
|
|
2
2
|
|
|
3
|
-
import * as React from
|
|
4
|
-
import { composeEventHandlers } from
|
|
5
|
-
import { cn } from
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { composeEventHandlers } from '@radix-ui/primitive';
|
|
5
|
+
import { cn } from '../lib/utils';
|
|
6
6
|
|
|
7
7
|
/* -----------------------------------------------------------------------------
|
|
8
8
|
* Component: Radio
|
|
@@ -14,22 +14,26 @@ interface RadioProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
|
|
14
14
|
onValueChange?: (value: string) => void;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
const Radio = React.forwardRef<RadioElement, RadioProps>(
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
|
|
17
|
+
const Radio = React.forwardRef<RadioElement, RadioProps>(
|
|
18
|
+
({ className, onValueChange, onChange, ...props }, ref) => {
|
|
19
|
+
return (
|
|
20
|
+
<input
|
|
21
|
+
ref={ref}
|
|
22
|
+
type="radio"
|
|
23
|
+
onChange={composeEventHandlers(onChange, (event) =>
|
|
24
|
+
onValueChange?.(event.currentTarget.value),
|
|
25
|
+
)}
|
|
26
|
+
className={cn(
|
|
27
|
+
'before:border-compound/70 hover:before:border-compound checked:before:border-primary checked:after:bg-primary peer relative flex appearance-none items-center justify-center rounded-full before:size-4 before:rounded-full before:border checked:after:absolute checked:after:size-2.5 checked:after:rounded-full focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 disabled:cursor-not-allowed disabled:opacity-50',
|
|
28
|
+
className,
|
|
29
|
+
)}
|
|
30
|
+
{...props}
|
|
31
|
+
/>
|
|
32
|
+
);
|
|
33
|
+
},
|
|
34
|
+
);
|
|
35
|
+
|
|
36
|
+
Radio.displayName = 'Radio';
|
|
33
37
|
|
|
34
38
|
/* -----------------------------------------------------------------------------
|
|
35
39
|
* Exports
|
package/src/react/resizable.tsx
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
'use client';
|
|
2
2
|
|
|
3
|
-
import * as React from
|
|
4
|
-
import * as ResizablePrimitive from
|
|
5
|
-
import { DragHandleDots2Icon } from
|
|
6
|
-
import { cn } from
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import * as ResizablePrimitive from 'react-resizable-panels';
|
|
5
|
+
import { DragHandleDots2Icon } from '@radix-ui/react-icons';
|
|
6
|
+
import { cn } from '../lib/utils';
|
|
7
7
|
|
|
8
8
|
/* -----------------------------------------------------------------------------
|
|
9
9
|
* Component: ResizablePanelGroup
|
|
@@ -12,10 +12,15 @@ import { cn } from "../lib/utils";
|
|
|
12
12
|
function ResizablePanelGroup({
|
|
13
13
|
className,
|
|
14
14
|
...props
|
|
15
|
-
}: React.ComponentProps<
|
|
15
|
+
}: React.ComponentProps<
|
|
16
|
+
typeof ResizablePrimitive.PanelGroup
|
|
17
|
+
>): React.JSX.Element {
|
|
16
18
|
return (
|
|
17
19
|
<ResizablePrimitive.PanelGroup
|
|
18
|
-
className={cn(
|
|
20
|
+
className={cn(
|
|
21
|
+
'flex size-full data-[panel-group-direction=vertical]:flex-col',
|
|
22
|
+
className,
|
|
23
|
+
)}
|
|
19
24
|
{...props}
|
|
20
25
|
/>
|
|
21
26
|
);
|
|
@@ -41,7 +46,7 @@ function ResizableHandle({
|
|
|
41
46
|
return (
|
|
42
47
|
<ResizablePrimitive.PanelResizeHandle
|
|
43
48
|
className={cn(
|
|
44
|
-
|
|
49
|
+
'bg-border relative flex w-px items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90',
|
|
45
50
|
className,
|
|
46
51
|
)}
|
|
47
52
|
{...props}
|
|
@@ -1,24 +1,34 @@
|
|
|
1
|
-
|
|
1
|
+
'use client';
|
|
2
2
|
|
|
3
|
-
import * as React from
|
|
4
|
-
import * as ScrollAreaPrimitive from
|
|
5
|
-
import { cn } from
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
|
|
5
|
+
import { cn } from '../lib/utils';
|
|
6
6
|
|
|
7
7
|
/* -----------------------------------------------------------------------------
|
|
8
8
|
* Component: ScrollArea
|
|
9
9
|
* -------------------------------------------------------------------------- */
|
|
10
10
|
|
|
11
11
|
type ScrollAreaElement = React.ElementRef<typeof ScrollAreaPrimitive.Root>;
|
|
12
|
-
type ScrollAreaProps = React.ComponentPropsWithoutRef<
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
<
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
12
|
+
type ScrollAreaProps = React.ComponentPropsWithoutRef<
|
|
13
|
+
typeof ScrollAreaPrimitive.Root
|
|
14
|
+
>;
|
|
15
|
+
|
|
16
|
+
const ScrollArea = React.forwardRef<ScrollAreaElement, ScrollAreaProps>(
|
|
17
|
+
({ children, className, ...props }, ref) => (
|
|
18
|
+
<ScrollAreaPrimitive.Root
|
|
19
|
+
ref={ref}
|
|
20
|
+
className={cn('relative overflow-hidden', className)}
|
|
21
|
+
{...props}
|
|
22
|
+
>
|
|
23
|
+
<ScrollAreaPrimitive.Viewport className="size-full rounded-[inherit]">
|
|
24
|
+
{children}
|
|
25
|
+
</ScrollAreaPrimitive.Viewport>
|
|
26
|
+
<ScrollAreaScrollbar orientation="vertical" />
|
|
27
|
+
<ScrollAreaScrollbar orientation="horizontal" />
|
|
28
|
+
<ScrollAreaPrimitive.Corner />
|
|
29
|
+
</ScrollAreaPrimitive.Root>
|
|
30
|
+
),
|
|
31
|
+
);
|
|
22
32
|
|
|
23
33
|
ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;
|
|
24
34
|
|
|
@@ -26,26 +36,33 @@ ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;
|
|
|
26
36
|
* Component: ScrollAreaScrollbar
|
|
27
37
|
* -------------------------------------------------------------------------- */
|
|
28
38
|
|
|
29
|
-
type ScrollAreaScrollbarElement = React.ElementRef<
|
|
30
|
-
|
|
39
|
+
type ScrollAreaScrollbarElement = React.ElementRef<
|
|
40
|
+
typeof ScrollAreaPrimitive.Scrollbar
|
|
41
|
+
>;
|
|
42
|
+
type ScrollAreaScrollbarProps = React.ComponentPropsWithoutRef<
|
|
43
|
+
typeof ScrollAreaPrimitive.Scrollbar
|
|
44
|
+
>;
|
|
31
45
|
|
|
32
|
-
const ScrollAreaScrollbar = React.forwardRef<
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
46
|
+
const ScrollAreaScrollbar = React.forwardRef<
|
|
47
|
+
ScrollAreaScrollbarElement,
|
|
48
|
+
ScrollAreaScrollbarProps
|
|
49
|
+
>(({ className, orientation = 'vertical', ...props }, ref) => (
|
|
50
|
+
<ScrollAreaPrimitive.Scrollbar
|
|
51
|
+
ref={ref}
|
|
52
|
+
orientation={orientation}
|
|
53
|
+
className={cn(
|
|
54
|
+
'flex touch-none select-none transition',
|
|
55
|
+
orientation === 'vertical' &&
|
|
56
|
+
'h-full w-2.5 border-l border-l-transparent p-px',
|
|
57
|
+
orientation === 'horizontal' &&
|
|
58
|
+
'h-2.5 flex-col border-t border-t-transparent p-px',
|
|
59
|
+
className,
|
|
60
|
+
)}
|
|
61
|
+
{...props}
|
|
62
|
+
>
|
|
63
|
+
<ScrollAreaPrimitive.ScrollAreaThumb className="bg-border relative flex-1 rounded-full" />
|
|
64
|
+
</ScrollAreaPrimitive.Scrollbar>
|
|
65
|
+
));
|
|
49
66
|
|
|
50
67
|
ScrollAreaScrollbar.displayName = ScrollAreaPrimitive.Scrollbar.displayName;
|
|
51
68
|
|
|
@@ -53,4 +70,9 @@ ScrollAreaScrollbar.displayName = ScrollAreaPrimitive.Scrollbar.displayName;
|
|
|
53
70
|
* Exports
|
|
54
71
|
* -------------------------------------------------------------------------- */
|
|
55
72
|
|
|
56
|
-
export {
|
|
73
|
+
export {
|
|
74
|
+
ScrollArea,
|
|
75
|
+
ScrollAreaScrollbar,
|
|
76
|
+
type ScrollAreaProps,
|
|
77
|
+
type ScrollAreaScrollbarProps,
|
|
78
|
+
};
|
package/src/react/section.tsx
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as React from
|
|
2
|
-
import { Slot } from
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Slot } from '@radix-ui/react-slot';
|
|
3
3
|
|
|
4
4
|
/* -----------------------------------------------------------------------------
|
|
5
5
|
* Component: Section
|
|
@@ -11,13 +11,15 @@ interface SectionProps extends React.HTMLAttributes<HTMLElement> {
|
|
|
11
11
|
asChild?: boolean;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
const Section = React.forwardRef<SectionElement, SectionProps>(
|
|
15
|
-
|
|
14
|
+
const Section = React.forwardRef<SectionElement, SectionProps>(
|
|
15
|
+
({ asChild, ...props }, ref) => {
|
|
16
|
+
const Component = asChild ? Slot : 'section';
|
|
16
17
|
|
|
17
|
-
|
|
18
|
-
}
|
|
18
|
+
return <Component ref={ref} {...props} />;
|
|
19
|
+
},
|
|
20
|
+
);
|
|
19
21
|
|
|
20
|
-
Section.displayName =
|
|
22
|
+
Section.displayName = 'Section';
|
|
21
23
|
|
|
22
24
|
/* -----------------------------------------------------------------------------
|
|
23
25
|
* Exports
|